From 641e247c34814a58f712f43ab834069c51bf5699 Mon Sep 17 00:00:00 2001 From: TheK4n Date: Mon, 23 Jan 2023 22:40:30 +0300 Subject: [PATCH] nvim lsp --- Makefile | 2 +- sub/nvim/after/plugin/lspconfig.lua | 2 +- sub/nvim/lua/base/keys/run-scripts.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 37145b1..42a76f0 100644 --- a/Makefile +++ b/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 diff --git a/sub/nvim/after/plugin/lspconfig.lua b/sub/nvim/after/plugin/lspconfig.lua index baa7c33..3373ebb 100644 --- a/sub/nvim/after/plugin/lspconfig.lua +++ b/sub/nvim/after/plugin/lspconfig.lua @@ -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, diff --git a/sub/nvim/lua/base/keys/run-scripts.lua b/sub/nvim/lua/base/keys/run-scripts.lua index da93e4d..d3282d0 100644 --- a/sub/nvim/lua/base/keys/run-scripts.lua +++ b/sub/nvim/lua/base/keys/run-scripts.lua @@ -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([[r%s]], key) + local keymap_keys = string.format([[r%s]], key) map("n", keymap_keys, cmd, opts) end