This commit is contained in:
Michael Zhang 2021-10-17 22:31:06 -05:00
parent c2aa612b75
commit be98cb961e
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
2 changed files with 5 additions and 31 deletions

View file

@ -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

View file

@ -88,6 +88,7 @@ nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>
nnoremap <silent> <space>k <cmd>lua vim.lsp.diagnostic.goto_prev()<CR>
nnoremap <silent> <space>j <cmd>lua vim.lsp.diagnostic.goto_next()<CR>
nnoremap <silent> <space>a <cmd>lua vim.lsp.buf.code_action()<CR>
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 "<C-n>"
elseif vim.fn.call("vsnip#available", {1}) == 1 then
return t "<Plug>(vsnip-expand-or-jump)"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn['compe#complete']()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
return t "<Plug>(vsnip-jump-prev)"
else
-- If <S-Tab> is not working in your terminal, change it to <C-h>
return t "<S-Tab>"
end
end
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "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 :