Add neovim configs

This commit is contained in:
Anas Elgarhy 2022-03-10 20:09:54 +02:00
parent 7fddf0d31e
commit 6fcc0d6729
2 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,28 @@
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
},
"bash": {
"command": "bash-language-server",
"args": ["start"],
"filetypes": ["sh"]
},
"arduino":{
"command":"/path/to/arduino-language-server",
"rootPatterns":["*.ino"],
"filetypes":["arduino"],
"args":["-cli", "/path/to/arduino-cli", "-clangd", "/path/to/clangd", "-cli-config", "/path/to/arduino-cli.yaml"]
},
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
}

45
.config/nvim/init.vim Normal file
View file

@ -0,0 +1,45 @@
:set number
:set relativenumber
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set encoding=UTF-8
" Plugins
call plug#begin()
Plug 'https://github.com/wakatime/vim-wakatime' " wakatime plugin
Plug 'https://github.com/github/copilot.vim' " Copilot
Plug 'https://github.com/vim-scripts/Gist.vim' " Gits plugin
Plug 'https://github.com/folke/todo-comments.nvim' " Highlight todo comments
Plug 'https://github.com/tpope/vim-surround' " Surround
Plug 'https://github.com/tpope/vim-commentary' " Commenting gcc &gc
Plug 'https://github.com/preservim/nerdtree' " File tree
Plug 'https://github.com/preservim/tagbar' " Tagbar
Plug 'https://github.com/terryma/vim-multiple-cursors' " Multiple cursors
Plug 'https://github.com/vim-airline/vim-airline' " Status bar theme
call plug#end()
" NERDTree keybindings
nnoremap <C-f> :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-l> :call CocActionAsync('jumpDefinition')<CR>
" air-line
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" airline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ' LN '
let g:airline_symbols.colnr = ' CN '