Skip to content

Commit

Permalink
Replace Syntastic with Neomake, fix submodules
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Slusny <[email protected]>
  • Loading branch information
deathbeam committed Jan 26, 2017
1 parent c11d16d commit 32af97a
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 65 deletions.
13 changes: 7 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion config/sxhkdrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
111 changes: 62 additions & 49 deletions config/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {{{
Expand All @@ -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

" }}}

Expand Down Expand Up @@ -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 {{{
Expand All @@ -285,22 +298,27 @@

" 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

" }}}

" 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 <leader>cd :cd %:p:h<cr>:pwd<cr>
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion install.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/vim/deoplete.nvim
1 change: 1 addition & 0 deletions lib/vim/neomake
Submodule neomake added at 8f6aba
1 change: 0 additions & 1 deletion lib/vim/syntastic
Submodule syntastic deleted from b03f26
2 changes: 1 addition & 1 deletion lib/vim/vim-snippets

0 comments on commit 32af97a

Please sign in to comment.