From 6d823d928ca521b316f029d950ea4abf687516a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20H=C3=A5kansson?= Date: Wed, 31 Jan 2024 09:40:01 +0100 Subject: [PATCH] fix go.nvim and gopls --- init.lua | 30 +----------------------------- lazy-lock.json | 6 +++--- lua/custom/plugins/go.lua | 10 +++++++++- 3 files changed, 13 insertions(+), 33 deletions(-) diff --git a/init.lua b/init.lua index baf48a54..f08b8e8a 100644 --- a/init.lua +++ b/init.lua @@ -621,35 +621,7 @@ require('mason-lspconfig').setup() -- define the property 'filetypes' to the map in question. local servers = { clangd = {}, - gopls = { - gofumpt = true, - usePlaceholders = true, - completeUnimported = true, - matcher = 'Fuzzy', - diagnosticsDelay = '200ms', - symbolMatcher = 'fuzzy', - buildFlags = { '-tags', 'integration' }, - -- codelenses - codelenses = { - generate = true, -- show the `go generate` lens. - gc_details = true, -- Show a code lens toggling the display of gc's choices. - test = true, - tidy = true, - vendor = true, - regenerate_cgo = true, - upgrade_dependency = true, - }, - -- hints - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - }, + -- gopls = {}, pyright = {}, rust_analyzer = {}, -- tsserver = {}, diff --git a/lazy-lock.json b/lazy-lock.json index cbfc6ea0..a20d2683 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -31,17 +31,17 @@ "nvim-dap": { "branch": "master", "commit": "9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5" }, "nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" }, "nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" }, - "nvim-lspconfig": { "branch": "master", "commit": "021906284dcfb938bc236f8295af2650c60cb807" }, + "nvim-lspconfig": { "branch": "master", "commit": "1759ea68fbbb1303192020d3e59936189359e0ed" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, "nvim-tree.lua": { "branch": "master", "commit": "f39f7b6fcd3865ac2146de4cb4045286308f2935" }, - "nvim-treesitter": { "branch": "master", "commit": "e9602f41192ba51842b4be4d02c718a64cd57acf" }, + "nvim-treesitter": { "branch": "master", "commit": "ba6454783493ac3a5dd209c25e491640b07bd8de" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" }, "nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" }, "onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" }, "persisted.nvim": { "branch": "main", "commit": "edd8aa41cd87f9da1b6ef0c584068dea192f65b7" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, - "schemastore.nvim": { "branch": "main", "commit": "11d661ae5e08f19b5256661a6491a66fa26cdcfc" }, + "schemastore.nvim": { "branch": "main", "commit": "273cd742bf86aedc21c1154a2bcea044071f48d6" }, "ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" }, "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, diff --git a/lua/custom/plugins/go.lua b/lua/custom/plugins/go.lua index 12baa28d..98b5fde9 100644 --- a/lua/custom/plugins/go.lua +++ b/lua/custom/plugins/go.lua @@ -11,7 +11,15 @@ local M = { function M.config() -- setup your go.nvim - require('go').setup({}) + require('go').setup({ + lsp_keymaps = false, -- disable the lsp keymaps defined by go.nvim. It's true by default + lsp_inlay_hints = { + enable = true, + -- hint style, set to 'eol' for end-of-line hints, 'inlay' for inline hints + -- inlay only avalible for 0.10.x + style = 'eol', + }, + }) end return M