|
|
|
@ -18,18 +18,17 @@ Plug 'gioele/vim-autoswap' "Requires wmctrl
|
|
|
|
|
Plug 'sheerun/vim-polyglot'
|
|
|
|
|
Plug 'sirtaj/vim-openscad'
|
|
|
|
|
Plug 'othree/yajs.vim'
|
|
|
|
|
Plug 'othree/es.next.syntax.vim'
|
|
|
|
|
Plug 'othree/javascript-libraries-syntax.vim'
|
|
|
|
|
Plug 'jparise/vim-graphql'
|
|
|
|
|
Plug 'styled-components/vim-styled-components'
|
|
|
|
|
|
|
|
|
|
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
|
|
|
|
|
Plug 'vim-pandoc/vim-pandoc-syntax'
|
|
|
|
|
Plug 'Vimjas/vim-python-pep8-indent'
|
|
|
|
|
|
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
|
Plug 'scrooloose/nerdtree'
|
|
|
|
|
Plug 'xuyuanp/nerdtree-git-plugin'
|
|
|
|
|
|
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
|
|
|
|
|
|
Plug 'nathanaelkane/vim-indent-guides'
|
|
|
|
|
|
|
|
|
|
" Plug 'donRaphaco/neotex', { 'for': 'tex' }
|
|
|
|
@ -37,7 +36,10 @@ Plug 'lervag/vimtex'
|
|
|
|
|
|
|
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
|
|
|
|
|
|
|
|
Plug 'w0rp/ale'
|
|
|
|
|
Plug 'dense-alalysis/ale'
|
|
|
|
|
|
|
|
|
|
" Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
|
|
|
|
|
" Plug 'frazrepo/vim-rainbow'
|
|
|
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
@ -65,6 +67,7 @@ let g:solarized_bold = 1
|
|
|
|
|
let g:solarized_underline = 1
|
|
|
|
|
let g:solarized_italic = 1
|
|
|
|
|
|
|
|
|
|
set termguicolors
|
|
|
|
|
colorscheme {{VIMCOLORSCHEME}}
|
|
|
|
|
set bg={{VIMBACKGROUND}}
|
|
|
|
|
|
|
|
|
@ -74,12 +77,22 @@ highlight NonText ctermbg=none ctermfg=8
|
|
|
|
|
|
|
|
|
|
" Tabs and Identation
|
|
|
|
|
set expandtab
|
|
|
|
|
set copyindent
|
|
|
|
|
set preserveindent
|
|
|
|
|
" set copyindent
|
|
|
|
|
" set preserveindent
|
|
|
|
|
set autoindent
|
|
|
|
|
set softtabstop=2
|
|
|
|
|
set shiftwidth=2
|
|
|
|
|
set tabstop=2
|
|
|
|
|
|
|
|
|
|
" Splits
|
|
|
|
|
set splitbelow
|
|
|
|
|
set splitright
|
|
|
|
|
|
|
|
|
|
" Remember last position
|
|
|
|
|
if has("autocmd")
|
|
|
|
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
" set list
|
|
|
|
|
" set lcs+=space:·
|
|
|
|
|
|
|
|
|
@ -147,8 +160,8 @@ nnoremap <leader><space> :nohlsearch<CR>
|
|
|
|
|
" Session save
|
|
|
|
|
nnoremap <leader>s :mksession<CR>
|
|
|
|
|
|
|
|
|
|
" :W sudo saves the file
|
|
|
|
|
command W w !sudo tee % > /dev/null
|
|
|
|
|
" :W sudo saves the file (won't work in neovim)
|
|
|
|
|
" command W w !sudo tee % > /dev/null
|
|
|
|
|
|
|
|
|
|
" NERD Tree
|
|
|
|
|
map <C-n> :NERDTreeToggle<CR>
|
|
|
|
@ -185,15 +198,14 @@ let g:lightline = {
|
|
|
|
|
\ 'right': [ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ],
|
|
|
|
|
\ [ 'percent', 'lineinfo'],
|
|
|
|
|
\ [ 'fileformat', 'fileencoding', 'filetype'] ]
|
|
|
|
|
\ },
|
|
|
|
|
\ }
|
|
|
|
|
\ }
|
|
|
|
|
\}
|
|
|
|
|
|
|
|
|
|
" ###########
|
|
|
|
|
" # Plugins #
|
|
|
|
|
" ###########
|
|
|
|
|
|
|
|
|
|
" Indent guides
|
|
|
|
|
"
|
|
|
|
|
hi IndentGuidesOdd ctermbg=8
|
|
|
|
|
hi IndentGuidesEven ctermbg=8
|
|
|
|
|
let g:indent_guides_start_level = 2
|
|
|
|
@ -201,21 +213,42 @@ let g:indent_guides_guide_size = 1
|
|
|
|
|
let g:indent_guides_enable_on_vim_startup = 1
|
|
|
|
|
|
|
|
|
|
" ALE
|
|
|
|
|
|
|
|
|
|
let g:ale_completion_enabled = 0
|
|
|
|
|
let g:ale_linters_explicit = 1
|
|
|
|
|
let g:ale_linters = {
|
|
|
|
|
\ 'cpp': ['clangcheck', 'clangtidy', 'cppcheck'],
|
|
|
|
|
\ 'javascript': ['eslint'],
|
|
|
|
|
\ 'javascriptreact': ['eslint'],
|
|
|
|
|
\ 'javascript.jsx': ['eslint'],
|
|
|
|
|
\ 'vim': ['vint'],
|
|
|
|
|
\ 'python': ['flake8']
|
|
|
|
|
\}
|
|
|
|
|
|
|
|
|
|
let b:ale_fixers = {
|
|
|
|
|
\ 'javascript': ['eslint']
|
|
|
|
|
\ 'javascript': ['eslint'],
|
|
|
|
|
\ 'javascriptreact': ['eslint'],
|
|
|
|
|
\ 'javascript.jsx': ['eslint'],
|
|
|
|
|
\ 'python': ['yapf']
|
|
|
|
|
\}
|
|
|
|
|
|
|
|
|
|
let g:ale_pattern_options = {
|
|
|
|
|
\ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []},
|
|
|
|
|
\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []},
|
|
|
|
|
\}
|
|
|
|
|
|
|
|
|
|
" CoC
|
|
|
|
|
|
|
|
|
|
" Coc
|
|
|
|
|
let g:coc_global_extensions = [
|
|
|
|
|
\ 'coc-tsserver',
|
|
|
|
|
\ 'coc-json',
|
|
|
|
|
\ 'coc-css',
|
|
|
|
|
\ 'coc-html',
|
|
|
|
|
\ 'coc-snippets',
|
|
|
|
|
\ 'coc-pairs',
|
|
|
|
|
\ 'coc-yaml',
|
|
|
|
|
\ 'coc-highlight',
|
|
|
|
|
\ 'coc-syntax',
|
|
|
|
|
\ 'coc-python'
|
|
|
|
|
\]
|
|
|
|
|
|
|
|
|
|
" Use tab for trigger completion with characters ahead and navigate.
|
|
|
|
|
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
|
|
|
@ -326,3 +359,6 @@ nnoremap <silent> <space>j :<C-u>CocNext<CR>
|
|
|
|
|
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
|
|
|
|
|
" Resume latest coc list
|
|
|
|
|
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
|
|
|
|
|
|
|
|
|
" vim-rainbow
|
|
|
|
|
let g:rainbow_active = 1
|
|
|
|
|