Mercurial > dotfiles
changeset 572:21745760a5dc
Use ftplugin and syntax files for language specific settings
author | zegervdv <zegervdv@me.com> |
---|---|
date | Thu, 03 Mar 2022 10:54:39 +0100 |
parents | b2a13ac793ec |
children | eb6ebdacf201 |
files | .chezmoitemplates/config.vim dot_config/nvim/after/syntax/xdc.vim dot_config/nvim/filetype.lua dot_config/nvim/ftplugin/systemverilog.vim dot_config/nvim/ftplugin/tcl.vim dot_config/nvim/ftplugin/xdc.vim |
diffstat | 6 files changed, 18 insertions(+), 87 deletions(-) [+] |
line wrap: on
line diff
--- a/.chezmoitemplates/config.vim Thu Mar 03 10:09:02 2022 +0100 +++ b/.chezmoitemplates/config.vim Thu Mar 03 10:54:39 2022 +0100 @@ -424,93 +424,6 @@ syn match Error "\v^ERROR:.*$" endfunction " -" Git commit messages -augroup ft_git - au! - au FileType gitcommit setlocal spell spelllang=en_gb - autocmd FileType gitcommit,gitrebase,gitconfig set bufhidden=delete -augroup END -" -" Ruby -augroup ft_ruby - au! - autocmd BufRead *_spec.rb set filetype=rspec -augroup END -" -" Matlab -augroup ft_matlab - au! - autocmd FileType matlab setlocal commentstring=\%\ %s -augroup END -" -" C -augroup ft_c - au! - au FileType c setlocal foldmethod=syntax -augroup END -" -" TCL - -augroup ft_tcl - au! - autocmd FileType tcl setlocal commentstring=#\ %s - " autocmd FileType tcl compiler nagelfar - autocmd BufRead *.do set filetype=tcl - autocmd BufRead *.hal set filetype=tcl - autocmd FileType tcl setlocal iskeyword+=: - autocmd FileType tcl setlocal breakat-=: - autocmd FileType tcl setlocal suffixesadd+=.tcl,.do -augroup END -" shortcuts -iabbrev procargs array set arg [::argument_processing::proces_arguments $args]; -" -" GPG -" Don't save backups of gpg asc files -set backupskip+=*.asc - -" Convenient editing of ascii-armoured encrypted files -augroup GPGASCII - au! - au BufReadPost *.asc :%!gpg -q -d - au BufReadPost *.asc |redraw - au BufWritePre *.asc :%!gpg -q -e -a - au BufWritePost *.asc u - au VimLeave *.asc :!clear -augroup END -" -" System Verilog -augroup ft_systemverilog - au! - au FileType systemverilog setlocal suffixesadd+=.sv,.v - au FileType systemverilog,verilog setlocal iskeyword+=' -augroup END - -" -" Make -augroup ft_make - autocmd! - autocmd BufEnter *.make setlocal filetype=make - autocmd FileType make setlocal noexpandtab -augroup END -" JSON -augroup ft_json - autocmd! - autocmd FileType json setlocal equalprg=jq -augroup END -" -" -" Python -augroup f_python - autocmd! - autocmd FileType python setlocal shiftwidth=4 - au FileType python setlocal formatprg=autopep8\ - - autocmd FileType python setlocal path-=** - autocmd Filetype python let b:delimitMate_nesting_quotes = ['"', "'"] -augroup END - -let g:python_highlight_all=1 -" -" " Plugin settings " Gundo tree
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/nvim/after/syntax/xdc.vim Thu Mar 03 10:54:39 2022 +0100 @@ -0,0 +1,5 @@ +if exists('b:current_syntax') + finish +endif + +runtime! syntax/tcl.vim syntax/tcl_*.vim syntax/tcl/*.vim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/nvim/filetype.lua Thu Mar 03 10:54:39 2022 +0100 @@ -0,0 +1,6 @@ +vim.g.did_load_filetypes = 0 +vim.g.do_filetype_lua = 1 + +vim.filetype.add { + extension = { xdc = 'xdc', ['do'] = 'tcl', make = 'make' }, +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/nvim/ftplugin/systemverilog.vim Thu Mar 03 10:54:39 2022 +0100 @@ -0,0 +1,1 @@ +setlocal suffixesadd+=.sv,.v