From cbe5d41992473b75f483560ed294013528c6a7b3 Mon Sep 17 00:00:00 2001 From: Zofia Szweda Date: Tue, 8 Sep 2026 16:05:21 +0200 Subject: vim: add linting for css, html and js [stylelint, htmlhint, eslint] --- vim/.vimrc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index 7ee6530..496a87f 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -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 l nnoremap y w nnoremap c "+y vnoremap 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('', '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 LspFormat endif endfunction +augroup END function! s:prettier_format() abort if !executable('prettier') return -- cgit v1.2.3