dotfiles/.config/nvim/lua/lsp/servers/gopls.lua

15 lines
327 B
Lua
Raw Normal View History

2022-12-24 12:33:46 -05:00
return {
cmd = {vim.g.lsp_path .. "gopls"},
filetypes = {"go", "gomod"},
2022-12-24 12:33:46 -05:00
on_attach = vim.g.lsp_on_attach,
handlers = vim.g.lsp_handler,
capabilities = vim.g.lsp_capabilities,
2022-12-24 12:33:46 -05:00
root_dir = require"lspconfig.util".root_pattern{
"go.mod",
".git",
vim.fn.getcwd(),
},
}