vim plugs
This commit is contained in:
parent
35d0df8982
commit
0277e14e22
|
@ -1,5 +1,12 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhistcnt =3
|
||||
let g:netrw_dirhistcnt =0
|
||||
let g:netrw_dirhist_0='/home/naiji/Code/code-snippets/cpp'
|
||||
let g:netrw_dirhist_9='/home/naiji/Code/fediverse-bots/morrowsay-bot'
|
||||
let g:netrw_dirhist_8='/home/naiji/Code/code-snippets/cpp'
|
||||
let g:netrw_dirhist_7='/home/naiji/Code/fediverse-bots/morrowsay-bot'
|
||||
let g:netrw_dirhist_6='/home/naiji/Code/selfprivacy/selfprivacy.org.app'
|
||||
let g:netrw_dirhist_5='/home/naiji'
|
||||
let g:netrw_dirhist_4='/home/naiji/.config/vim'
|
||||
let g:netrw_dirhist_3='/home/naiji/Code/code-snippets/shell'
|
||||
let g:netrw_dirhist_2='/home/naiji/Code/code-snippets'
|
||||
let g:netrw_dirhist_1='/home/naiji/Code/code-snippets/c'
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
colorscheme ron
|
||||
set viminfo+=n~/.config/vim/viminfo
|
||||
set omnifunc=syntaxcomplete#Complete
|
||||
set gp=git\ grep\ -n
|
||||
set relativenumber number
|
||||
set clipboard+=unnamedplus
|
||||
set wildmenu
|
||||
set hidden
|
||||
|
||||
filetype plugin on
|
||||
syntax on
|
||||
|
||||
inoremap jj <Esc>
|
||||
noremap <Up> <Nop>
|
||||
noremap <Down> <Nop>
|
||||
noremap <Left> <Nop>
|
||||
|
@ -7,3 +19,52 @@ inoremap <Up> <Nop>
|
|||
inoremap <Down> <Nop>
|
||||
inoremap <Left> <Nop>
|
||||
inoremap <Right> <Nop>
|
||||
|
||||
call plug#begin()
|
||||
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
call plug#end()
|
||||
|
||||
if executable('pylsp')
|
||||
" pip install python-lsp-server
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'pylsp',
|
||||
\ 'cmd': {server_info->['pylsp']},
|
||||
\ 'allowlist': ['python'],
|
||||
\ })
|
||||
endif
|
||||
|
||||
function! s:on_lsp_buffer_enabled() abort
|
||||
setlocal omnifunc=lsp#complete
|
||||
setlocal signcolumn=yes
|
||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||
nmap <buffer> gd <plug>(lsp-definition)
|
||||
nmap <buffer> gs <plug>(lsp-document-symbol-search)
|
||||
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
|
||||
nmap <buffer> gr <plug>(lsp-references)
|
||||
nmap <buffer> gi <plug>(lsp-implementation)
|
||||
nmap <buffer> gt <plug>(lsp-type-definition)
|
||||
nmap <buffer> <leader>rn <plug>(lsp-rename)
|
||||
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
|
||||
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
|
||||
nmap <buffer> K <plug>(lsp-hover)
|
||||
nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
|
||||
nnoremap <buffer> <expr><c-d> lsp#scroll(-4)
|
||||
|
||||
let g:lsp_format_sync_timeout = 1000
|
||||
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
|
||||
|
||||
" refer to doc to add more commands
|
||||
endfunction
|
||||
|
||||
augroup lsp_install
|
||||
au!
|
||||
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
augroup END
|
||||
|
||||
let g:lsp_diagnostics_echo_cursor = 1
|
||||
let g:ale_completion_enabled = 1
|
||||
let g:ale_lsp_suggestions = 1
|
||||
|
|
|
@ -106,4 +106,6 @@ Videos/
|
|||
.local/share/vulkan/
|
||||
.local/share/zathura/
|
||||
.local/share/Mumble/
|
||||
.config/vim/autoload/
|
||||
.config/vim/plugged/
|
||||
Monero/
|
||||
|
|
Loading…
Reference in New Issue