fixed multiple language server issue
This commit is contained in:
parent
f71bcc84ec
commit
95d5e725e2
39
vim/init.vim
39
vim/init.vim
@ -24,9 +24,6 @@ noremap <Right> <Nop>
|
|||||||
nnoremap <SPACE> <Nop>
|
nnoremap <SPACE> <Nop>
|
||||||
let mapleader=" "
|
let mapleader=" "
|
||||||
|
|
||||||
" Grammarous keybindings
|
|
||||||
noremap <C-c> :GrammarousCheck<CR>
|
|
||||||
|
|
||||||
" Add key bindings for fuzzy finder
|
" Add key bindings for fuzzy finder
|
||||||
nnoremap <leader>pf <cmd>Telescope find_files<cr>
|
nnoremap <leader>pf <cmd>Telescope find_files<cr>
|
||||||
nnoremap <leader>pg <cmd>Telescope live_grep<cr>
|
nnoremap <leader>pg <cmd>Telescope live_grep<cr>
|
||||||
@ -38,9 +35,6 @@ call plug#begin('~/.vim/plugged')
|
|||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'nvim-lua/completion-nvim'
|
Plug 'nvim-lua/completion-nvim'
|
||||||
|
|
||||||
" Grammar checker
|
|
||||||
Plug 'rhysd/vim-grammarous'
|
|
||||||
|
|
||||||
" Nvim fuzzy finder
|
" Nvim fuzzy finder
|
||||||
Plug 'nvim-lua/popup.nvim'
|
Plug 'nvim-lua/popup.nvim'
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
@ -53,15 +47,36 @@ Plug 'morhetz/gruvbox'
|
|||||||
Plug 'ThePrimeagen/vim-be-good'
|
Plug 'ThePrimeagen/vim-be-good'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
" Set colorscheme
|
||||||
|
let g:gruvbox_contrast_dark = 'hard'
|
||||||
|
|
||||||
|
if exists('+termgicolors')
|
||||||
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||||
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||||
|
endif
|
||||||
|
|
||||||
|
colorscheme gruvbox
|
||||||
|
set background=dark
|
||||||
|
hi Normal guibg=NONE ctermbg=NONE
|
||||||
|
|
||||||
" Load the clangd server as the interpreter
|
" Load the clangd server as the interpreter
|
||||||
set completeopt=menuone,noinsert,noselect
|
set completeopt=menuone,noinsert,noselect
|
||||||
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
|
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
|
||||||
|
|
||||||
" Language server for nvim-lsp
|
" Language server for nvim-lsp
|
||||||
lua require'lspconfig'.clangd.setup{on_attach=require'completion'.on_attach}
|
|
||||||
"lua require'lspconfig'.pyls.setup{on_attach=require'completion'.on_attach}
|
|
||||||
|
|
||||||
" Set colorscheme
|
lua << EOF
|
||||||
colorscheme gruvbox
|
require'lspconfig'.clangd.setup{
|
||||||
set background=dark
|
on_attach=require'completion'.on_attach,
|
||||||
hi Normal guibg=NONE ctermbg=NONE
|
filetypes = {"c", "cpp", "objc", "objcpp"}
|
||||||
|
}
|
||||||
|
require'lspconfig'.pylsp.setup{
|
||||||
|
on_attach=require'completion'.on_attach,
|
||||||
|
cmd = {"pylsp"},
|
||||||
|
filetypes = {"python", "py"}
|
||||||
|
}
|
||||||
|
require'lspconfig'.tsserver.setup{
|
||||||
|
on_attach=require'completion'.on_attach,
|
||||||
|
root_dir = function() return vim.loop.cwd() end
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user