mirror of
https://github.com/Crocmagnon/dotfiles.git
synced 2024-11-22 22:48:05 +01:00
23 lines
587 B
Lua
23 lines
587 B
Lua
local on_attach = require("plugins.configs.lspconfig").on_attach
|
|
local capabilities = require("plugins.configs.lspconfig").capabilities
|
|
|
|
local lspconfig = require("lspconfig")
|
|
local util = require "lspconfig/util"
|
|
|
|
lspconfig.gopls.setup {
|
|
on_attach = on_attach,
|
|
capabilities = capabilities,
|
|
cmd = {"gopls"},
|
|
filetypes = {"go", "gomod", "gowork", "gotmpl"},
|
|
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
|
|
settings = {
|
|
gopls = {
|
|
completeUnimported = true,
|
|
usePlaceholders = true,
|
|
analyses = {
|
|
unusedparams = true,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|