diff options
author | Joe <rrbo@proton.me> | 2023-09-05 12:40:26 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-09-05 12:40:26 +0200 |
commit | 58f47081f212cc491f2bcc8907cb8b1b65ab7853 (patch) | |
tree | 7e211e1557c39d7637f9a31112c9232d6edd6994 /.config/nvim | |
parent | up (diff) | |
download | dotfiles-bsd-58f47081f212cc491f2bcc8907cb8b1b65ab7853.tar.gz dotfiles-bsd-58f47081f212cc491f2bcc8907cb8b1b65ab7853.tar.bz2 dotfiles-bsd-58f47081f212cc491f2bcc8907cb8b1b65ab7853.tar.xz dotfiles-bsd-58f47081f212cc491f2bcc8907cb8b1b65ab7853.tar.zst dotfiles-bsd-58f47081f212cc491f2bcc8907cb8b1b65ab7853.zip |
up
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/init.lua | 2 | ||||
-rw-r--r-- | .config/nvim/langs.vim | 23 | ||||
-rw-r--r-- | .config/nvim/lua/langs.lua | 11 |
3 files changed, 12 insertions, 24 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index b8250bd..577639e 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -19,8 +19,8 @@ require('plug') require('settings') require('bindings') require('sidebars') +require('langs') require('plugs-config/treesitter') -vim.cmd('source ' .. confdir .. '/nvim/langs.vim') vim.cmd('source ' .. confdir .. '/nvim/plug-config/airline.vim') vim.cmd('source ' .. confdir .. '/nvim/plug-config/asyncomplete.vim') vim.cmd('source ' .. confdir .. '/nvim/plug-config/floaterm.vim') diff --git a/.config/nvim/langs.vim b/.config/nvim/langs.vim deleted file mode 100644 index fe5aa25..0000000 --- a/.config/nvim/langs.vim +++ /dev/null @@ -1,23 +0,0 @@ -let g:asmsyntax = 'asm' -let perl_include_pod = 1 -autocmd BufNewFile,BufRead *.c - \ set filetype=c -autocmd BufNewFile,BufRead *.h - \ set filetype=c -autocmd BufNewFile,BufRead *.cxx - \ set filetype=cpp -autocmd BufNewFile,BufRead *.hxx - \ set filetype=cpp -autocmd BufNewFile,BufRead *.ms,*.1,*.2,*.3,*.4,*.5,*.6,*.7,*.8,*.9 - \ set filetype=groff -autocmd FileType fish - \ compiler fish -autocmd FileType perl - \ setlocal com-=:# kp=perldoc\ -f - \| compiler perl -autocmd BufNewFile,BufRead *.conf - \ set filetype=conf -autocmd BufWritePost *.ms - \ let pdf=fnamemodify(bufname('%'), ':r') . ".pdf" - \| silent! execute "!nroff % -ms -Tpdf -Kutf8 > " . pdf -let g:perl_compiler_force_warnings = 1 diff --git a/.config/nvim/lua/langs.lua b/.config/nvim/lua/langs.lua new file mode 100644 index 0000000..9f17db6 --- /dev/null +++ b/.config/nvim/lua/langs.lua @@ -0,0 +1,11 @@ +vim.g.asmsyntax = 'asm' +vim.g.perl_include_pod = 1 +vim.g.perl_compiler_force_warnings = 1 + +vim.api.nvim_create_autocmd('BufNewFile,BufRead', { pattern = '*.c,*.h', command = 'set filetype=c'}) +vim.api.nvim_create_autocmd('BufNewFile,BufRead', { pattern = '*.cc,*.hh,*.cpp,*.hpp,*.cxx,*.hxx', command = 'set filetype=cpp'}) +vim.api.nvim_create_autocmd('BufNewFile,BufRead', { pattern = '*.ms,*.1,*.2,*.3,*.4,*.5,*.6,*.7,*.8,*.9', command = 'set filetype=groff'}) +vim.api.nvim_create_autocmd('BufNewFile,BufRead', { pattern = '*.conf', command = 'set filetype=conf'}) +vim.api.nvim_create_autocmd('BufWritePost', { pattern = '*.ms', command = "let pdf=fnamemodify(bufname('%'), ':r') . \".pdf\" | silent! execute \"!nroff % -ms -Tpdf -Kutf8 > \" . pdf"}) +vim.api.nvim_create_autocmd('FileType fish', { command = 'compiler fish'}) +vim.api.nvim_create_autocmd('FileType perl', { command = 'setlocal com-=:# kp=perldoc -f | compiler perl'}) |