feat(nvim): add go.nvim
This commit is contained in:
parent
46f9441d08
commit
ec6aec85e3
2 changed files with 34 additions and 0 deletions
|
@ -150,6 +150,39 @@ lspconfig.gopls.setup({
|
|||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
require("go").setup({
|
||||
disable_defaults = true,
|
||||
lsp_inlay_hints = {
|
||||
enable = true,
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = false,
|
||||
-- Event which triggers a refersh of the inlay hints.
|
||||
-- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but
|
||||
-- not that this may cause higher CPU usage.
|
||||
-- This option is only respected when only_current_line and
|
||||
-- autoSetHints both are true.
|
||||
only_current_line_autocmd = "CursorHold",
|
||||
-- whether to show variable name before type hints with the inlay hints or not
|
||||
-- default: false
|
||||
show_variable_name = true,
|
||||
-- prefix for parameter hints
|
||||
parameter_hints_prefix = " ",
|
||||
show_parameter_hints = true,
|
||||
-- prefix for all the other hints (type, chaining)
|
||||
other_hints_prefix = "=> ",
|
||||
-- whether to align to the lenght of the longest line in the file
|
||||
max_len_align = false,
|
||||
-- padding from the left if max_len_align is true
|
||||
max_len_align_padding = 1,
|
||||
-- whether to align to the extreme right or not
|
||||
right_align = false,
|
||||
-- padding from the right if right_align is true
|
||||
right_align_padding = 6,
|
||||
-- The color of the hints
|
||||
highlight = "Comment",
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.sumneko_lua.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
|
|
|
@ -268,6 +268,7 @@ return packer.startup({
|
|||
use("hrsh7th/vim-vsnip")
|
||||
use("petertriho/cmp-git")
|
||||
use("onsails/lspkind.nvim")
|
||||
use("ray-x/go.nvim")
|
||||
use("rafamadriz/friendly-snippets")
|
||||
use("jose-elias-alvarez/null-ls.nvim")
|
||||
use({
|
||||
|
|
Loading…
Reference in a new issue