nvim: make gopls use the socket

This commit is contained in:
surtur 2023-08-10 23:29:16 +02:00
parent adc80419da
commit a4d0ea9146
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -487,6 +487,8 @@ require("mason").setup({
require("mason-lspconfig").setup()
local lspconfig = require('lspconfig')
local util = require "lspconfig/util"
lspconfig.rnix.setup {}
lspconfig.gotests.setup {}
lspconfig.bashls.setup {}
@ -505,8 +507,17 @@ lspconfig.zls.setup {}
lspconfig.golangci_lint.setup {}
lspconfig.golangci_lint_ls.setup {}
lspconfig.gopls.setup{
cmd = {"gopls", "-remote=unix;/tmp/.gopls-daemon.sock"},
filetypes = {"go", "gomod", "gowork", "gotmpl", "gohtmltmpl"},
options = {"-remote=unix;/tmp/.gopls-daemon.sock"}
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
},
},
}
lspconfig.vimls.setup{}
lspconfig.tailwindcss.setup{