nvim/init.lua

38 lines
1.1 KiB
Lua
Raw Normal View History

2024-01-26 11:13:12 +00:00
vim.cmd("runtime vimrc")
2024-11-06 09:53:41 +00:00
2024-11-08 11:15:50 +00:00
if (vim.fn.has 'win32' == 1) then
2024-11-08 11:00:19 +00:00
require'lspconfig'.powershell_es.setup{
bundle_path = os.getenv("LOCALAPPDATA") .. '\\PowerShellEditorServices',
2024-11-08 11:11:15 +00:00
shell = 'powershell.exe',
2024-11-08 11:00:19 +00:00
}
else
require'lspconfig'.powershell_es.setup{
bundle_path = os.getenv("HOME") .. '/opt/PowerShellEditorServices',
}
end
2024-11-09 20:48:25 +00:00
require'lspconfig'.gopls.setup{}
2024-12-04 11:57:12 +00:00
2024-12-04 13:05:49 +00:00
-- 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', '<C-S>', function()
vim.lsp.buf.signature_help()
end, { desc = 'vim.lsp.buf.signature_help()' })
end