mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 03:21:30 +01:00
218 lines
6.8 KiB
VimL
218 lines
6.8 KiB
VimL
"""" PLUGINS CONFIGURATION
|
|
" ALE configuration
|
|
"
|
|
let g:ale_python_auto_poetry = 1
|
|
let g:ale_set_balloons = 1 " enable tooltips
|
|
let g:ale_fixers = {
|
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
|
\ 'bash': ['shfmt'],
|
|
\ 'sh': ['shfmt'],
|
|
\ 'json': ['prettier'],
|
|
\ 'c': ['clang-format'],
|
|
\ 'cpp': ['clang-format'],
|
|
\ 'css': ['prettier'],
|
|
\ 'html': ['prettier'],
|
|
\ 'markdown': ['prettier'],
|
|
\ 'terraform': ['terraform'],
|
|
\ 'java': ['eclipselsp'],
|
|
\ 'yaml': ['prettier'],
|
|
\ 'python': ['black', 'isort'],
|
|
\ 'go': ['gofmt', "goimports"],
|
|
\ 'rust': ['rustfmt'],
|
|
\ 'sql': ['pgformatter'],
|
|
\ "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 = "-j0 --disable=W0511"
|
|
let g:ale_python_mypy_options = "--ignore-missing-imports"
|
|
|
|
" 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_rust_cargo_use_clippy = 1
|
|
|
|
let g:ale_linters = {
|
|
\ 'bash': ['bash-language-server', 'bashlint', "shellcheck"],
|
|
\ 'dockerfile': ["hadolint"],
|
|
\ 'zsh': ['bashlint', "shellcheck"],
|
|
\ 'cpp': ['clangd'],
|
|
\ 'python': ['pylsp', 'pylint', 'bandit', "mypy"],
|
|
\ 'go': ['gopls', 'gobuild'],
|
|
\ 'rust': ['analyzer'],
|
|
\ 'yaml': ['yamllint'],
|
|
\ 'javascript': ["yarn lint", "eslint", "vls"]
|
|
\}
|
|
let g:ale_linter_aliases = {'vue': ['vue', 'javascript']}
|
|
let g:ale_yaml_yamllint_options = "--config .editorconfig"
|
|
|
|
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 = 1 " 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_lsp_show_message_severity = 'information'
|
|
let g:ale_lsp_suggestions = 1
|
|
let g:ale_rename_tsserver_find_in_comment = 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 =
|
|
|
|
let g:ale_completion_symbols = {
|
|
\ 'text': '',
|
|
\ 'method': '',
|
|
\ 'function': '',
|
|
\ 'constructor': '',
|
|
\ 'field': '',
|
|
\ 'variable': '',
|
|
\ 'class': '',
|
|
\ 'interface': '',
|
|
\ 'module': '',
|
|
\ 'property': '',
|
|
\ 'unit': 'unit',
|
|
\ 'value': 'val',
|
|
\ 'enum': '',
|
|
\ 'keyword': 'keyword',
|
|
\ 'snippet': '',
|
|
\ 'color': 'color',
|
|
\ 'file': '',
|
|
\ 'reference': 'ref',
|
|
\ 'folder': '',
|
|
\ 'enum member': '',
|
|
\ 'constant': '',
|
|
\ 'struct': '',
|
|
\ 'event': 'event',
|
|
\ 'operator': '',
|
|
\ 'type_parameter': 'type param',
|
|
\ '<default>': 'v'
|
|
\ }
|
|
|
|
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_sign_added = '+'
|
|
let g:gitgutter_sign_modified = '~'
|
|
let g:gitgutter_sign_modified_removed = 'x'
|
|
|
|
" Airline config
|
|
" set laststatus=2
|
|
let g:airline#extensions#tabline#enabled = 1
|
|
let g:airline#extensions#tabline#show_splits = 1
|
|
" let g:airline#extensions#tabline#tab_nr_type = 2
|
|
|
|
let g:airline#extensions#tabline#buffer_idx_mode = 1
|
|
nmap <leader>1 <Plug>AirlineSelectTab1
|
|
nmap <leader>2 <Plug>AirlineSelectTab2
|
|
nmap <leader>3 <Plug>AirlineSelectTab3
|
|
nmap <leader>4 <Plug>AirlineSelectTab4
|
|
nmap <leader>5 <Plug>AirlineSelectTab5
|
|
nmap <leader>6 <Plug>AirlineSelectTab6
|
|
nmap <leader>7 <Plug>AirlineSelectTab7
|
|
nmap <leader>8 <Plug>AirlineSelectTab8
|
|
nmap <leader>9 <Plug>AirlineSelectTab9
|
|
nmap <leader>0 <Plug>AirlineSelectTab0
|
|
nmap <leader>- <Plug>AirlineSelectPrevTab
|
|
nmap <leader>+ <Plug>AirlineSelectNextTab
|
|
|
|
let g:airline_theme='gruvbox'
|
|
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.branch = ''
|
|
let g:airline_symbols.readonly = ''
|
|
" let g:airline_symbols.linenr = '☰'
|
|
let g:airline_symbols.colnr = ':'
|
|
let g:airline_symbols.linenr = ''
|
|
let g:airline_symbols.maxlinenr = ''
|
|
" let g:airline_section_c = ''
|
|
" let g:airline_section_c = '%t'
|
|
let g:airline_section_y = ''
|
|
" let g:airline_section_x = 'tagbar'
|
|
let g:airline#extensions#tagbar#flags = 'p'
|
|
let g:airline#extensions#tagbar#searchmethod = 'scoped-stl'
|
|
" let g:airline_symbols.dirty='⚡'
|
|
" let g:airline#extensions#branch#vcs_checks = ['untracked', '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
|
|
|
|
|
|
"" Gutentags"
|
|
let g:gutentags_cache_dir = expand('~/.vim/ctags_cache/')
|
|
|
|
let g:gutentags_file_list_command = {
|
|
\ 'markers': {
|
|
\ '.git': 'git ls-files',
|
|
\ '.hg': 'hg files',
|
|
\ },
|
|
\ }
|
|
let g:gutentags_generate_on_empty_buffer = 1
|
|
let g:gutentags_ctags_exclude = ['build', 'dist', '*css', '*json', '*yaml', '*md']
|
|
let g:gutentags_ctags_extra_args = ['--tag-relative=always', ]
|
|
"" nerdtree
|
|
let NERDTreeIgnore=['__pycache__']
|
|
|
|
" ultisnips
|
|
let g:UltiSnipsExpandTrigger="<tab>"
|
|
let g:UltiSnipsJumpForwardTrigger="<c-j>"
|
|
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
|
|
let g:UltiSnipsEditSplit="context"
|
|
|
|
"" Fzf
|
|
let g:fzf_layout = { 'window': { 'width': 1, 'height': 0.9 } }
|
|
let g:fzf_colors =
|
|
\ { 'fg': ['fg', 'Normal'],
|
|
\ 'bg': ['bg', 'Normal'],
|
|
\ 'hl': ['fg', 'Comment'],
|
|
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
|
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
|
\ 'hl+': ['fg', 'Statement'],
|
|
\ 'info': ['fg', 'PreProc'],
|
|
\ 'border': ['fg', 'Ignore'],
|
|
\ 'prompt': ['fg', 'Conditional'],
|
|
\ 'pointer': ['fg', 'Exception'],
|
|
\ 'marker': ['fg', 'Keyword'],
|
|
\ 'spinner': ['fg', 'Label'],
|
|
\ 'header': ['fg', 'Comment'] }
|
|
|
|
autocmd! FileType fzf
|
|
autocmd FileType fzf set laststatus=0 noshowmode noruler
|
|
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
|
|
|
|
|
|
let g:goyo_width="85%"
|
|
let g:goyo_linenr=1
|