trying nvim-lspconfig

This commit is contained in:
Motiejus Jakštys 2024-04-15 11:01:55 +03:00 committed by Motiejus Jakštys
parent 647eb82d64
commit 8cd35a28bd
2 changed files with 18 additions and 0 deletions

View File

@ -148,6 +148,7 @@ in {
(lib.mkIf devTools [ (lib.mkIf devTools [
pkgs.pkgs-unstable.vimPlugins.vim-go pkgs.pkgs-unstable.vimPlugins.vim-go
pkgs.vimPlugins.zig-vim pkgs.vimPlugins.zig-vim
pkgs.vimPlugins.nvim-lspconfig
]) ])
]; ];
extraConfig = builtins.readFile ./vimrc; extraConfig = builtins.readFile ./vimrc;

View File

@ -2,3 +2,20 @@ vim.api.nvim_exec([[
set grepprg=@ripgrep@/bin/rg\ --vimgrep grepformat^=%f:%l:%c:%m set grepprg=@ripgrep@/bin/rg\ --vimgrep grepformat^=%f:%l:%c:%m
au FileType go let g:go_fmt_command = "@gotools@/bin/goimports" au FileType go let g:go_fmt_command = "@gotools@/bin/goimports"
]], false) ]], false)
-- trying https://github.com/neovim/nvim-lspconfig/issues/888
local lspconfig = require("lspconfig")
lspconfig.gopls.setup({
settings = {
gopls = {
--env = {GOFLAGS="-tags=cluster_integration"}
--buildFlags = {"-tags=big integration cluster_integration"},
analyses = {
unusedparams = true,
},
staticcheck = true,
gofumpt = true,
},
},
})