a
This commit is contained in:
parent
c2aa612b75
commit
be98cb961e
2 changed files with 5 additions and 31 deletions
|
@ -111,7 +111,7 @@ font:
|
||||||
# - (macOS) Menlo
|
# - (macOS) Menlo
|
||||||
# - (Linux/BSD) monospace
|
# - (Linux/BSD) monospace
|
||||||
# - (Windows) Consolas
|
# - (Windows) Consolas
|
||||||
family: "PragmataPro"
|
family: "PragmataPro Mono Liga"
|
||||||
|
|
||||||
# The `style` can be specified to pick a specific face.
|
# The `style` can be specified to pick a specific face.
|
||||||
#style: Regular
|
#style: Regular
|
||||||
|
|
|
@ -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> <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>k <cmd>lua vim.lsp.diagnostic.goto_prev()<CR>
|
||||||
nnoremap <silent> <space>j <cmd>lua vim.lsp.diagnostic.goto_next()<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
|
lua << EOF
|
||||||
vim.o.completeopt = "menuone,noselect"
|
vim.o.completeopt = "menuone,noselect"
|
||||||
|
@ -132,38 +133,11 @@ lua << EOF
|
||||||
end
|
end
|
||||||
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'.rust_analyzer.setup{}
|
||||||
require'lspconfig'.pyright.setup{}
|
require'lspconfig'.pyright.setup{}
|
||||||
|
require'lspconfig'.tsserver.setup{}
|
||||||
|
require'lspconfig'.vuels.setup{}
|
||||||
|
require'lspconfig'.clangd.setup{}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
" vim: set sw=2 :
|
" vim: set sw=2 :
|
||||||
|
|
Loading…
Reference in a new issue