File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ local elixirls = require("elixir.elixirls")
87
87
88
88
elixir .setup {
89
89
credo = {
90
- cmd = " path/to/credo-language-server" ,
90
+ port = 9000 , -- connect via TCP with the given port. mutually exclusive with `cmd`
91
+ cmd = " path/to/credo-language-server" , -- path to the executable. mutually exclusive with `port`
91
92
on_attach = function (client , bufnr )
92
93
-- custom keybinds
93
94
end
Original file line number Diff line number Diff line change @@ -24,10 +24,16 @@ function M.setup(opts)
24
24
file = nil
25
25
end
26
26
27
+ local cmd
28
+ if type (opts .port ) == " number" then
29
+ cmd = vim .lsp .rpc .connect (" 127.0.0.1" , opts .port )
30
+ else
31
+ cmd = { opts .cmd , " --stdio" }
32
+ end
33
+
27
34
vim .lsp .start {
28
35
name = " Credo" ,
29
- -- cmd = vim.lsp.rpc.connect('127.0.0.1', 9000),
30
- cmd = { opts .cmd , " --stdio" },
36
+ cmd = cmd ,
31
37
settings = {},
32
38
root_dir = vim .fs .dirname (file ),
33
39
on_attach = opts .on_attach or function () end ,
You can’t perform that action at this time.
0 commit comments