config(nvim): enable inlay hint gopls
parent
331842a6a1
commit
762228f96b
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue