return { { "neovim/nvim-lspconfig", dependencies = { "hrsh7th/nvim-cmp", -- Autocompletion "hrsh7th/cmp-nvim-lsp", }, config = function() local lspconfig = require("lspconfig") local cmp_nvim_lsp = require("cmp_nvim_lsp") local capabilities = cmp_nvim_lsp.default_capabilities() lspconfig.gopls.setup { cmd = { "gopls" }, filetypes = { "go", "gomod", "gowork", "gotmpl" }, root_dir = lspconfig.util.root_pattern("go.work", "go.mod", ".git"), settings = { gopls = { analyses = { unusedparams = true, }, staticcheck = true, }, }, capabilities = capabilities, -- Autocomplete-Unterstützung } end, }, { "hrsh7th/nvim-cmp", config = function() local cmp = require("cmp") cmp.setup { mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.complete(), }), sources = { { name = 'nvim_lsp' }, }, } end } }