summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-01-28 17:36:43 +0100
committerMarc Vertes <mvertes@free.fr>2025-01-28 17:36:43 +0100
commitf15b8b8bc6f8985f4c7a829a27822526ab327394 (patch)
tree96bc9a4381670964c780fc7f01b0fca2bf7f52b4 /.vimrc
parent6e1d27a7138b196aaee83742352287bbf720f442 (diff)
.vimrc: gnopls
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index f07af80..de8366a 100644
--- a/.vimrc
+++ b/.vimrc
@@ -125,6 +125,17 @@ if executable('gopls')
\ call execute('LspCodeActionSync source.organizeImports')
endif
+if executable('gnopls')
+ au User lsp_setup call lsp#register_server({
+ \ 'name': 'gnopls',
+ \ 'cmd': {server_info->['gnopls', '-remote=auto']},
+ \ 'allowlist': ['gno', 'gnomod'],
+ \ })
+ autocmd BufWritePre *.gno
+ \ call execute('LspDocumentFormatSync') |
+ \ call execute('LspCodeActionSync source.organizeImports')
+endif
+
if executable('clangd')
au User lsp_setup call lsp#register_server({
\ 'name': 'clangd',