diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-04-10 01:04:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-10 01:04:58 -0700 |
| commit | 94a8bc07081e437b1045894014aac29c9c22bc16 (patch) | |
| tree | c0d913b4193d2621f490435cb34de6a0ca98a13a /lua | |
| parent | [docgen] Update README.md (diff) | |
| parent | Support stylelint lsp (diff) | |
| download | nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.tar nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.tar.gz nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.tar.bz2 nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.tar.lz nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.tar.xz nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.tar.zst nvim-lspconfig-94a8bc07081e437b1045894014aac29c9c22bc16.zip | |
Merge pull request #800 from dewey92/stylelint-support
Support stylelint lsp
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/stylelint_lsp.lua | 36 |
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') ]]; + }; + }; +} |
