Skip to content

Commit ee2e2b2

Browse files
authored
Add support for mix target (#28)
* Add support for mix target * Update mixTarget description to match vs code plugin
1 parent 99715a2 commit ee2e2b2

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Plug 'amiralies/coc-elixir', {'do': 'yarn install && yarn prepack'}
3232
- Smart closing of code blocks
3333
- Code formatter
3434

35-
## Dialayzer integration
35+
## Dialyzer integration
3636
Coc-elixir will automatically analyze your project with [Dialyzer](http://erlang.org/doc/apps/dialyzer/dialyzer_chapter.html) after each successful build. It maintains a "manifest" file in `.elixir_ls/dialyzer_manifest` that stores the results of the analysis.
3737

3838
You can control which warnings are shown using the `elixirLS.dialyzerWarnOpts` setting in `coc-setting.json`, found at `~/.config/nvim/coc-settings.json`, or use command `:CocConfig` to open configuration file.
@@ -46,6 +46,18 @@ To disable Dialyzer completely add setting:
4646
```
4747
You can also set the module attribute @dialyzer to show or hide warnings at a module or function level.
4848

49+
## Mix environment and target settings
50+
51+
You can control the settings that ElixirLS uses for Mix environment and target using either the user `coc-settings.json` or a [workspace configuration](https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file#configuration-file-resolve).
52+
53+
To change the Mix environment and target, add the settings:
54+
```json
55+
{
56+
"elixirLS.mixEnv": "dev",
57+
"elixirLS.mixTarget": "test"
58+
}
59+
```
60+
4961
## Troubleshooting
5062

5163
### Server fails to start

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
"default": "test",
108108
"minLength": 1
109109
},
110+
"elixirLS.mixTarget": {
111+
"scope": "resource",
112+
"type": "string",
113+
"description": "Mix target to use for compilation (requires Elixir >= 1.8)",
114+
"minLength": 0
115+
},
110116
"elixirLS.projectDir": {
111117
"type": "string",
112118
"description": "Subdirectory containing Mix project if not in the project root",

0 commit comments

Comments
 (0)