lsp fixes
This commit is contained in:
parent
e54fe9162c
commit
30ab66549f
|
@ -100,7 +100,6 @@ in
|
|||
videos = "${homeDir}/vid";
|
||||
};
|
||||
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
|
@ -158,18 +157,22 @@ in
|
|||
require('Comment').setup()
|
||||
local lspcfg = require('lspconfig')
|
||||
lspcfg.typst_lsp.setup({
|
||||
cmd = { '${pkgs.typst-lsp}/bin/typst-lsp' }
|
||||
cmd = { '${pkgs.typst-lsp}/bin/typst-lsp' },
|
||||
})
|
||||
lspcfg.hls.setup({
|
||||
cmd = { '${hls_wrapper}', 'lsp' }
|
||||
cmd = { '${hls_wrapper}', 'lsp' },
|
||||
})
|
||||
lspcfg.pyright.setup({
|
||||
cmd = { '${pkgs.nodePackages.pyright}/bin/pyright-langserver', '--stdio' }
|
||||
cmd = { '${pkgs.nodePackages.pyright}/bin/pyright-langserver', '--stdio' },
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(args)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf })
|
||||
local opts = { buffer = args.buf }
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', '<localleader>r', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set('n', '<localleader>a', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('i', '<C-n>', vim.lsp.omnifunc, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user