Skip to content

Commit 310a198

Browse files
authored
Add file watcher configuration (sublimelsp#47)
1 parent 815dcf1 commit 310a198

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

LSP-eslint.sublime-settings

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,4 @@
11
{
2-
"command": ["${node_bin}", "${server_path}", "--stdio"],
3-
"languages": [
4-
{
5-
"languageId": "javascriptreact",
6-
"document_selector": "source.jsx | source.js.jsx | source.js.react",
7-
},
8-
{
9-
"languageId": "javascript",
10-
"document_selector": "source.js",
11-
},
12-
{
13-
"languageId": "typescriptreact",
14-
"document_selector": "source.tsx | source.ts.react",
15-
},
16-
{
17-
"languageId": "typescript",
18-
"document_selector": "source.ts",
19-
},
20-
{
21-
"languageId": "vue",
22-
"document_selector": "text.html.vue",
23-
},
24-
{
25-
"languageId": "html",
26-
"document_selector": "text.html.basic",
27-
},
28-
],
292
"settings": {
303
"codeAction.disableRuleComment": {
314
// Show the disable code actions.
@@ -88,10 +61,45 @@
8861
// NOTE that the `{ "pattern": glob pattern }` variant is not supported in LSP-eslint.
8962
// "workingDirectories": null
9063
},
64+
// File watching functionality only works with "LSP-file-watcher-chokidar" package installed.
65+
"file_watcher": {
66+
"patterns": [
67+
"**/.eslintr{c.js,c.yaml,c.yml,c,c.json}",
68+
"**/.eslintignore",
69+
"**/package.json",
70+
]
71+
},
72+
"command": ["${node_bin}", "${server_path}", "--stdio"],
9173
"env": {
9274
// Enables ESLint debug mode
9375
// "DEBUG": "eslint:*,-eslint:code-path",
9476
// The value of NODE_ENV to use when running eslint tasks.
9577
// "NODE_ENV": "production",
9678
},
79+
"languages": [
80+
{
81+
"languageId": "javascriptreact",
82+
"document_selector": "source.jsx | source.js.jsx | source.js.react",
83+
},
84+
{
85+
"languageId": "javascript",
86+
"document_selector": "source.js",
87+
},
88+
{
89+
"languageId": "typescriptreact",
90+
"document_selector": "source.tsx | source.ts.react",
91+
},
92+
{
93+
"languageId": "typescript",
94+
"document_selector": "source.ts",
95+
},
96+
{
97+
"languageId": "vue",
98+
"document_selector": "text.html.vue",
99+
},
100+
{
101+
"languageId": "html",
102+
"document_selector": "text.html.basic",
103+
},
104+
],
97105
}

0 commit comments

Comments
 (0)