mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
CSS, SCSS and Less files get Stylelint diagnostics from the Stylelint language server, installed on demand like the other tools. A project's Stylelint config is picked up as is, a Fix Stylelint Problems action applies the server's fixes, and the built-in CSS diagnostics step aside for rules Stylelint covers. Closes #5156 Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com>
33 lines
1.5 KiB
TOML
33 lines
1.5 KiB
TOML
id = "scss"
|
|
name = "SCSS"
|
|
formatter = { tool = "prettier", parser = "scss", range = false }
|
|
extensions = ["scss"]
|
|
line-comment = "//"
|
|
block-comment = ["/*", "*/"]
|
|
indent = { tab-size = 2, insert-spaces = true }
|
|
ui-mode = "SCSS"
|
|
|
|
[[language-servers]]
|
|
name = "vscode-css-language-server"
|
|
command = "vscode-css-language-server"
|
|
args = ["--stdio"]
|
|
initialization-options = { provideFormatter = true, css = {}, scss = {}, less = {} }
|
|
install-hint = "npm i -g vscode-langservers-extracted"
|
|
|
|
# Stylelint: only below a project's Stylelint configuration; the server runs the project's own
|
|
# stylelint. Diagnostics, quick fixes and fix-all (Code Cleanup, Actions on Save) only: the
|
|
# server's formatting applies the same fixes, and Reformat Code stays the formatter's.
|
|
[[language-servers]]
|
|
name = "stylelint"
|
|
command = "stylelint-language-server"
|
|
args = ["--stdio"]
|
|
root-markers = [".stylelintrc", ".stylelintrc.json", ".stylelintrc.yaml", ".stylelintrc.yml", ".stylelintrc.js", ".stylelintrc.cjs", ".stylelintrc.mjs", ".stylelintrc.ts", ".stylelintrc.cts", ".stylelintrc.mts", "stylelint.config.js", "stylelint.config.cjs", "stylelint.config.mjs", "stylelint.config.ts", "stylelint.config.cts", "stylelint.config.mts", "package.json#stylelint"]
|
|
require-root-marker = true
|
|
features = ["code-action", "diagnostics"]
|
|
install-hint = "npm i -g @stylelint/language-server"
|
|
|
|
# Read as section `stylelint`: the languages it lints (its default is CSS only).
|
|
[language-servers.settings]
|
|
validate = ["css", "scss", "less"]
|
|
snippet = ["css", "scss", "less"]
|