aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-11-11 15:27:39 +0000
committerMatthew Lemon <y@yulqen.org>2024-11-11 15:27:56 +0000
commit9f2777388e516fb94589ebfe0558970295b5d717 (patch)
tree440a63dc397e94e1ba427d591e888191a073336b
parente73b345e563176f67450205af8add745e6dbdb22 (diff)
Adds ALE back
-rw-r--r--vim/min-vim92
1 files changed, 82 insertions, 10 deletions
diff --git a/vim/min-vim b/vim/min-vim
index 21d0217..b26e1f2 100644
--- a/vim/min-vim
+++ b/vim/min-vim
@@ -59,7 +59,7 @@ set ttimeoutlen=100
set wildmenu
set wildoptions=pum
set wildmode=longest:full,full
-set wildignore=**/__pycache*/**
+set wildignore=**/__pycache*/**,*/node_modules/*,*/.venv/*
set undodir=$HOME/.vimundo
set undofile
set undolevels=999
@@ -67,6 +67,77 @@ set undoreload=10000
set wrap
packadd! matchit
+" Snippets
+let g:UltiSnipsExpandTrigger="<C-y>"
+let g:UltiSnipsJumpForwardTrigger="<S-f>"
+let g:UltiSnipsJumpBackwardTrigger="<S-b>"
+let g:ycm_key_list_select_completion=[]
+let g:ycm_key_list_previous_completion=[]
+
+" Vital plugins
+
+call plug#begin()
+Plug 'tpope/vim-commentary'
+Plug 'SirVer/UltiSnips'
+Plug 'preservim/vim-markdown'
+Plug 'honza/vim-snippets'
+Plug 'mhinz/vim-signify'
+Plug 'vim-test/vim-test'
+Plug 'dense-analysis/ale'
+call plug#end()
+
+" ALE
+let g:ale_enabled = 1
+let g:ale_set_balloons = 0
+let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
+let g:ale_sign_error = '!'
+let g:ale_sign_warning = '?'
+let g:ale_lint_on_text_changed = 1
+let g:ale_hover_cursor = 1
+let g:ale_virtualtext_cursor = 'disabled'
+let g:ale_sign_column_always = 1
+let g:ale_open_list = 0
+let g:ale_set_highlights = 1
+let g:ale_set_signs = 1
+let g:ale_set_loclist = 1
+let g:ale_set_quickfix = 0
+let g:ale_echo_cursor = 1
+let g:ale_echo_msg_error_str = 'ALE Error'
+let g:ale_echo_msg_format = 'ALE: %linter% - %code: %%s'
+let g:ale_loclist_msg_format = 'ALE: %linter% - %code: %%s'
+let g:ale_echo_msg_warning_str = 'ALE Warning'
+let g:ale_linters = {'python': ['ruff', 'mypy'],
+\ 'ruby': ['standardrb', 'rubocop'],
+\ 'ocaml': ['merlin'],
+\ 'javascript': ['eslint'],
+\ 'cpp': ['clangd'],
+\ 'yaml': ['yamllint'],
+\ 'c': ['clangd'],
+\ 'go': ['gopls', 'golint', 'gofmt'],
+ \}
+let g:ale_fixers = {
+\ 'python': ['ruff_format', 'isort', 'yapf'],
+\ 'ruby': ['standardrb'],
+\ 'javascript': ['eslint'],
+\ 'go': ['gofmt', 'goimports', 'gopls'],
+\ 'cpp': ['clang-format'],
+\ 'c': ['clang-format'],
+\ 'rust': ['rustfmt']
+\ }
+let g:ale_python_mypy_ignore_invalid_syntax = 1
+let g:ale_python_mypy_executable = 'mypy'
+let g:ale_python_mypy_options = '--config-file mypy.ini'
+" let g:ale_sign_error = '>>'
+let g:ale_fix_on_save = 1
+let g:ale_linters_explicit = 0
+let g:ale_completion_enabled = 1
+" Map movement through errors without wrapping.
+" nmap <silent> <C-k> <Plug>(ale_previous)
+" nmap <silent> <C-j> <Plug>(ale_next)
+" OR map keys to use wrapping.
+nmap <silent> <C-k> <Plug>(ale_previous_wrap)
+nmap <silent> <C-j> <Plug>(ale_next_wrap)
+
" highlight spaces at the end of line
highlight WhiteSpaceEOL ctermbg=darkgreen
match WhiteSpaceEOL /\s$/
@@ -89,15 +160,16 @@ augroup textfiles
autocmd filetype markdown setlocal spell spelllang=en
augroup end
-augroup htmlshortcuts
- autocmd!
- autocmd filetype htmldjango,html inoremap `li <li><cr></li><esc>ka<cr>
- autocmd filetype htmldjango,html inoremap `ul <ul><cr></ul><esc>ka<cr>
- autocmd filetype htmldjango,html inoremap `div <div><cr></div><esc>ka<cr>
- autocmd filetype htmldjango,html inoremap `p <p></p><esc>hhhi
- autocmd filetype htmldjango,html inoremap `{{ {{ }}<esc>hhi
- autocmd FileType htmldjango,html inoremap `{% {% %}<Left><Left><Left>
-augroup end
+" ghetto snippets - leave out for now
+" augroup htmlshortcuts
+" autocmd!
+" autocmd filetype htmldjango,html inoremap `li <li><cr></li><esc>ka<cr>
+" autocmd filetype htmldjango,html inoremap `ul <ul><cr></ul><esc>ka<cr>
+" autocmd filetype htmldjango,html inoremap `div <div><cr></div><esc>ka<cr>
+" autocmd filetype htmldjango,html inoremap `p <p></p><esc>hhhi
+" autocmd filetype htmldjango,html inoremap `{{ {{ }}<esc>hhi
+" autocmd FileType htmldjango,html inoremap `{% {% %}<Left><Left><Left>
+" augroup end
set background=dark
colorscheme koehler