summaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-07-05 09:46:19 -0500
committerMarc Coquand <marc@mccd.space>2024-07-05 09:46:19 -0500
commit1ab657f6fbb091eaed82d87c1a3d596ea22e8afd (patch)
treecb2e4b00555137229fc241bf27c9a1a2dd82fa70 /vim
parentce4585b427bea40dfee40be48b39ee4940bb1dda (diff)
downloadopenbsd-1ab657f6fbb091eaed82d87c1a3d596ea22e8afd.tar.gz
openbsd-1ab657f6fbb091eaed82d87c1a3d596ea22e8afd.tar.bz2
openbsd-1ab657f6fbb091eaed82d87c1a3d596ea22e8afd.zip
vim lsp update
Diffstat (limited to '')
-rw-r--r--vimrc10
1 files changed, 7 insertions, 3 deletions
diff --git a/vimrc b/vimrc
index 2b59d72..fe2691e 100644
--- a/vimrc
+++ b/vimrc
@@ -104,12 +104,14 @@ if exists('g:loaded_lsp')
\ }])
end
autocmd Filetype ocaml autocmd BufWritePre <buffer> :LspFormat
+autocmd Filetype ocaml setlocal tabstop=2
+autocmd Filetype ocaml setlocal shiftwidth=2
" Go
if exists('g:loaded_lsp')
call LspAddServer([#{
\ name: 'golang',
- \ filetype: ['go', 'gomod'],
+ \ filetype: ['go', 'gomod', 'gowork', 'gohtml'],
\ path: '/usr/bin/gopls',
\ args: ['serve'],
\ syncInit: v:true
@@ -118,8 +120,10 @@ end
autocmd Filetype go set makeprg=go\ build
autocmd Filetype go autocmd BufWritePre <buffer> :LspFormat
-au BufRead,BufNewFile *.tmpl set filetype=tmpl
-autocmd Filetype tmpl setlocal tabstop=2
+
+au BufRead,BufNewFile *.tmpl set filetype=gohtml
+autocmd Filetype gohtml setlocal tabstop=2
+autocmd Filetype gohtml setlocal formatprg=djlint\ --profile=golang\ --reformat\ -
" Nix
if exists('g:loaded_lsp')