File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,22 @@ 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
27
+ if file then
28
+ local cmd
29
+ if type (opts .port ) == " number" then
30
+ cmd = vim .lsp .rpc .connect (" 127.0.0.1" , opts .port )
31
+ else
32
+ cmd = { opts .cmd , " --stdio" }
33
+ end
33
34
34
- vim .lsp .start {
35
- name = " Credo" ,
36
- cmd = cmd ,
37
- settings = {},
38
- root_dir = vim .fs .dirname (file ),
39
- on_attach = opts .on_attach or function () end ,
40
- }
35
+ vim .lsp .start {
36
+ name = " Credo" ,
37
+ cmd = cmd ,
38
+ settings = {},
39
+ root_dir = vim .fs .dirname (file ),
40
+ on_attach = opts .on_attach or function () end ,
41
+ }
42
+ end
41
43
end ,
42
44
})
43
45
end
You can’t perform that action at this time.
0 commit comments