mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 11:31:30 +01:00
135 lines
4.8 KiB
VimL
135 lines
4.8 KiB
VimL
"""" PLUGINS CONFIGURATION
|
|
let g:ack_default_options = " --cc --cpp --shell --python --html --js --vue"
|
|
|
|
" ALE configuration
|
|
let g:ale_set_balloons = 1 " enable tooltips
|
|
let g:ale_fixers = {
|
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
|
\ 'bash': ['shfmt'],
|
|
\ 'json': ['prettier'],
|
|
\ 'cpp': ['clang-format'],
|
|
\ 'css': ['prettier'],
|
|
\ 'html': ['prettier'],
|
|
\ 'markdown': ['prettier'],
|
|
\ 'java': ['eclipselsp'],
|
|
\ 'yaml': ['prettier'],
|
|
\ 'python': ['black', 'isort'],
|
|
\ 'go': ['gofmt', "goimports"],
|
|
\ 'rust': ['rustfmt'],
|
|
\ "javascript": ["prettier", "eslint"],
|
|
\ "vue": ["prettier", "eslint"]
|
|
\}
|
|
let g:ale_fixers_aliases = {'vue': ['vue', 'javascript']}
|
|
|
|
let g:ale_python_bandit_options = "-c banditrc"
|
|
" let g:ale_python_pylint_options = "--rcfile pylintrc --disable=W0511" " if the rcfile does not exist, pylint will exit without linting
|
|
let g:ale_python_pylint_options = "--disable=W0511"
|
|
let g:ale_cpp_clang_options = '-std=c++17 -Wall -Wpedantic'
|
|
let g:ale_cpp_gcc_options = '-std=c++17 -Wall -Wpedantic'
|
|
|
|
let g:ale_linters = {
|
|
\ 'bash': ['bashlint', "shellcheck"],
|
|
\ 'dockerfile': ["hadolint"],
|
|
\ 'zsh': ['bashlint', "shellcheck"],
|
|
\ 'python': ['pyls', 'pylint', 'bandit'],
|
|
\ 'go': ['gopls', 'gobuild'],
|
|
\ 'rust': ['analyzer', 'rustc'],
|
|
\ 'yaml': ['yamllint'],
|
|
\ 'javascript': ["yarn lint", "eslint", "vls"]
|
|
\}
|
|
let g:ale_linter_aliases = {'vue': ['vue', 'javascript']}
|
|
|
|
let g:ale_set_quickfix=1
|
|
let g:ale_set_loclist=0
|
|
let g:ale_open_list = 0
|
|
let g:ale_keep_list_window_open = 1
|
|
|
|
let g:ale_lint_on_save = 1
|
|
" let g:ale_lint_on_enter = 0 " uncomment if you do not want to lint files on open
|
|
let g:ale_lint_on_insert_leave = 1
|
|
" let g:ale_lint_on_text_changed = 1
|
|
let g:ale_lint_delay = 2500 " lint 2.5 seconds after text has changed
|
|
let g:ale_fix_on_save = 1
|
|
let g:ale_completion_enabled = 1
|
|
" let g:ale_completion_autoimport = 1
|
|
|
|
let g:ale_sign_priority = 99
|
|
let g:ale_sign_error = "xx"
|
|
let g:ale_sign_warning = ">>"
|
|
let g:ale_sign_info = "--"
|
|
"let g:ale_sign_style_error =
|
|
"let g:ale_sign_style_warning =
|
|
|
|
packadd termdebug "useless shit
|
|
|
|
" Fix some gitgutter stuff
|
|
let g:gitgutter_enabled = 1
|
|
let g:gitgutter_sign_allow_clobber = 0 " do not allow gitgutter to overwrite signs
|
|
let g:gitgutter_sign_priority = 50
|
|
" let g:gitgutter_set_sign_backgrounds = 1
|
|
" let g:gitgutter_override_sign_column_highlight = 0
|
|
|
|
" highlight clear GitGutterAdd GitGutterChange GitGutterModified GitGutterDelete SignColumn
|
|
highlight SignColumn ctermbg=none
|
|
|
|
highlight GitGutterAdd ctermbg=none ctermfg=2
|
|
highlight GitGutterChange ctermbg=none ctermfg=3
|
|
highlight GitGutterDelete ctermbg=none ctermfg=1
|
|
highlight GitGutterChangeDelete ctermbg=none ctermfg=1
|
|
|
|
let g:gitgutter_sign_added = '+'
|
|
let g:gitgutter_sign_modified = '~'
|
|
let g:gitgutter_sign_modified_removed = 'x'
|
|
|
|
" Improve vimdiff colors (deprecated, this was useful for the twilight256 colorscheme)
|
|
" highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
|
" highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
|
" highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
|
|
" highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
|
|
|
|
" Airline config
|
|
set laststatus=2
|
|
let g:airline#extensions#tabline#enabled = 1
|
|
let g:airline_theme='gruvbox'
|
|
" " default linenr symbol is '☰' and it sucks
|
|
" let g:airline_symbols.linenr = ''
|
|
" " powerline symbols
|
|
if !exists('g:airline_symbols')
|
|
let g:airline_symbols = {}
|
|
endif
|
|
let g:airline_left_sep = ''
|
|
let g:airline_left_alt_sep = ''
|
|
let g:airline_right_sep = ''
|
|
let g:airline_right_alt_sep = ''
|
|
" let g:airline_symbols = {}
|
|
let g:airline_symbols.branch = ''
|
|
let g:airline_symbols.readonly = ''
|
|
"let g:airline_symbols.linenr = '☰'
|
|
let g:airline_symbols.linenr = ''
|
|
"let g:airline_symbols.maxlinenr = ''
|
|
" let g:airline_symbols.dirty='⚡'
|
|
|
|
" These are the default mappings for vim-multi-cursor
|
|
let g:multi_cursor_start_word_key = '<C-n>'
|
|
let g:multi_cursor_select_all_word_key = '<A-n>'
|
|
let g:multi_cursor_start_key = 'g<C-n>'
|
|
let g:multi_cursor_select_all_key = 'g<A-n>'
|
|
let g:multi_cursor_next_key = '<C-n>'
|
|
let g:multi_cursor_prev_key = '<C-p>'
|
|
let g:multi_cursor_skip_key = '<C-x>'
|
|
let g:multi_cursor_quit_key = '<Esc>'
|
|
|
|
" indent-guides, toggle with <leader>ig
|
|
let g:indent_guides_enable_on_vim_startup = 0
|
|
let g:indent_guides_exclude_filetypes = ['help', 'terminal', 'nerdtree']
|
|
let g:indent_guides_start_level = 2
|
|
let g:indent_guides_guide_size = 1
|
|
|
|
|
|
let g:ctrlp_custom_ignore = {
|
|
\ 'dir': '\v(target|build|dist|.venv)$',
|
|
\ 'file': '\v\.(exe|so|dll)$',
|
|
\ 'link': 'some_bad_symbolic_links',
|
|
\ }
|
|
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
|