nvim: make gopls use the socket
This commit is contained in:
parent
adc80419da
commit
a4d0ea9146
@ -487,6 +487,8 @@ require("mason").setup({
|
|||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup()
|
||||||
|
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
local util = require "lspconfig/util"
|
||||||
|
|
||||||
lspconfig.rnix.setup {}
|
lspconfig.rnix.setup {}
|
||||||
lspconfig.gotests.setup {}
|
lspconfig.gotests.setup {}
|
||||||
lspconfig.bashls.setup {}
|
lspconfig.bashls.setup {}
|
||||||
@ -505,8 +507,17 @@ lspconfig.zls.setup {}
|
|||||||
lspconfig.golangci_lint.setup {}
|
lspconfig.golangci_lint.setup {}
|
||||||
lspconfig.golangci_lint_ls.setup {}
|
lspconfig.golangci_lint_ls.setup {}
|
||||||
lspconfig.gopls.setup{
|
lspconfig.gopls.setup{
|
||||||
|
cmd = {"gopls", "-remote=unix;/tmp/.gopls-daemon.sock"},
|
||||||
filetypes = {"go", "gomod", "gowork", "gotmpl", "gohtmltmpl"},
|
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.vimls.setup{}
|
||||||
lspconfig.tailwindcss.setup{
|
lspconfig.tailwindcss.setup{
|
||||||
|
Loading…
Reference in New Issue
Block a user