From 1e4633737b636fd29cfe4add6752aea73639be0c Mon Sep 17 00:00:00 2001 From: Oxbian Date: Mon, 24 Mar 2025 21:38:08 -0400 Subject: feat: better formatter and auto relign at 80 cols --- conf/options.vim | 4 ++-- conf/plugins.vim | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'conf') diff --git a/conf/options.vim b/conf/options.vim index c4e131c..8e84a25 100644 --- a/conf/options.vim +++ b/conf/options.vim @@ -9,8 +9,8 @@ syntax on " Show syntax color set number " Show line number colorscheme onedark " Set vim theme to onedark set colorcolumn=80 " Add an indicator for 80 char limit -"set textwidth=80 " Set max text width -"autocmd BufNewFile,BufRead * setlocal formatoptions=cropt " Linebreak at 80 char +set textwidth=80 " Set max text width +autocmd BufNewFile,BufRead * setlocal formatoptions=cropt " Linebreak at 80 char set relativenumber " Show relative line number set cursorline " Select the current line set showmatch " Show matching brackets when hovered diff --git a/conf/plugins.vim b/conf/plugins.vim index bdfa5ea..e2349f3 100644 --- a/conf/plugins.vim +++ b/conf/plugins.vim @@ -48,12 +48,24 @@ let g:ale_set_balloons = 1 " Show error when mouse over it " Linters and fixers (don't forget to setup LSP as linters) let g:ale_linters = { -\ 'python': ['pylsp', 'flake8', 'pylint', 'mypy'] +\ 'python': ['pylsp', 'flake8', 'pylint', 'mypy'], +\ 'php': ['intelephense', 'phpcs', 'phpmd'], +\ 'rust': ['analyzer'], +\ 'html': ['vscodehtml', 'htmlhint', 'stylelint', 'eslint'], +\ 'css': ['vscodecss', 'stylelint'], +\ 'javascript': ['eslint'], \} let g:ale_fixers = { -\ 'python': ['black', 'isort', 'autopep8'] +\ 'python': ['black', 'isort', 'autopep8'], +\ 'php': ['php_cs_fixer'], +\ 'rust': ['rustfmt'], +\ 'html': ['html-beautify'], +\ 'css': ['css-beautify'], +\ 'javascript': ['js-beautify'], \} +let g:ale_html_htmlhint_use_global = 1 +let g:ale_html_stylehint_use_global = 1 " Netrw (filetree built-in vim) let g:netrw_keepdir = 0 " Reload buffer usefull when moving or removing file -- cgit v1.2.3