summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/after/ftplugin')
-rwxr-xr-x.config/nvim/after/ftplugin/dart.lua4
-rwxr-xr-x.config/nvim/after/ftplugin/markdown.lua30
-rwxr-xr-x.config/nvim/after/ftplugin/python.lua4
-rwxr-xr-x.config/nvim/after/ftplugin/yaml.lua6
4 files changed, 44 insertions, 0 deletions
diff --git a/.config/nvim/after/ftplugin/dart.lua b/.config/nvim/after/ftplugin/dart.lua
new file mode 100755
index 0000000..777faa6
--- /dev/null
+++ b/.config/nvim/after/ftplugin/dart.lua
@@ -0,0 +1,4 @@
+o.colorcolumn = '80'
+bo.expandtab = true
+bo.shiftwidth = 2
+bo.tabstop = 2
diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua
index bfcca96..3c7e009 100755
--- a/.config/nvim/after/ftplugin/markdown.lua
+++ b/.config/nvim/after/ftplugin/markdown.lua
@@ -6,3 +6,33 @@ bo.shiftwidth = 2
bo.formatoptions = 'qc'
bo.textwidth = 80
o.colorcolumn = '80'
+
+if require("zk.util").notebook_root(vim.fn.expand('%:p')) ~= nil then
+ local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end
+ local opts = { noremap=true, silent=false }
+
+ map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
+ map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
+
+ vim.api.nvim_exec([[
+ syn region markdownWikiLink matchgroup=markdownLinkDelimiter
+ \ start="\[\[" end="\]\]" contains=markdownUrl keepend oneline concealends
+ syn region markdownLink matchgroup=markdownLinkDelimiter
+ \ start="\[" end="\]" contains=markdownUrl keepend oneline concealends
+ syn region markdownLink matchgroup=markdownLinkDelimiter
+ \ start="(" end=")" contains=markdownUrl keepend contained conceal
+ syn region markdownLinkText matchgroup=markdownLinkTextDelimiter
+ \ start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@="
+ \ end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId
+ \ skipwhite contains=@markdownInline,markdownLineStart concealends
+
+ " unlet b:current_syntax
+ syntax include @Yaml syntax/yaml.vim
+ syntax include @Toml syntax/toml.vim
+ syntax region yamlFrontmatter start=/\%^---$/ end=/^---$/
+ \ keepend contains=@Yaml
+ syntax region tomlFrontmatter start=/\%^+++$/ end=/^+++$/
+ \ keepend contains=@Toml
+
+ ]], true)
+end
diff --git a/.config/nvim/after/ftplugin/python.lua b/.config/nvim/after/ftplugin/python.lua
index b6c54ff..64eb9f0 100755
--- a/.config/nvim/after/ftplugin/python.lua
+++ b/.config/nvim/after/ftplugin/python.lua
@@ -1 +1,5 @@
o.colorcolumn = '80'
+
+require"nvim-treesitter.highlight".set_custom_captures {
+ ["docstring"] = "Comment",
+}
diff --git a/.config/nvim/after/ftplugin/yaml.lua b/.config/nvim/after/ftplugin/yaml.lua
index b89af72..4f9234b 100755
--- a/.config/nvim/after/ftplugin/yaml.lua
+++ b/.config/nvim/after/ftplugin/yaml.lua
@@ -4,3 +4,9 @@ o.colorcolumn = '80'
bo.tabstop = 2
bo.softtabstop = 2
bo.shiftwidth = 2
+
+
+vim.api.nvim_exec([[
+ set is hlsearch ai ic scs
+ nnoremap <esc><esc> :nohls
+]], true)
remember that computers suck.