diff --git a/nvim/.config/nvim/.netrwhist b/nvim/.config/nvim/.netrwhist deleted file mode 100644 index 95aca8e..0000000 --- a/nvim/.config/nvim/.netrwhist +++ /dev/null @@ -1,3 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhist_cnt =1 -let g:netrw_dirhist_1='/home/tim/Projects/cpp/plugin_lexer_parser/.flint/build/linux/debug/generated/lang-parser' diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index f2c5c40..1a4c931 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -11,6 +11,10 @@ call plug#begin('~/.dotfiles/nvim/.config/nvim/plugged') Plug 'milkypostman/vim-togglelist' Plug 'moll/vim-bbye' Plug 'junegunn/fzf', {'do': './install --bin'} + Plug 'junegunn/fzf.vim' + Plug 'tpope/vim-fugitive' + " @todo Is this really usefull + Plug 'ConradIrwin/vim-bracketed-paste' Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/vim-lsp' @@ -19,7 +23,10 @@ call plug#begin('~/.dotfiles/nvim/.config/nvim/plugged') Plug 'prabirshrestha/asyncomplete-buffer.vim' Plug 'prabirshrestha/asyncomplete-file.vim' Plug 'wellle/tmux-complete.vim' - " Plug 'OmniSharp/omnisharp-vim' + + " @todo Figure out how to integrate this with flint + " Plug 'Shougo/vimproc.vim', {'do' : 'make'} + " Plug 'idanarye/vim-vebugger' Plug 'digitaltoad/vim-pug' Plug 'tikhomirov/vim-glsl' @@ -40,15 +47,23 @@ set t_ZH= set t_ZR= set background=dark -set list lcs=tab:\|\ +" Ident +set list lcs=tab:┃\ ,trail:· -" Powerline +" Airline let g:airline_powerline_fonts = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline_theme='gruvbox' let g:airline_section_z = '%3p%% %#__accent_bold#%4l%#__restore__#%#__accent_bold#/%L%#__restore__# :%3v' let g:airline_section_warning = '' +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif + +let g:airline_symbols.dirty = " ⚡" +let g:airline_symbols.notexists = " ╳" + " NERDTree autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif @@ -63,6 +78,7 @@ set tabstop=4 set shiftwidth=4 set noexpandtab set mouse=n +set hidden " Setup custom syntax au BufRead,BufNewFile *.lang setfiletype lang @@ -80,44 +96,21 @@ map 10j map 10k map :Bdelete map :call ToggleQuickfixList() +map :noh -map N :LspNextError -map P :LspPreviousError -map n :cnext -map p :cprevious +map e :LspNextError +map E :LspPreviousError +map n :cnext +map N :cprevious +map b :Buffers +map c :Commits +map f :Ag inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" imap (asyncomplete_force_refresh) -" Fold in functions -fu! CustomFoldText() - "get first non-blank line - let fs = v:foldstart - while getline(fs) =~ '^\s*$' | let fs = nextnonblank(fs + 1) - endwhile - if fs > v:foldend - let line = getline(v:foldstart) - else - let line = substitute(getline(fs), '\t', repeat(' ', &tabstop), 'g') - endif - - let w = winwidth(0) - &foldcolumn - (&number ? 8 : 0) - let foldSize = 1 + v:foldend - v:foldstart - let foldSizeStr = " " . foldSize . " lines " - let foldLevelStr = repeat("+--", v:foldlevel) - let lineCount = line("$") - let foldPercentage = printf("[%.1f", (foldSize*1.0)/lineCount*100) . "%] " - let expansionString = repeat(".", w - strwidth(foldSizeStr.line.foldLevelStr.foldPercentage)) - return line . expansionString . foldSizeStr . foldPercentage . foldLevelStr -endf - -set foldtext=CustomFoldText() -set foldcolumn=1 -au BufRead *.cpp,*.h,*.go,*.js setlocal foldmethod=syntax -au BufRead *.cpp,*.h,*.go,*.js setlocal foldnestmax=2 - " Use fzf and silver searcher to search files (REQUIRES: the_silver_searcher) if executable('ag') map :call fzf#run(fzf#wrap('custom', {'source': 'ag -g ""'}, 0)) @@ -138,6 +131,10 @@ let g:fzf_colors = \ 'spinner': ['fg', 'Label'], \ 'header': ['fg', 'Comment'] } +autocmd! FileType fzf +autocmd FileType fzf set laststatus=0 noshowmode noruler + \| autocmd BufLeave set laststatus=2 showmode ruler + " vim-lsp if executable('clangd') au User lsp_setup call lsp#register_server({ @@ -183,6 +180,7 @@ call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options \ 'completor': function('asyncomplete#sources#buffer#completor'), \ })) +" @todo This currentyly does not work au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({ \ 'name': 'file', \ 'whitelist': ['*'], diff --git a/zsh/agnoster.zsh-theme b/zsh/agnoster.zsh-theme index a7b45ca..d069397 100644 --- a/zsh/agnoster.zsh-theme +++ b/zsh/agnoster.zsh-theme @@ -32,10 +32,10 @@ fi # Characters SEGMENT_SEPARATOR="\ue0b0" -PLUSMINUS="\uf067" +PLUSMINUS="\u26a1" BRANCH="\ue0a0" DETACHED="\u27a6" -CROSS="\u2718" +CROSS="\u2573" LIGHTNING="\u26a1" GEAR="\u2699"