config(nvim): enable inlay hint gopls

main
sudo pacman -Syu 2024-06-26 13:06:35 +07:00
parent 331842a6a1
commit 762228f96b
1 changed files with 15 additions and 8 deletions

View File

@ -154,19 +154,15 @@ require("lazy").setup({
markdownLinkText = { markdownLinkText = {
style = {}, style = {},
}, },
-- Support nvim-tree.lua EndOfBuffer = {
NvimTreeStatuslineNc = { link = "NonText",
link = "NuimTreeStatusline",
}, },
-- Support mini.statusline -- Support mini.statusline
StatusLineNC = {
fg = color_oxocarbon.pink,
},
MiniStatuslineFilename = { MiniStatuslineFilename = {
link = "NuimTreeStatusline", link = "StatusLine",
}, },
MiniStatuslineInactive = { MiniStatuslineInactive = {
link = "NuimTreeStatusline", link = "StatusLine",
}, },
} }
end, end,
@ -479,9 +475,20 @@ require("lazy").setup({
-- Go -- Go
-- https://github.com/golang/tools/blob/master/gopls/doc/vim.md -- https://github.com/golang/tools/blob/master/gopls/doc/vim.md
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
-- https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls
lspconfig.gopls.setup({ lspconfig.gopls.setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = function(client, bufnr)
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end,
settings = {
gopls = {
hints = {
parameterNames = true,
},
},
},
}) })
-- Python -- Python