Better Go support

This commit is contained in:
Wil Simpson 2025-03-23 15:52:13 -04:00
parent 85e575a1e8
commit 03a824311b
2 changed files with 23 additions and 16 deletions

View file

@ -463,10 +463,31 @@ end
-- Add any additional override configuration in the following tables. They will be passed to -- Add any additional override configuration in the following tables. They will be passed to
-- the `settings` field of the server config. You must look up that documentation yourself. -- the `settings` field of the server config. You must look up that documentation yourself.
local servers = { local servers = {
clangd = {}, clangd = {
cmd = {
"~/.local/share/nvim/mason/bin/clangd",
"--all-scopes-completion",
"--background-index",
"--clang-tidy",
"--completion-parse=always",
"--completion-style=bundled",
"--cross-file-rename",
"--debug-origin",
"--enable-config", -- clangd 11+ supports reading from .clangd configuration file
"--fallback-style=Qt",
"--folding-ranges",
"--function-arg-placeholders",
"--header-insertion=iwyu",
"--pch-storage=memory", -- could also be disk
"--suggest-missing-includes",
"-j=20", -- number of workers
-- "--resource-dir="
"--log=error",
},
},
gopls = {}, gopls = {},
-- solargraph = {}, -- solargraph = {},
-- ruby_ls = {}, ruby_lsp = {},
sqlls = {}, sqlls = {},
angularls = {}, angularls = {},
bashls = {}, bashls = {},

View file

@ -1,14 +0,0 @@
return {
'ray-x/go.nvim',
requires = {
'ray-x/guihua.lua',
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter',
},
config = function()
require('go').setup()
end,
event = { 'CmdlineEnter' },
ft = { 'go', 'gomod' },
build = ':lua require("go.install").update_all_sync()',
}