NERDTree improvements; more plugins

master
Jef Roosens 2020-10-23 09:45:55 +02:00
parent 07a5238bf9
commit bf31a4d23d
8 changed files with 64 additions and 15 deletions

View File

@ -0,0 +1,25 @@
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": [
"c",
"cpp",
"objc",
"objcpp"
],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
}
}
}

View File

@ -1,6 +1,6 @@
" Show a visual market at text width 80
setlocal colorcolumn=80
setlocal colorcolumn=81
" Auto-wrap lines
setlocal textwidth=79
setlocal textwidth=80

View File

@ -15,3 +15,7 @@ let g:maplocalleader = "\<tab>"
" Without the !, runtime only sources the first file in the list,
" instead of all
runtime! init/*.vim
" This sources a .vim/local.vim file in the current directory, if it exists.
" This allows for project-specific settings, such as on-write autocmd's etc.
silent! source .vim/local.vim

View File

@ -6,7 +6,7 @@ nnoremap <silent> <leader>gc :Gcommit<CR>
" Push
nnoremap <silent> <leader>gp :Gpush<CR>
" Show diffs
nnoremap <silent> <leader>gd :Gdiffsplit!<CR>
nnoremap <silent> <leader>gd :Gvdiffsplit!<CR>
" Easily resolve merges
nnoremap <silent> <leader>gh :diffget //2<CR>
nnoremap <silent> <leader>gl :diffget //3<CR>

View File

@ -1,3 +1,18 @@
let NERDTreeIgnore = ['\.vim$', '__pycache__', '\.pytest_cache', 'venv', '.*\.egg-info', 'dist', 'build', '\.eggs',
\ '.git']
" Vim
" Other IDEs
" Python
" Java
" Git
" Stack & Haskell
" CMake
" Non-text files
let NERDTreeIgnore = [
\ '^\.vim$',
\ '^\.vscode$', '.*\.code-workspace$', '^\.idea$',
\ '^__pycache__$', '^\.pytest_cache$', '^venv$', '\.egg-info$', '^dist$', '^build$', '^\.eggs$',
\ '^out$',
\ '^\.git$',
\ '^\.stack-work$', '\.lock$',
\ '^CMakeFiles$', '^CMakeCache.txt$',
\ '.pdf$']
let NERDTreeShowHidden = 1

View File

@ -6,7 +6,7 @@ call plug#begin('~/.config/nvim/plugged')
" definitions easily.
Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' }
" Fuzzy file search
" Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'ctrlpvim/ctrlp.vim'
" Git client within Vim
@ -38,4 +38,15 @@ Plug 'michaeljsmith/vim-indent-object'
Plug 'scrooloose/nerdtree'
" Toml syntax highlighting
Plug 'cespare/vim-toml'
" Auto-bracket pairs
Plug 'jiangmiao/auto-pairs'
" Auto-align text
Plug 'godlygeek/tabular'
Plug 'neovimhaskell/haskell-vim'
call plug#end()

View File

@ -3,7 +3,7 @@
" Without this, some colorschemes (including mine) don't work properly.
set termguicolors
" Set colorscheme
colorscheme flattened_dark
colorscheme tokyonight
" Line numbers
" I use the combination of absolute and relative line numbers. On the
@ -37,12 +37,6 @@ set smartcase
" Don't hightlight search results after search is finished
set nohlsearch
function SetDirs()
let filedir = expand('%:h')
let &l:directory = filedir . '/.vim/swap'
let &l:undodir = filedir . '/.vim/undo'
endfunction
" autocmd BufReadPre * call SetDirs()
" Turn on swap files
set swapfile

View File

@ -15,7 +15,7 @@ let g:tagbar_autoshowtag = 1
let g:no_status_line = 1
" Open tagbar when opening certain language types
autocmd BufNewFile,BufReadPre *.py,*.java,*.rs,*.cpp,*.c TagbarOpen
autocmd BufNewFile,BufReadPre *.py,*.java,*.rs,*.cpp,*.c,*.r TagbarOpen
" Explicitly close tagbar for these types
autocmd BufNewFile,BufReadPre *.md,*.vim,*.txt,*.yaml,*.yml,*.rst TagbarClose
autocmd BufNewFile,BufReadPre *.txt,*.rst TagbarClose