2023-08-27 18:22:29 +00:00
|
|
|
return {
|
|
|
|
"fatih/vim-go",
|
|
|
|
lazy = false,
|
|
|
|
keys = {},
|
|
|
|
config = function ()
|
|
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
|
|
pattern = 'go',
|
|
|
|
callback = function ()
|
|
|
|
vim.keymap.set('n', '<leader>err', '<Plug>(go-iferr)')
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
local g = vim.g
|
|
|
|
|
|
|
|
g.go_fmt_fail_silently = 1
|
|
|
|
g.go_fmt_command = "goimports"
|
2024-06-25 16:25:23 +00:00
|
|
|
g.go_def_mode = 'gopls'
|
2023-08-27 18:22:29 +00:00
|
|
|
g.go_decls_includes = "func,type"
|
|
|
|
g.go_highlight_types = 1
|
|
|
|
g.go_highlight_fields = 1
|
|
|
|
g.go_highlight_functions = 1
|
|
|
|
g.go_highlight_function_calls = 1
|
|
|
|
g.go_highlight_operators = 1
|
|
|
|
g.go_highlight_extra_types = 1
|
|
|
|
end
|
|
|
|
}
|