dotfiles/vim/plugins_config.vim

173 lines
5.3 KiB
VimL
Raw Normal View History

2020-12-06 02:29:15 +01:00
"""" PLUGINS CONFIGURATION
" ALE configuration
2021-11-16 14:28:31 +01:00
"
let g:ale_python_auto_poetry = 1
2020-12-06 02:29:15 +01:00
let g:ale_set_balloons = 1 " enable tooltips
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'bash': ['shfmt'],
2021-05-19 10:30:35 +02:00
\ 'sh': ['shfmt'],
2020-12-06 02:29:15 +01:00
\ 'json': ['prettier'],
2021-03-08 09:57:57 +01:00
\ 'c': ['clang-format'],
2020-12-06 02:29:15 +01:00
\ 'cpp': ['clang-format'],
\ 'css': ['prettier'],
\ 'html': ['prettier'],
\ 'markdown': ['prettier'],
2021-03-15 10:37:52 +01:00
\ 'terraform': ['terraform'],
2020-12-06 02:29:15 +01:00
\ 'java': ['eclipselsp'],
\ 'yaml': ['prettier'],
\ 'python': ['black', 'isort'],
\ 'go': ['gofmt', "goimports"],
\ 'rust': ['rustfmt'],
2021-09-26 15:59:46 +02:00
\ 'sql': ['pgformatter'],
2020-12-06 02:29:15 +01:00
\ "javascript": ["prettier", "eslint"],
\ "vue": ["prettier", "eslint"]
\}
let g:ale_fixers_aliases = {'vue': ['vue', 'javascript']}
let g:ale_python_bandit_options = "-c banditrc"
2021-05-19 10:31:19 +02:00
let g:ale_python_pylint_options = "-j0 --disable=W0511"
2021-10-01 10:37:51 +02:00
let g:ale_python_mypy_options = "--ignore-missing-imports"
2021-03-13 15:31:26 +01:00
" let g:ale_cpp_clang_options = '-std=c++17 -Wall -Wpedantic'
" let g:ale_cpp_gcc_options = '-std=c++17 -Wall -Wpedantic'
2021-09-26 15:59:46 +02:00
let g:ale_rust_rustfmt_options = '--edition=2018'
2020-12-06 02:29:15 +01:00
let g:ale_linters = {
2021-02-19 08:51:24 +01:00
\ 'bash': ['bash-language-server', 'bashlint', "shellcheck"],
2020-12-06 02:29:15 +01:00
\ 'dockerfile': ["hadolint"],
\ 'zsh': ['bashlint', "shellcheck"],
2021-03-13 15:31:26 +01:00
\ 'cpp': ['clangd'],
2021-10-01 10:37:51 +02:00
\ 'python': ['pylsp', 'pylint', 'bandit', "mypy"],
2020-12-06 02:29:15 +01:00
\ 'go': ['gopls', 'gobuild'],
2021-05-19 10:31:19 +02:00
\ 'rust': ['analyzer', 'cargo', 'rls'],
2020-12-06 02:29:15 +01:00
\ 'yaml': ['yamllint'],
\ 'javascript': ["yarn lint", "eslint", "vls"]
\}
let g:ale_linter_aliases = {'vue': ['vue', 'javascript']}
2021-10-01 10:37:51 +02:00
let g:ale_yaml_yamllint_options = "--config .editorconfig"
2020-12-06 02:29:15 +01:00
let g:ale_open_list = 0
let g:ale_keep_list_window_open = 1
let g:ale_lint_on_save = 1
2021-11-16 14:28:31 +01:00
let g:ale_lint_on_enter = 1 " uncomment if you do not want to lint files on open
2020-12-06 02:29:15 +01:00
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 =
2021-03-15 10:15:13 +01:00
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'
\ }
2020-12-06 02:29:15 +01:00
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'
2020-12-07 15:36:18 +01:00
" Airline config
set laststatus=2
2021-02-21 23:07:22 +01:00
" let g:airline#extensions#tabline#enabled = 1
2020-12-07 15:36:18 +01:00
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 = {}
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
2021-02-21 23:07:22 +01:00
" let g:airline_symbols.linenr = '☰'
2020-12-07 15:36:18 +01:00
let g:airline_symbols.linenr = ''
2021-02-21 23:07:22 +01:00
" let g:airline_section_c = ''
" let g:airline_section_c = '%t'
let g:airline_section_y = ''
let g:airline_section_x = ''
2020-12-07 15:36:18 +01:00
" let g:airline_symbols.dirty='⚡'
2021-02-21 23:07:22 +01:00
" let g:airline#extensions#branch#vcs_checks = ['untracked', 'dirty']
2020-12-06 02:29:15 +01:00
" 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
2021-02-19 09:17:49 +01:00
let g:gutentags_ctags_exclude = ['build', 'dist', '*css', '*json', '*yaml', '*md']
let g:gutentags_ctags_extra_args = ['--tag-relative=always', ]
2021-08-09 18:37:58 +02:00
"" nerdtree
let NERDTreeIgnore=['__pycache__']
2021-09-30 12:42:37 +02:00
" ultisnips
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsEditSplit="vertical"
2021-03-15 10:29:08 +01:00
2021-09-26 17:32:11 +02:00
"" Fzf
let g:fzf_layout = { 'down': '~40%' }"