adding go config missing from other branch
This commit is contained in:
parent
b0ec868660
commit
7741950d13
22
init.lua
22
init.lua
|
@ -544,9 +544,29 @@ require('lazy').setup({
|
||||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
|
local util = require 'lspconfig.util'
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
gopls = {},
|
gopls = {
|
||||||
|
cmd = { 'gopls' },
|
||||||
|
capabilities = capabilities,
|
||||||
|
filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' },
|
||||||
|
root_dir = util.root_pattern('go.work', 'go.mod', '.git'),
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
completeUnimported = true,
|
||||||
|
usePlaceholders = true,
|
||||||
|
analyses = {
|
||||||
|
unusedparams = true,
|
||||||
|
shadow = true,
|
||||||
|
},
|
||||||
|
staticcheck = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
init_option = {
|
||||||
|
usePlaceholders = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue