mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] use the ftplugin mechanism instead of FileType autocommands
This commit is contained in:
parent
d4e04125a6
commit
545770bc9e
15 changed files with 12 additions and 35 deletions
2
nvim/after/ftplugin/javascript.vim
Normal file
2
nvim/after/ftplugin/javascript.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" verbose set matchpairs?
|
||||
" setlocal matchpairs-=<:>
|
3
nvim/after/ftplugin/rust.vim
Normal file
3
nvim/after/ftplugin/rust.vim
Normal file
|
@ -0,0 +1,3 @@
|
|||
echomsg "did ftplugin"
|
||||
setlocal matchpairs-=<:>
|
||||
let b:random_variable = 123
|
1
nvim/after/ftplugin/typescript.vim
Normal file
1
nvim/after/ftplugin/typescript.vim
Normal file
|
@ -0,0 +1 @@
|
|||
execute 'source' fnameescape(expand('<sfile>:p:h').'/javascript.vim')
|
1
nvim/ftplugin/asm.vim
Normal file
1
nvim/ftplugin/asm.vim
Normal file
|
@ -0,0 +1 @@
|
|||
setlocal commentstring=#%s
|
1
nvim/ftplugin/json.vim
Normal file
1
nvim/ftplugin/json.vim
Normal file
|
@ -0,0 +1 @@
|
|||
syntax match Comment +\/\/.\+$+
|
1
nvim/ftplugin/markdown.vim
Normal file
1
nvim/ftplugin/markdown.vim
Normal file
|
@ -0,0 +1 @@
|
|||
execute 'source' fnameescape(expand('<sfile>:p:h').'/text.vim')
|
1
nvim/ftplugin/python.vim
Normal file
1
nvim/ftplugin/python.vim
Normal file
|
@ -0,0 +1 @@
|
|||
Indent 4
|
1
nvim/ftplugin/text.vim
Normal file
1
nvim/ftplugin/text.vim
Normal file
|
@ -0,0 +1 @@
|
|||
call pencil#init()
|
|
@ -2,7 +2,7 @@ let g:nvim_dotfiles_dir = expand('<sfile>: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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
augroup vimrc-languages-text
|
||||
autocmd!
|
||||
autocmd FileType text call pencil#init()
|
||||
augroup END
|
||||
|
||||
if !g:vim_ide | finish | endif
|
Loading…
Reference in a new issue