diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-03-01 22:04:00 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-05-29 22:57:31 +0100 |
commit | 0a932e8f8047864d5b901cd1ccf889b67ae3e73f (patch) | |
tree | c6c9fef3b9a46e3fc8fffa119c518124e5c5f4be | |
parent | d450bee630a28c5f2c1ca4c6e429fa93958cdc8e (diff) | |
download | dotnvim-0a932e8f8047864d5b901cd1ccf889b67ae3e73f.tar.gz dotnvim-0a932e8f8047864d5b901cd1ccf889b67ae3e73f.zip |
Go LSP support
-rw-r--r-- | lsp.lua | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -46,6 +46,14 @@ local servers = { } } }, + gopls = { + gopls = { + analyses = { + unusedparams = true, + }, + staticcheck = true, + }, + }, } for lsp, settings in pairs(servers) do require('lspconfig')[lsp].setup { @@ -57,3 +65,7 @@ for lsp, settings in pairs(servers) do settings = settings, } end + +-- for go +-- install gopls with: go install golang.org/x/tools/gopls@latest +vim.cmd([[autocmd BufWritePre *.go :lua vim.lsp.buf.formatting_seq_sync()]]) |