Expand LSP and lint coverage for full-stack development languages (#7)

ALE linters:
- Add css/scss: stylelint
- Add markdown: markdownlint
- Add sql: sqlfluff

ALE fixers:
- Add scss, less: prettier
- Add sql: sqlfmt

vim-lsp fallback (no Node.js path):
- Add html, css, scss, json, yaml: vscode language servers
- Add markdown: marksman
- Add sql: sqls

install.sh (CoC path):
- Add coc-go, coc-rust-analyzer, coc-marksman, coc-sql to auto-install
- Expand optional tools section with stylelint, markdownlint, sqlfluff, marksman
This commit is contained in:
m1ngsama 2026-03-28 18:30:19 +08:00 committed by GitHub
parent 323bf4a6b3
commit 43baa9753a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 39 additions and 22 deletions

14
.vimrc
View file

@ -521,6 +521,10 @@ let g:ale_linters = {
\ 'sh': ['shellcheck'], \ 'sh': ['shellcheck'],
\ 'yaml': ['yamllint'], \ 'yaml': ['yamllint'],
\ 'dockerfile': ['hadolint'], \ 'dockerfile': ['hadolint'],
\ 'css': ['stylelint'],
\ 'scss': ['stylelint'],
\ 'markdown': ['markdownlint'],
\ 'sql': ['sqlfluff'],
\} \}
let g:ale_fixers = { let g:ale_fixers = {
@ -534,7 +538,10 @@ let g:ale_fixers = {
\ 'yaml': ['prettier'], \ 'yaml': ['prettier'],
\ 'html': ['prettier'], \ 'html': ['prettier'],
\ 'css': ['prettier'], \ 'css': ['prettier'],
\ 'scss': ['prettier'],
\ 'less': ['prettier'],
\ 'markdown': ['prettier'], \ 'markdown': ['prettier'],
\ 'sql': ['sqlfmt'],
\} \}
" Don't fix on save if LSP is handling formatting (avoids double-format) " Don't fix on save if LSP is handling formatting (avoids double-format)
@ -676,6 +683,13 @@ if g:use_vimlsp
let g:lsp_settings_filetype_typescript = ['typescript-language-server'] let g:lsp_settings_filetype_typescript = ['typescript-language-server']
let g:lsp_settings_filetype_javascript = ['typescript-language-server'] let g:lsp_settings_filetype_javascript = ['typescript-language-server']
let g:lsp_settings_filetype_sh = ['bash-language-server'] let g:lsp_settings_filetype_sh = ['bash-language-server']
let g:lsp_settings_filetype_html = ['vscode-html-language-server']
let g:lsp_settings_filetype_css = ['vscode-css-language-server']
let g:lsp_settings_filetype_scss = ['vscode-css-language-server']
let g:lsp_settings_filetype_json = ['vscode-json-language-server']
let g:lsp_settings_filetype_yaml = ['yaml-language-server']
let g:lsp_settings_filetype_markdown = ['marksman']
let g:lsp_settings_filetype_sql = ['sqls']
" Performance: disable virtual text diagnostics in TTY " Performance: disable virtual text diagnostics in TTY
let g:lsp_diagnostics_virtual_text_enabled = !g:is_tty let g:lsp_diagnostics_virtual_text_enabled = !g:is_tty

View file

@ -94,9 +94,8 @@ if [ "$HAS_NODE" -eq 1 ]; then
echo echo
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
step "Installing CoC language servers" step "Installing CoC language servers"
vim +'CocInstall -sync coc-json coc-tsserver coc-pyright coc-sh coc-html coc-css coc-yaml' +qall vim +'CocInstall -sync coc-json coc-tsserver coc-pyright coc-sh coc-html coc-css coc-yaml coc-go coc-rust-analyzer coc-marksman coc-sql' +qall
ok "CoC language servers installed" ok "CoC language servers installed"
echo " Add more with :CocInstall coc-go coc-rust-analyzer etc."
fi fi
else else
echo " To enable LSP without Node.js:" echo " To enable LSP without Node.js:"
@ -126,11 +125,15 @@ echo " ctags (F8 tag browser)"
echo " Ubuntu: sudo apt install universal-ctags" echo " Ubuntu: sudo apt install universal-ctags"
echo " macOS: brew install universal-ctags" echo " macOS: brew install universal-ctags"
echo "" echo ""
echo " Language linters:" echo " Language linters and formatters:"
echo " Python: pip install black flake8 pylint isort" echo " Python: pip install black flake8 pylint isort"
echo " JS/TS: npm install -g prettier eslint typescript" echo " JS/TS: npm install -g prettier eslint typescript"
echo " Go: go install golang.org/x/tools/gopls@latest" echo " Go: go install golang.org/x/tools/gopls@latest"
echo " Shell: sudo apt install shellcheck" echo " Shell: sudo apt install shellcheck # or: brew install shellcheck"
echo " CSS/SCSS: npm install -g stylelint stylelint-config-standard"
echo " Markdown: npm install -g markdownlint-cli"
echo " SQL: pip install sqlfluff | npm install -g sqlfmt"
echo " Markdown LS: brew install marksman # or: https://github.com/artempyanykh/marksman"
echo "" echo ""
echo "Getting started:" echo "Getting started:"
echo " See QUICKSTART.md for the 5-minute guide" echo " See QUICKSTART.md for the 5-minute guide"