From 1ab657f6fbb091eaed82d87c1a3d596ea22e8afd Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Fri, 5 Jul 2024 09:46:19 -0500 Subject: vim lsp update --- vimrc | 10 +++++++--- 1 file 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 :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 :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') -- cgit v1.2.3