vim.cmd("runtime vimrc") if (vim.fn.has 'win32' == 1) then require'lspconfig'.powershell_es.setup{ bundle_path = os.getenv("LOCALAPPDATA") .. '\\PowerShellEditorServices', shell = 'powershell.exe', } else require'lspconfig'.powershell_es.setup{ bundle_path = os.getenv("HOME") .. '/opt/PowerShellEditorServices', } end require'lspconfig'.gopls.setup{} -- None of this should be needed from 0.11.0 (except maybe gd). do vim.keymap.set('n', 'gd', function() vim.lsp.buf.definition() end, { desc = 'vim.lsp.buf.definition()' }) vim.keymap.set('n', 'grn', function() vim.lsp.buf.rename() end, { desc = 'vim.lsp.buf.rename()' }) vim.keymap.set({ 'n', 'x' }, 'gra', function() vim.lsp.buf.code_action() end, { desc = 'vim.lsp.buf.code_action()' }) vim.keymap.set('n', 'grr', function() vim.lsp.buf.references() end, { desc = 'vim.lsp.buf.references()' }) vim.keymap.set('i', '', function() vim.lsp.buf.signature_help() end, { desc = 'vim.lsp.buf.signature_help()' }) end