chore(lazy): add gopls settings
Add gopls settings to lazy.nvim configuration.
This commit is contained in:
parent
7237693bdb
commit
297c0c65f4
58
init.lua
58
init.lua
|
@ -634,7 +634,48 @@ require('lazy').setup({
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
gopls = {
|
||||||
|
gofumpt = true,
|
||||||
|
codelenses = {
|
||||||
|
gc_details = true,
|
||||||
|
generate = true,
|
||||||
|
upgrade_dependency = true,
|
||||||
|
regenerate_cgo = true,
|
||||||
|
run_govulncheck = true,
|
||||||
|
test = true,
|
||||||
|
tidy = true,
|
||||||
|
tidy = true,
|
||||||
|
vendor = true,
|
||||||
|
},
|
||||||
|
hints = {
|
||||||
|
assignVariableTypes = true,
|
||||||
|
compositeLiteralFields = true,
|
||||||
|
compositeLiteralTypes = true,
|
||||||
|
constantValues = true,
|
||||||
|
functionTypeParameters = true,
|
||||||
|
parameterNames = true,
|
||||||
|
rangeVariableTypes = true,
|
||||||
|
},
|
||||||
|
analyses = {
|
||||||
|
fieldalignment = true,
|
||||||
|
nilness = true,
|
||||||
|
unusedparams = true,
|
||||||
|
unsedwrite = true,
|
||||||
|
useany = true,
|
||||||
|
},
|
||||||
|
usePlaceholders = true,
|
||||||
|
completeUnimported = true,
|
||||||
|
staticcheck = true,
|
||||||
|
directoryFilters = {
|
||||||
|
'-.git',
|
||||||
|
'-.vscode',
|
||||||
|
'-.idea',
|
||||||
|
'-.vscode-test',
|
||||||
|
'-node_modules',
|
||||||
|
'-vendor',
|
||||||
|
},
|
||||||
|
semanticTokens = true,
|
||||||
|
},
|
||||||
pyright = {
|
pyright = {
|
||||||
capabilities = {
|
capabilities = {
|
||||||
textDocument = {
|
textDocument = {
|
||||||
|
@ -704,13 +745,19 @@ require('lazy').setup({
|
||||||
'bicep-lsp',
|
'bicep-lsp',
|
||||||
'black',
|
'black',
|
||||||
'debugpy',
|
'debugpy',
|
||||||
|
'delve',
|
||||||
'docker-compose-language-service',
|
'docker-compose-language-service',
|
||||||
'dockerfile-language-server',
|
'dockerfile-language-server',
|
||||||
'eslint-lsp',
|
'eslint-lsp',
|
||||||
'flake8',
|
'flake8',
|
||||||
|
'gofumpt',
|
||||||
|
'goimports',
|
||||||
|
'gomodifytags',
|
||||||
|
'gopls',
|
||||||
'hclfmt',
|
'hclfmt',
|
||||||
'helm-ls',
|
'helm-ls',
|
||||||
'html-lsp',
|
'html-lsp',
|
||||||
|
'impl',
|
||||||
'isort',
|
'isort',
|
||||||
'jedi-language-server',
|
'jedi-language-server',
|
||||||
'jq',
|
'jq',
|
||||||
|
@ -778,6 +825,7 @@ require('lazy').setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
bash = { 'shellcheck' },
|
bash = { 'shellcheck' },
|
||||||
hcl = { 'fmt' },
|
hcl = { 'fmt' },
|
||||||
|
go = { 'goimports', 'gofumpt' },
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
python = { 'isort', 'black' },
|
python = { 'isort', 'black' },
|
||||||
|
@ -977,6 +1025,10 @@ require('lazy').setup({
|
||||||
'c',
|
'c',
|
||||||
'diff',
|
'diff',
|
||||||
'dockerfile',
|
'dockerfile',
|
||||||
|
'go',
|
||||||
|
'gomod',
|
||||||
|
'gosum',
|
||||||
|
'gowork',
|
||||||
'hcl',
|
'hcl',
|
||||||
'helm',
|
'helm',
|
||||||
'html',
|
'html',
|
||||||
|
@ -1055,5 +1107,9 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Better copy-paste between vim and system clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<C-c>', '"+y', { noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap('n', '<C-v>', '"+p', { noremap = true, silent = true })
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
Loading…
Reference in New Issue