stylelint-lsp is an implementation of the Language Server Protocol for stylelint. It supports the following features:
stylelint --fix
on the file.Formatting (ie, stylelint --fix
) can be configured to run automatically on
save, in response to format requests, or run manually using a command.
false
) - automatically apply fixes in response
to format requests.false
) - automatically apply fixes on save.null
) - stylelint config to use.null
) - path to stylelint config file.true
) - if false, disable linting and auto-formatting.false
) - lint on save.true
) - lint after changes.If neither config nor configFile are specified, stylelint will attempt to automatically find a config file based on the location of the file you are editing.
If both validateOnSave and validateOnType are set to false
, no
linting will occur but auto-fixes can still be applied if you have it enabled.
validateOnSave is automatically enabled if you enable autoFixOnSave
because revalidation must occur after fixes are applied. You may wish to
explicitly turn on validateOnSave if you are using another editor extension
that will make changes to the file on save, otherwise, diagnostic messages from
stylelint may be out-of-date after a save (ie, may point to the wrong line or
may have been fixed by the automatic changes on save, etc).
Note that v2 of stylelint-lsp no longer supports configOverrides because the latest version of stylelint no longer supports it.
Some ideas were borrowed from vscode-eslint and coc-eslint.