diff --git a/.gitmodules b/.gitmodules index 5c474ded..b1581032 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,9 +25,6 @@ [submodule "lib/vim/vim-repeat"] path = lib/vim/vim-repeat url = git://github.com/tpope/vim-repeat.git -[submodule "lib/vim/syntastic"] - path = lib/vim/syntastic - url = https://github.com/scrooloose/syntastic [submodule "lib/vim/vim-rooter"] path = lib/vim/vim-rooter url = https://github.com/airblade/vim-rooter @@ -97,6 +94,10 @@ [submodule "lib/vim/deoplete.nvim"] path = lib/vim/deoplete.nvim url = https://github.com/Shougo/deoplete.nvim -[submodule "lib/shell/clipmenu"] - path = lib/shell/clipmenu - url = https://github.com/cdown/clipmenu/ +[submodule "lib/linux/clipmenu"] + path = lib/linux/clipmenu + url = https://github.com/cdown/clipmenu/ + branch = develop +[submodule "lib/vim/neomake"] + path = lib/vim/neomake + url = https://github.com/neomake/neomake diff --git a/README.md b/README.md index 08a67b72..32351fcc 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ because most of the time I just cannot make up my mind, and I change my decision ## Optional requirements -* zsh - Zsh is awesome. I was using bash, but then switched to zsh, and it is pretty much compatible with all bash stuff +* [zsh](http://www.zsh.org/) - Zsh is awesome. I was using bash, but then switched to zsh, and it is pretty much compatible with all bash stuff and it is also faster and nicer. * [tmux](https://tmux.github.io/) - Terminal multiplexer. Awesome stuff, but I find myself to use it less and less, because I started using tiling window manager's features more. But still, tmux is really awesome, and have some great features what screen do not have. I have some really nice Tmux stuff in my repository, so feel free to try it, maybe you will like it. -* [vim](http://www.vim.org/download.php/) - Required for Vim stuff (of course). Needs to be installed with python +* [neovim](https://neovim.io/) - Required for Vim stuff (of course). Needs to be installed with python support for all plugins to work correctly. If you are just starting with Vim, then I recommend you to run `vimtutor` from your CLI. Thank me later. * [Firefox](https://www.mozilla.org/en-US/firefox/new/) - The only browser I found that can be properly styled to my @@ -104,22 +104,24 @@ git clone https://github.com/ervandew/supertab.git $DOTHOME/usr/vim/supertab ## Included stuff ### Shell - * [zim](https://github.com/Eriner/zim): ZIM - Zsh IMproved - * [fzf](https://github.com/junegunn/fzf): A command-line fuzzy finder written in Go * [base-16-shell](https://github.com/chriskempson/base16-shell): A shell script to change your shell's default ANSI colors but most importantly, colors 17 to 21 of your shell's 256 colorspace (if supported by your terminal) + * [fzf](https://github.com/junegunn/fzf): A command-line fuzzy finder written in Go + * [zim](https://github.com/Eriner/zim): ZIM - Zsh IMproved ### Vim * [base16-vim](https://github.com/chriskempson/base16-vim): Base16 for Vim * [bclose.vim](https://github.com/chrismccord/bclose.vim): Delete a buffer without closing the window + * [deoplete.nvim](https://github.com/Shougo/deoplete.nvim): 🌠 Dark powered asynchronous completion framework for neovim * [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): EditorConfig plugin for Vim * [fzf.vim](https://github.com/junegunn/fzf.vim): fzf :heart: vim + * [neomake](https://github.com/neomake/neomake): Asynchronous linting and make framework for Neovim/Vim * [pathogen.vim](https://github.com/tpope/vim-pathogen): Manage your runtimepath * [supertab](https://github.com/ervandew/supertab): Perform all your vim insert mode completions with Tab - * [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim * [ultisnips](https://github.com/SirVer/ultisnips): The ultimate snippet solution for Vim * [vim-commentary](https://github.com/tpope/vim-commentary): comment stuff out * [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal * [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags): A Vim plugin that manages your tag files + * [vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2): Updated javacomplete plugin for vim * [vim-obsession](https://github.com/tpope/vim-obsession): continuously updated session files * [vim-repeat](https://github.com/tpope/vim-repeat): enable repeating supported plugin maps with "." * [vim-rooter](https://github.com/airblade/vim-rooter): Changes Vim working directory to project root (identified by presence of known directory or file) diff --git a/config/sxhkdrc b/config/sxhkdrc index ab350e1a..8c9ee792 100644 --- a/config/sxhkdrc +++ b/config/sxhkdrc @@ -12,7 +12,7 @@ super + space # clipboard manager super + c - $DOTHOME/lib/shell/clipmenu/clipmenu -i -l 10 -p "clip >" -b -fn Terminus:size=12 + $DOTHOME/lib/linux/clipmenu/clipmenu -i -l 10 -p "clip >" -b -fn Terminus:size=12 # make sxhkd reload its configuration files: super + Escape diff --git a/config/vimrc b/config/vimrc index 4104642e..3d1fa501 100644 --- a/config/vimrc +++ b/config/vimrc @@ -7,16 +7,12 @@ " ╚═══╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ " General {{{ + " Reset all auto commands augroup VimRc autocmd! augroup END - " With a map leader it's possible to do extra key combinations - let mapleader = ' ' - let maplocalleader = ' ' - let g:mapleader = ' ' - " Sets how many lines of history VIM has to remember set history=200 @@ -35,7 +31,7 @@ " Turn backup off, since most stuff is in SVN, git et.c anyway... set nobackup - set nowb + set nowritebackup set noswapfile " Turn persistent undo on @@ -142,7 +138,7 @@ set noerrorbells set novisualbell set t_vb= - set tm=500 + set timeoutlen=500 " Open new split panes to right and bottom, which feels more natural set splitbelow @@ -175,21 +171,6 @@ " Automatically rebalance windows on vim resize autocmd VimRc VimResized * :wincmd = - " Enable omni completion. (Ctrl-X Ctrl-O) - autocmd VimRc FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags - autocmd VimRc FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS - autocmd VimRc FileType python setlocal omnifunc=pythoncomplete#Complete - autocmd VimRc FileType xml setlocal omnifunc=xmlcomplete#CompleteTags - autocmd VimRc FileType css set omnifunc=csscomplete#CompleteCSS - autocmd VimRc FileType c set omnifunc=ccomplete#Complete - autocmd VimRc FileType java set omnifunc=javacomplete#Complete - - " use syntax complete if nothing else available - autocmd VimRc Filetype * - \ if &omnifunc == "" | - \ setlocal omnifunc=syntaxcomplete#Complete | - \ endif - " }}} " Colors and Fonts {{{ @@ -207,15 +188,32 @@ set encoding=utf8 " Use Unix as the standard file type - set ffs=unix,dos,mac + set fileformats=unix,dos,mac " Limit horizontal and vertical syntax rendering syntax sync minlines=256 set synmaxcol=256 - " Highlight 121th character in line - autocmd VimRc BufEnter * highlight ColorColumn ctermbg=darkred ctermfg=white - autocmd VimRc BufEnter * call matchadd('ColorColumn', '\%121v', 100) "set column nr + " Adjust syntax highlighting + autocmd VimRc BufEnter * call AdjustHighlighting() + function! AdjustHighlighting() + " Make all these colors less annoying + highlight clear LineNr + highlight clear SignColumn + highlight clear FoldColumn + highlight Search cterm=NONE ctermfg=0 ctermbg=3 + highlight StatusLine ctermbg=NONE ctermfg=4 + highlight StatusLineNC cterm=underline ctermbg=NONE ctermfg=19 + highlight VertSplit ctermbg=NONE ctermfg=19 + highlight Title ctermfg=19 + highlight TabLineSel ctermbg=NONE ctermfg=4 + highlight TabLineFill ctermbg=NONE ctermfg=19 + highlight TabLine ctermbg=NONE ctermfg=19 + + " Highlight 121th character in line + highlight ColorColumn ctermbg=darkred ctermfg=white + call matchadd('ColorColumn', '\%121v', 100) "set column nr + endfunction " }}} @@ -262,6 +260,21 @@ \ exe "normal! g`\"" | \ endif + " Enable omni completion. (Ctrl-X Ctrl-O) + autocmd VimRc FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags + autocmd VimRc FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS + autocmd VimRc FileType python setlocal omnifunc=pythoncomplete#Complete + autocmd VimRc FileType xml setlocal omnifunc=xmlcomplete#CompleteTags + autocmd VimRc FileType css set omnifunc=csscomplete#CompleteCSS + autocmd VimRc FileType c set omnifunc=ccomplete#Complete + autocmd VimRc FileType java set omnifunc=javacomplete#Complete + + " use syntax complete if nothing else available + autocmd VimRc Filetype * + \ if &omnifunc == "" | + \ setlocal omnifunc=syntaxcomplete#Complete | + \ endif + " }}} " GUI related {{{ @@ -285,15 +298,15 @@ " Set font according to system if has('mac') || has('macunix') - set gfn=Terminus:h12,Source\ Code\ Pro:h12,Menlo:h12 + set guifont=Terminus:h12,Source\ Code\ Pro:h12,Menlo:h12 elseif has('win16') || has('win32') - set gfn=Terminus:h12,Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11 + set guifont=Terminus:h12,Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11 elseif has('gui_gtk2') - set gfn=Terminus\ 12,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 + set guifont=Terminus\ 12,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 elseif has('linux') - set gfn=Terminus\ 12,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 + set guifont=Terminus\ 12,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 elseif has('unix') - set gfn=Monospace\ 11 + set guifont=Monospace\ 11 endif endif @@ -301,6 +314,11 @@ " Mappings {{{ + " With a map leader it's possible to do extra key combinations + let mapleader = ' ' + let maplocalleader = ' ' + let g:mapleader = ' ' + " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd @@ -397,27 +415,9 @@ endtry endif - " Fix some things - hi clear LineNr - hi clear SignColumn - hi clear FoldColumn - hi Search cterm=NONE ctermfg=0 ctermbg=3 - hi StatusLine ctermbg=NONE ctermfg=4 - hi StatusLineNC cterm=underline ctermbg=NONE ctermfg=19 - hi VertSplit ctermbg=NONE ctermfg=19 - hi Title ctermfg=19 - hi TabLineSel ctermbg=NONE ctermfg=4 - hi TabLineFill ctermbg=NONE ctermfg=19 - hi TabLine ctermbg=NONE ctermfg=19 - " VimWiki let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] - " syntastic - let g:syntastic_always_populate_loc_list = 1 - let g:syntastic_vim_checkers = ['vint'] - set statusline+=%#warningmsg#%{SyntasticStatuslineFlag()}%* - " EditorConfig let g:EditorConfig_core_mode = 'external_command' " Speed up editorconfig plugin let g:EditorConfig_exclude_patterns = ['fugitive://.*'] " Fix EditorConfig for fugitive @@ -438,6 +438,19 @@ call deoplete#enable() endif + " Neomake + autocmd VimRc BufWritePost * Neomake + set statusline+=\ %#ErrorMsg#%{neomake#statusline#LoclistStatus('loc:\ ')} + set statusline+=\ %#ErrorMsg#%{neomake#statusline#QflistStatus('qf:\ ')} + + " Yang + let g:neomake_yang_enabled_makers = [ 'pyang' ] + let g:neomake_yang_pyang_maker = { + \ 'errorformat': + \ '%f:%l: %trror: %m,' . + \ '%f:%l: %tarning: %m,' + \ } + " Java autocmd VimRc FileType java :call EnableJava() function! EnableJava() diff --git a/install.conf.yaml b/install.conf.yaml index 73e4e468..7712b6d4 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -13,7 +13,7 @@ - git submodule update --init --recursive - Initializing submodules - - - git submodule foreach git pull origin master + - git submodule update --recursive --remote - Updating submodules - - mkdir -p usr/bin ; mkdir -p usr/vim ; mkdir -p ~/.vim/undodir diff --git a/lib/shell/clipmenu b/lib/linux/clipmenu similarity index 100% rename from lib/shell/clipmenu rename to lib/linux/clipmenu diff --git a/lib/vim/deoplete.nvim b/lib/vim/deoplete.nvim index 86c7d58f..d73e85e2 160000 --- a/lib/vim/deoplete.nvim +++ b/lib/vim/deoplete.nvim @@ -1 +1 @@ -Subproject commit 86c7d58f6f8ffba52648fd033b78f2cb63e1cc26 +Subproject commit d73e85e21e1c4987ff8004cfca6786b3c3cd5779 diff --git a/lib/vim/neomake b/lib/vim/neomake new file mode 160000 index 00000000..8f6aba35 --- /dev/null +++ b/lib/vim/neomake @@ -0,0 +1 @@ +Subproject commit 8f6aba3531c81a3d3d291721f7515f8efa2e59f8 diff --git a/lib/vim/syntastic b/lib/vim/syntastic deleted file mode 160000 index b03f26d0..00000000 --- a/lib/vim/syntastic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b03f26d049c31c9ae341a94f4f3c680fecd9eda5 diff --git a/lib/vim/vim-snippets b/lib/vim/vim-snippets index 6a4247e7..83917d5f 160000 --- a/lib/vim/vim-snippets +++ b/lib/vim/vim-snippets @@ -1 +1 @@ -Subproject commit 6a4247e7ca2a4d5522df40c42357dd7df38ad8ee +Subproject commit 83917d5f0f326289c75bbb57cb415d1c8adb203e