Skip to content

Commit 36fa253

Browse files
authored
Merge pull request #3 from kjssad/add-elixirls-config
Add elixir-ls configurations
2 parents d8958ed + c69a7f8 commit 36fa253

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

package.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,70 @@
3737
"type": "string",
3838
"default": "",
3939
"description": "Custom path for elixirLS, use this options if you don't want use bundled elixirLS"
40+
},
41+
"elixirLS.dialyzerEnabled": {
42+
"type": "boolean",
43+
"default": true,
44+
"description": "Run ElixirLS's rapid Dialyzer when code is saved"
45+
},
46+
"elixirLS.dialyzerWarnOpts": {
47+
"description": "Dialyzer options to enable or disable warnings. See Dialyzer's documentation for options. Note that the \"race_conditions\" option is unsupported",
48+
"type": "array",
49+
"uniqueItems": true,
50+
"items": {
51+
"type": "string",
52+
"enum": [
53+
"error_handling",
54+
"no_behaviours",
55+
"no_contracts",
56+
"no_fail_call",
57+
"no_fun_app",
58+
"no_improper_lists",
59+
"no_match",
60+
"no_missing_calls",
61+
"no_opaque",
62+
"no_return",
63+
"no_undefined_callbacks",
64+
"no_unused",
65+
"underspecs",
66+
"unknown",
67+
"unmatched_returns",
68+
"overspecs",
69+
"specdiffs"
70+
]
71+
},
72+
"default": []
73+
},
74+
"elixirLS.dialyzerFormat": {
75+
"description": "Formatter to use for Dialyzer warnings",
76+
"type": "string",
77+
"enum": [
78+
"dialyzer",
79+
"dialyxir_short",
80+
"dialyxir_long"
81+
],
82+
"default": "dialyzer"
83+
},
84+
"elixirLS.mixEnv": {
85+
"type": "string",
86+
"description": "Mix environment to use for compilation",
87+
"default": "test",
88+
"minLength": 1
89+
},
90+
"elixirLS.projectDir": {
91+
"type": "string",
92+
"description": "Subdirectory containing Mix project if not in the project root",
93+
"minLength": 1
94+
},
95+
"elixirLS.fetchDeps": {
96+
"type": "boolean",
97+
"description": "Automatically fetch project dependencies when compiling",
98+
"default": true
99+
},
100+
"elixirLS.suggestSpecs": {
101+
"type": "boolean",
102+
"description": "Suggest @spec annotations inline using Dialyzer's inferred success typings (Requires Dialyzer)",
103+
"default": true
40104
}
41105
}
42106
}

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ exports.activate = (context: ExtensionContext) => {
2525

2626
const clientOptions = {
2727
documentSelector: [{ language: 'elixir', scheme: 'file' }, { language: 'elixir', scheme: 'untitled' }],
28+
synchronize: { configurationSection: 'elixir', fileEvents: [ workspace.createFileSystemWatcher('**/*.{ex,exs,erl,yrl,xrl,eex}') ] }
2829
};
2930

3031
const languageClient = new LanguageClient('elixir', 'elixir', serverOptions, clientOptions);

0 commit comments

Comments
 (0)