From 03a824311b1663798133b6c52f2a742ed6530c5d Mon Sep 17 00:00:00 2001 From: Wil Simpson Date: Sun, 23 Mar 2025 15:52:13 -0400 Subject: [PATCH] Better Go support --- init.lua | 25 +++++++++++++++++++++++-- lua/custom/plugins/go.lua | 14 -------------- 2 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 lua/custom/plugins/go.lua diff --git a/init.lua b/init.lua index 0d7f788b..e08b92a5 100644 --- a/init.lua +++ b/init.lua @@ -463,10 +463,31 @@ end -- 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. 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 = {}, -- solargraph = {}, - -- ruby_ls = {}, + ruby_lsp = {}, sqlls = {}, angularls = {}, bashls = {}, diff --git a/lua/custom/plugins/go.lua b/lua/custom/plugins/go.lua deleted file mode 100644 index 94d35f51..00000000 --- a/lua/custom/plugins/go.lua +++ /dev/null @@ -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()', -}