diff --git a/nvim/after/ftplugin/javascript.vim b/nvim/after/ftplugin/javascript.vim new file mode 100644 index 0000000..aab9c80 --- /dev/null +++ b/nvim/after/ftplugin/javascript.vim @@ -0,0 +1,2 @@ +" verbose set matchpairs? +" setlocal matchpairs-=<:> diff --git a/nvim/after/ftplugin/rust.vim b/nvim/after/ftplugin/rust.vim new file mode 100644 index 0000000..337cd7a --- /dev/null +++ b/nvim/after/ftplugin/rust.vim @@ -0,0 +1,3 @@ +echomsg "did ftplugin" +setlocal matchpairs-=<:> +let b:random_variable = 123 diff --git a/nvim/after/ftplugin/typescript.vim b/nvim/after/ftplugin/typescript.vim new file mode 100644 index 0000000..2d4068f --- /dev/null +++ b/nvim/after/ftplugin/typescript.vim @@ -0,0 +1 @@ +execute 'source' fnameescape(expand(':p:h').'/javascript.vim') diff --git a/nvim/ftplugin/asm.vim b/nvim/ftplugin/asm.vim new file mode 100644 index 0000000..dd3c908 --- /dev/null +++ b/nvim/ftplugin/asm.vim @@ -0,0 +1 @@ +setlocal commentstring=#%s diff --git a/nvim/ftplugin/json.vim b/nvim/ftplugin/json.vim new file mode 100644 index 0000000..2775816 --- /dev/null +++ b/nvim/ftplugin/json.vim @@ -0,0 +1 @@ +syntax match Comment +\/\/.\+$+ diff --git a/nvim/ftplugin/markdown.vim b/nvim/ftplugin/markdown.vim new file mode 100644 index 0000000..d86c38b --- /dev/null +++ b/nvim/ftplugin/markdown.vim @@ -0,0 +1 @@ +execute 'source' fnameescape(expand(':p:h').'/text.vim') diff --git a/nvim/ftplugin/python.vim b/nvim/ftplugin/python.vim new file mode 100644 index 0000000..e10ab03 --- /dev/null +++ b/nvim/ftplugin/python.vim @@ -0,0 +1 @@ +Indent 4 diff --git a/nvim/ftplugin/text.vim b/nvim/ftplugin/text.vim new file mode 100644 index 0000000..1bc3f90 --- /dev/null +++ b/nvim/ftplugin/text.vim @@ -0,0 +1 @@ +call pencil#init() diff --git a/nvim/init.vim b/nvim/init.vim index 24239f8..69f2a5d 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -2,7 +2,7 @@ let g:nvim_dotfiles_dir = expand(':p:h') let g:vim_ide = get(g:, 'vim_ide', 0) -let &runtimepath = g:nvim_dotfiles_dir.','.&runtimepath +let &runtimepath = g:nvim_dotfiles_dir.','.&runtimepath.','.g:nvim_dotfiles_dir.'/after' for s:name in ['plugins', 'editing', 'interface', 'files', 'completion', 'terminal', 'git'] execute 'source' fnameescape(g:nvim_dotfiles_dir.'/lib/'.s:name.'.vim') diff --git a/nvim/lib/languages/javascript.vim b/nvim/lib/languages/javascript.vim index 9ccfd65..34b3c23 100644 --- a/nvim/lib/languages/javascript.vim +++ b/nvim/lib/languages/javascript.vim @@ -1,7 +1,3 @@ -augroup vimrc-javascript - autocmd FileType javascript,typescript setlocal matchpairs-=<:> -augroup END - if !g:vim_ide | finish | endif call coc#add_extension('coc-tsserver', 'coc-eslint', 'coc-prettier') diff --git a/nvim/lib/languages/json.vim b/nvim/lib/languages/json.vim index 26ca88d..e80b1f4 100644 --- a/nvim/lib/languages/json.vim +++ b/nvim/lib/languages/json.vim @@ -1,8 +1,3 @@ -augroup vimrc-languages-json - autocmd! - autocmd FileType json syntax match Comment +\/\/.\+$+ -augroup END - if !g:vim_ide | finish | endif call coc#add_extension('coc-json') diff --git a/nvim/lib/languages/markdown.vim b/nvim/lib/languages/markdown.vim index 83878f6..fa42486 100644 --- a/nvim/lib/languages/markdown.vim +++ b/nvim/lib/languages/markdown.vim @@ -1,11 +1,3 @@ -let g:vim_markdown_conceal = 0 -let g:vim_markdown_conceal_code_blocks = 0 - -augroup vimrc-languages-markdown - autocmd! - autocmd FileType markdown call pencil#init() -augroup END - if !g:vim_ide | finish | endif let g:coc_filetypes += ['markdown'] diff --git a/nvim/lib/languages/python.vim b/nvim/lib/languages/python.vim index 059f625..aac9de9 100644 --- a/nvim/lib/languages/python.vim +++ b/nvim/lib/languages/python.vim @@ -1,10 +1,3 @@ -augroup vimrc-language-python - autocmd! - autocmd FileType python Indent 4 -augroup END - -let g:python_highlight_all = 1 - if !g:vim_ide | finish | endif call coc#add_extension('coc-python') diff --git a/nvim/lib/languages/rust.vim b/nvim/lib/languages/rust.vim index 8fd67c4..5f938b4 100644 --- a/nvim/lib/languages/rust.vim +++ b/nvim/lib/languages/rust.vim @@ -1,9 +1,5 @@ let g:rust_recommended_style = 0 -augroup vimrc-rust - autocmd FileType rust setlocal matchpairs-=<:> -augroup END - if !g:vim_ide | finish | endif call coc#add_extension('coc-rls') diff --git a/nvim/lib/languages/text.vim b/nvim/lib/languages/text.vim deleted file mode 100644 index 416f56b..0000000 --- a/nvim/lib/languages/text.vim +++ /dev/null @@ -1,6 +0,0 @@ -augroup vimrc-languages-text - autocmd! - autocmd FileType text call pencil#init() -augroup END - -if !g:vim_ide | finish | endif