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/
|
ln -s $(PWD)/sub/alacritty/alacritty.yml ~/.config/alacritty/
|
||||||
|
|
||||||
nvim:
|
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)/sub/nvim ~/.config/nvim
|
||||||
ln -s $(PWD)/functions/vim_askpass_helper ~/.local/bin
|
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
|
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
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- 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
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
|||||||
@ -10,7 +10,7 @@ end
|
|||||||
local function set_keymap_base(key, cmd)
|
local function set_keymap_base(key, cmd)
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
local opts = { noremap = true, silent = true }
|
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)
|
map("n", keymap_keys, cmd, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user