From be98cb961e59edd5e2ac33de43341943b1b312bb Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sun, 17 Oct 2021 22:31:06 -0500 Subject: [PATCH] a --- dot_config/alacritty/alacritty.yml | 2 +- dot_config/nvim/init.vim | 34 ++++-------------------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/dot_config/alacritty/alacritty.yml b/dot_config/alacritty/alacritty.yml index 3dad8a5..aa787ed 100644 --- a/dot_config/alacritty/alacritty.yml +++ b/dot_config/alacritty/alacritty.yml @@ -111,7 +111,7 @@ font: # - (macOS) Menlo # - (Linux/BSD) monospace # - (Windows) Consolas - family: "PragmataPro" + family: "PragmataPro Mono Liga" # The `style` can be specified to pick a specific face. #style: Regular diff --git a/dot_config/nvim/init.vim b/dot_config/nvim/init.vim index d9cffea..2fea434 100644 --- a/dot_config/nvim/init.vim +++ b/dot_config/nvim/init.vim @@ -88,6 +88,7 @@ nnoremap K lua vim.lsp.buf.hover() nnoremap lua vim.lsp.buf.signature_help() nnoremap k lua vim.lsp.diagnostic.goto_prev() nnoremap j lua vim.lsp.diagnostic.goto_next() +nnoremap a lua vim.lsp.buf.code_action() lua << EOF vim.o.completeopt = "menuone,noselect" @@ -132,38 +133,11 @@ lua << EOF end end - -- Use (s-)tab to: - --- move to prev/next item in completion menuone - --- jump to prev/next snippet's placeholder - _G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif vim.fn.call("vsnip#available", {1}) == 1 then - return t "(vsnip-expand-or-jump)" - elseif check_back_space() then - return t "" - else - return vim.fn['compe#complete']() - end - end - _G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then - return t "(vsnip-jump-prev)" - else - -- If is not working in your terminal, change it to - return t "" - end - end - - vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) - vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) - vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) - vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) - require'lspconfig'.rust_analyzer.setup{} require'lspconfig'.pyright.setup{} + require'lspconfig'.tsserver.setup{} + require'lspconfig'.vuels.setup{} + require'lspconfig'.clangd.setup{} EOF " vim: set sw=2 :