add nerdtree, remove gutentags

This commit is contained in:
Thomas Ruoff
2021-04-15 22:28:54 +02:00
parent a28a0b824b
commit b3595b681f

View File

@@ -2,12 +2,16 @@
" author: Thomas Ruoff " author: Thomas Ruoff
" Basics {{{ " Basics {{{
set encoding=utf-8
set hidden set hidden
set ttyfast set ttyfast
set lazyredraw set lazyredraw
set updatetime=300 set updatetime=300
set synmaxcol=512 set synmaxcol=512
set modeline set modeline
set nobackup set nobackup
set noswapfile set noswapfile
@@ -20,6 +24,12 @@ set wildignore+=*.swp,*.bak,*.jpg,*.gif,*.png,*.git,
set splitright set splitright
set splitbelow set splitbelow
" Always show the status line
set laststatus=2
set cmdheight=2
set shortmess+=c
" yank delete change and put operations go by default in `"+` register " yank delete change and put operations go by default in `"+` register
" so in the systems clipboard accessable by CTRL-V on all OS types " so in the systems clipboard accessable by CTRL-V on all OS types
if has('mac') if has('mac')
@@ -103,38 +113,58 @@ Plug 'tpope/vim-projectionist'
Plug 'mbbill/undotree' Plug 'mbbill/undotree'
nnoremap <leader>u :UndotreeToggle<cr> nnoremap <leader>u :UndotreeToggle<cr>
Plug 'w0rp/ale'
nmap <silent> [a <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)
let g:ale_linters = {}
let g:ale_linters.javascript = ['eslint']
let g:ale_fixers = {}
let g:ale_fixers.javascript = ['eslint']
let g:ale_fix_on_save = 1
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Remap keys for gotos " Remap keys for gotos
nmap <silent> gd <Plug>(coc-definition) nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition) nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation) nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references) nmap <silent> gr <Plug>(coc-references)
" Use `[c` and `]c` to navigate diagnostics
" Use `[d` and `]d` to navigate diagnostics
nmap <silent> [d <Plug>(coc-diagnostic-prev) nmap <silent> [d <Plug>(coc-diagnostic-prev)
nmap <silent> ]d <Plug>(coc-diagnostic-next) nmap <silent> ]d <Plug>(coc-diagnostic-next)
" Remap for rename current word " Remap for rename current word
nmap <leader>rn <Plug>(coc-rename) nmap <leader>rn <Plug>(coc-rename)
" Remap for do codeAction of current line " Remap for do codeAction of current line
nmap <leader>ac <Plug>(coc-codeaction) nmap <leader>ac <Plug>(coc-codeaction)
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Fix autofix problem of current line " Fix autofix problem of current line
nmap <leader>qf <Plug>(coc-fix-current) nmap <leader>qf <Plug>(coc-fix-current)
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
Plug 'itchyny/lightline.vim' Plug 'itchyny/lightline.vim'
if filereadable(expand("~/.vim/lightline.vim")) if filereadable(expand("~/.vim/lightline.vim"))
source ~/.vim/lightline.vim source ~/.vim/lightline.vim
augroup ale-statusline
autocmd!
autocmd User ALELint call lightline#update()
augroup END
endif endif
function! LightlineReload() function! LightlineReload()
@@ -167,17 +197,18 @@ Plug 'janko-m/vim-test'
let test#strategy = "vimterminal" let test#strategy = "vimterminal"
" vim 8 plugins " vim 8 plugins
if v:version >= 800 " if v:version >= 800
Plug 'ludovicchabant/vim-gutentags' " Plug 'ludovicchabant/vim-gutentags'
let g:gutentags_cache_dir="~/.tags" " let g:gutentags_cache_dir="~/.tags"
let g:gutentags_file_list_command = { " let g:gutentags_file_list_command = {
\ 'markers': { " \ 'markers': {
\ '.git': 'git ls-files', " \ '.git': 'git ls-files',
\ '.hg': 'hg files', " \ '.hg': 'hg files',
\ }, " \ },
\ } " \ }
endif " endif
Plug 'preservim/nerdtree'
" debug " debug
Plug 'tweekmonster/startuptime.vim' Plug 'tweekmonster/startuptime.vim'