aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/stylelint_lsp.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/lua/lspconfig/stylelint_lsp.lua b/lua/lspconfig/stylelint_lsp.lua
new file mode 100644
index 00000000..972389a8
--- /dev/null
+++ b/lua/lspconfig/stylelint_lsp.lua
@@ -0,0 +1,36 @@
+local configs = require('lspconfig/configs')
+local util = require('lspconfig/util')
+
+configs.stylelint_lsp = {
+ default_config = {
+ cmd = {'stylelint-lsp', '--stdio'},
+ filetypes = {
+ 'css',
+ 'less',
+ 'scss',
+ 'sugarss',
+ 'vue',
+ 'wxss',
+ 'javascript',
+ 'javascriptreact',
+ 'typescript',
+ 'typescriptreact'
+ };
+ root_dir = util.root_pattern('.stylelintrc', 'package.json');
+ settings = {};
+ },
+ docs = {
+ description = [[
+https://github.com/bmatcuk/stylelint-lsp
+
+`stylelint-lsp` can be installed via `npm`:
+
+```sh
+npm i -g stylelint-lsp
+```
+]];
+ default_config = {
+ root_dir = [[ root_pattern('.stylelintrc', 'package.json') ]];
+ };
+ };
+}