nvim lsp
This commit is contained in:
parent
cb848505ba
commit
641e247c34
2
Makefile
2
Makefile
@ -37,7 +37,7 @@ alacritty:
|
||||
ln -s $(PWD)/sub/alacritty/alacritty.yml ~/.config/alacritty/
|
||||
|
||||
nvim:
|
||||
@echo "sudo pacman -S npm ctags fzf glow; mkdir ~/.npm-global; npm config set prefix '~/.npm-global'; npm install -g pyright"
|
||||
@echo "sudo pacman -S npm ctags fzf glow; mkdir ~/.npm-global; npm config set prefix '~/.npm-global'"
|
||||
ln -s $(PWD)/sub/nvim ~/.config/nvim
|
||||
ln -s $(PWD)/functions/vim_askpass_helper ~/.local/bin
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
|
||||
@ -39,7 +39,7 @@ end
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = { 'pyright' }
|
||||
local servers = { 'pyright', 'sumneko_lua', 'rust_analyzer' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
|
||||
@ -10,7 +10,7 @@ end
|
||||
local function set_keymap_base(key, cmd)
|
||||
local map = vim.keymap.set
|
||||
local opts = { noremap = true, silent = true }
|
||||
keymap_keys = string.format([[<Leader>r%s]], key)
|
||||
local keymap_keys = string.format([[<Leader>r%s]], key)
|
||||
map("n", keymap_keys, cmd, opts)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user