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")
8787
8888elixir .setup {
8989 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`
9192 on_attach = function (client , bufnr )
9293 -- custom keybinds
9394 end
Original file line number Diff line number Diff line change @@ -24,10 +24,16 @@ function M.setup(opts)
2424 file = nil
2525 end
2626
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+
2734 vim .lsp .start {
2835 name = " Credo" ,
29- -- cmd = vim.lsp.rpc.connect('127.0.0.1', 9000),
30- cmd = { opts .cmd , " --stdio" },
36+ cmd = cmd ,
3137 settings = {},
3238 root_dir = vim .fs .dirname (file ),
3339 on_attach = opts .on_attach or function () end ,
You can’t perform that action at this time.
0 commit comments