diff options
| author | Zofia Szweda <sophies@disroot.org> | 2026-09-08 16:05:21 +0200 |
|---|---|---|
| committer | Zofia Szweda <sophies@disroot.org> | 2026-09-08 16:05:48 +0200 |
| commit | cbe5d41992473b75f483560ed294013528c6a7b3 (patch) | |
| tree | ef1157ddc76586a3ad4a9238002f50356675a4f2 | |
| parent | 808e03971883fbc8a372bb32f88a82fecf6a901c (diff) | |
vim: add linting for css, html and js [stylelint, htmlhint, eslint]
| -rw-r--r-- | vim/.vimrc | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -31,7 +31,7 @@ set fileformat=unix set encoding=UTF-8 set number set nowrap -set rnu +set relativenumber set expandtab set tabstop=4 set shiftwidth=4 @@ -61,9 +61,13 @@ inoremap <silent> <Esc> <Esc>l nnoremap <nowait> y w nnoremap <leader>c "+y vnoremap <leader>c "+y -autocmd FileType html,css EmmetInstall "let -let g:ale_linters = {'vim': ['vint']} +let g:ale_linters = { + \'vim': ['vint'], + \'css': ['stylelint'], + \'html': ['htmlhint'], + \'js': ['eslint'] + \} let g:ale_sign_column_always = 1 let g:ale_lint_on_text_changed = 'normal' let g:ale_lint_on_save = 1 @@ -87,6 +91,7 @@ let g:which_key_map.b = { \ } call which_key#register('<Space>', 'g:which_key_map') " lsp +augroup lsp autocmd User LspSetup call LspOptionsSet(#{ \ autoComplete: v:true, \ autoHighlightDiags: v:true, @@ -120,6 +125,7 @@ function! s:lsp_keymaps() abort autocmd BufWritePre <buffer> LspFormat endif endfunction +augroup END function! s:prettier_format() abort if !executable('prettier') return |
