Skip to content

Commit dfc2605

Browse files
committed
feat(projectionist): allow disabling the projectionist integration
1 parent 66ccac7 commit dfc2605

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ Requires 0.8
5050
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
5151
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
5252
end,
53+
},
54+
projectionist = {
55+
enable = true
5356
}
5457
}
5558
end,
@@ -75,14 +78,15 @@ The minimal setup will configure both ElixirLS but not Next LS.
7578
require("elixir").setup()
7679
```
7780

78-
Next LS and ElixirLS can be enabled/disabled by setting the `enable` flag in the respective options table.
81+
Next LS, ElixirLS, and Projectionist can be enabled/disabled by setting the `enable` flag in the respective options table.
7982

8083
The defaults are shown below.
8184

8285
```lua
8386
require("elixir").setup({
8487
nextls = {enable = false},
8588
elixirls = {enable = true},
89+
projectionist = {enable = true},
8690
})
8791
```
8892

lua/elixir/init.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function M.setup(opts)
8989
opts.elixirls = opts.elixirls or {}
9090
opts.credo = opts.credo or {}
9191
opts.nextls = opts.nextls or {}
92+
opts.projectionist = opts.projectionist or {}
9293

9394
define_user_command()
9495

@@ -107,7 +108,11 @@ function M.setup(opts)
107108
end
108109

109110
mix.setup()
110-
projectionist.setup()
111+
112+
if enabled(opts.projectionist) then
113+
projectionist.setup(opts.projectionist)
114+
end
115+
111116
if enabled(opts.elixirls.enable) then
112117
elixirls.setup(opts.elixirls)
113118
end

0 commit comments

Comments
 (0)