summaryrefslogtreecommitdiff
path: root/dot_config/nvim/lsp/gopls.fnl
blob: 8a7fdd7ad659095c79298223539ca1e35e7a51f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
{:cmd [:gopls]
 :filetypes [:go :gomod :gowork :gosum]
 :root_dir (fn [buf cb]
             (cb (let  [modr      (vim.fs.root buf  :go.mod)]
                   (or (when modr (vim.fs.root modr :go.work))
                       modr))))
 :settings {:autoformat true
            :gopls {:analyses {:unusedparams true
                               :unusedwrite  true
                               :nilness      true}
                    :gofumpt true
                    :semanticTokens true
                    :staticcheck true}}}