Skip to content

Commit

Permalink
config(nvim): enable inlay hint gopls
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Jun 26, 2024
1 parent 331842a commit 762228f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions data/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,15 @@ require("lazy").setup({
markdownLinkText = {
style = {},
},
-- Support nvim-tree.lua
NvimTreeStatuslineNc = {
link = "NuimTreeStatusline",
EndOfBuffer = {
link = "NonText",
},
-- Support mini.statusline
StatusLineNC = {
fg = color_oxocarbon.pink,
},
MiniStatuslineFilename = {
link = "NuimTreeStatusline",
link = "StatusLine",
},
MiniStatuslineInactive = {
link = "NuimTreeStatusline",
link = "StatusLine",
},
}
end,
Expand Down Expand Up @@ -479,9 +475,20 @@ require("lazy").setup({
-- Go
-- 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/inlayHints.md
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls
lspconfig.gopls.setup({
capabilities = capabilities,
on_attach = function(client, bufnr)
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end,
settings = {
gopls = {
hints = {
parameterNames = true,
},
},
},
})

-- Python
Expand Down

0 comments on commit 762228f

Please sign in to comment.