132 lines
3.6 KiB
Text
132 lines
3.6 KiB
Text
" vim: filetype=vim
|
|
" ==============================
|
|
" VIM-Plug - Plugin Manager
|
|
" ==============================
|
|
|
|
" ----- Vim Plugin Directory (Change required)
|
|
let $vimplug_bundle='~/.local/share/vim/bundle'
|
|
" let $vimplug_bundle='c:\_local\share\vim\bundle'
|
|
|
|
" ----- List of used plugins
|
|
call plug#begin($vimplug_bundle)
|
|
|
|
" - Highlightings
|
|
" Syntax highlighting for ps1 (PowerShell)
|
|
Plug 'PProvost/vim-ps1'
|
|
" For sxhkd config file
|
|
Plug 'kovetskiy/sxhkd-vim'
|
|
" For LaTeX
|
|
Plug 'lervag/vimtex'
|
|
|
|
" Goyo, simplified view for vim useful when writing long documents
|
|
Plug 'junegunn/goyo.vim'
|
|
|
|
" Line at the bottom of vim, just to make it look nice
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
" Comment a line in one press of a button (or 2 button)
|
|
Plug 'tpope/vim-commentary'
|
|
|
|
" - NERDTree
|
|
" Navigate through files/folder while in vim
|
|
Plug 'preservim/nerdtree'
|
|
" Icon for nerdtree
|
|
Plug 'ryanoasis/vim-devicons'
|
|
|
|
" Tell everyone on discord that you use vim!
|
|
Plug 'hugolgst/vimsence'
|
|
|
|
" Markdown preview, not really useful since it's only support github's md format.
|
|
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' }
|
|
|
|
" Auto complete with deoplete
|
|
if has('nvim')
|
|
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
|
else
|
|
Plug 'Shougo/deoplete.nvim'
|
|
Plug 'roxma/nvim-yarp'
|
|
Plug 'roxma/vim-hug-neovim-rpc'
|
|
endif
|
|
" deoplete source
|
|
if has('win32') || has('win64')
|
|
Plug 'tbodt/deoplete-tabnine', { 'do': 'powershell.exe .\install.ps1' }
|
|
else
|
|
Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
|
endif
|
|
|
|
Plug 'Yggdroot/indentLine'
|
|
|
|
call plug#end()
|
|
|
|
" ----- PlugIns Configuration
|
|
" - deoplete
|
|
let g:deoplete#enable_at_startup = 1
|
|
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
|
|
|
" - NERDTree
|
|
let NERDTreeShowHidden=1
|
|
let NERDTreeMinimalUI = 1
|
|
|
|
" - Snippet
|
|
|
|
" let g:UltiSnipsExpandTrigger="<C-Tab>"
|
|
" let g:UltiSnipsJumpForwardTrigger="<C-Tab>"
|
|
" let g:UltiSnipsJumpBackwardTrigger="<S-Tab>"
|
|
" let g:UltiSnipsEditSplit="vertical"
|
|
|
|
" - lightline
|
|
set laststatus=2
|
|
let g:lightline = {
|
|
\ 'colorscheme': 'zi',
|
|
\ 'active': {
|
|
\ 'left': [ [ 'mode', 'paste' ],
|
|
\ [ 'gitbranch', 'fugitive', 'readonly', 'filename', 'modified' ] ],
|
|
\ 'right': [ [ 'lineinfo' ],
|
|
\ [ 'percent' ],
|
|
\ [ 'fileformat', 'fileencoding', 'filetype', ] ]
|
|
\ },
|
|
\ 'component': {
|
|
\ 'lineinfo': ' %2l:%-2v%<',
|
|
\ 'percent': '☰ %2p%%',
|
|
\ },
|
|
\ 'component_function': {
|
|
\ 'gitbranch': 'FugitiveHead',
|
|
\ 'fugitive': 'LightlineFugitive',
|
|
\ 'filename': 'LightlineFilename'
|
|
\ },
|
|
\}
|
|
set noshowmode
|
|
" function for lightline
|
|
function! LightlineFugitive()
|
|
if &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
|
return FugitiveHead()
|
|
endif
|
|
return ''
|
|
endfunction
|
|
function! LightlineFilename()
|
|
let root = fnamemodify(get(b:, 'git_dir'), ':h')
|
|
let path = expand('%:p')
|
|
if path[:len(root)-1] ==# root
|
|
return path[len(root)+1:]
|
|
endif
|
|
return expand('%')
|
|
endfunction
|
|
" no lightline on nerdtree
|
|
augroup filetype_nerdtree
|
|
au!
|
|
au FileType nerdtree call s:disable_lightline_on_nerdtree()
|
|
au WinEnter,BufWinEnter,TabEnter * call s:disable_lightline_on_nerdtree()
|
|
augroup END
|
|
fu s:disable_lightline_on_nerdtree() abort
|
|
let nerdtree_winnr = index(map(range(1, winnr('$')), {_,v -> getbufvar(winbufnr(v), '&ft')}), 'nerdtree') + 1
|
|
call timer_start(0, {-> nerdtree_winnr && setwinvar(nerdtree_winnr, '&stl', '%#Normal#')})
|
|
endfu
|
|
|
|
" Supertab
|
|
let g:SuperTabDefaultCompletionType = "<c-n>"
|
|
|
|
" Custom comments
|
|
autocmd FileType xdefaults setlocal commentstring=!\ %s
|
|
|
|
let g:indentLine_setColors = 0
|
|
hi Conceal ctermfg=0 ctermbg=NONE
|