From bd531766269ebf3cd13a9b236a449d893cad9d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 15 Apr 2024 14:15:34 +0300 Subject: [PATCH] gopls and gotools: get from pkgs-unstable --- shared/home/default.nix | 3 ++- shared/home/dev.lua | 11 +++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/shared/home/default.nix b/shared/home/default.nix index 9dd762a..f8812e3 100644 --- a/shared/home/default.nix +++ b/shared/home/default.nix @@ -158,7 +158,8 @@ in { builtins.readFile (pkgs.substituteAll { src = ./dev.lua; - inherit (pkgs) gotools ripgrep; + inherit (pkgs) ripgrep; + inherit (pkgs.pkgs-unstable) gopls gotools; }) .outPath; }) diff --git a/shared/home/dev.lua b/shared/home/dev.lua index 4947d98..5eab857 100644 --- a/shared/home/dev.lua +++ b/shared/home/dev.lua @@ -1,21 +1,16 @@ vim.api.nvim_exec([[ 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) -- trying https://github.com/neovim/nvim-lspconfig/issues/888 local lspconfig = require("lspconfig") lspconfig.gopls.setup({ + cmd = {"@gopls@/bin/gopls"}, settings = { gopls = { - --env = {GOFLAGS="-tags=cluster_integration"} - --buildFlags = {"-tags=big integration cluster_integration"}, - analyses = { - unusedparams = true, - }, - staticcheck = true, - gofumpt = true, + buildFlags = {"-tags=integration"}, }, }, })