summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp/go-ls.lua
blob: 13112475196c4948402b7de64e8f8f3405902e4c (plain)
1
2
3
4
5
6
7
require'lspconfig'.gopls.setup{
    cmd = {DATA_PATH .. "/lspinstall/go/gopls"},
    settings = {gopls = {analyses = {unusedparams = true}, staticcheck = true}},
    root_dir = require'lspconfig'.util.root_pattern(".git","go.mod","."),
    init_options = {usePlaceholders = true, completeUnimported = true},
    on_attach = require'lsp'.common_on_attach
}