We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09eaf34 commit 43c2288Copy full SHA for 43c2288
1 file changed
lua/elixir/credo/init.lua
@@ -24,20 +24,22 @@ function M.setup(opts)
24
file = nil
25
end
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
+ if file then
+ local cmd
+ if type(opts.port) == "number" then
+ cmd = vim.lsp.rpc.connect("127.0.0.1", opts.port)
+ else
+ cmd = { opts.cmd, "--stdio" }
33
+ end
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
- }
+ vim.lsp.start {
+ name = "Credo",
+ cmd = cmd,
+ settings = {},
+ root_dir = vim.fs.dirname(file),
+ on_attach = opts.on_attach or function() end,
41
+ }
42
43
end,
44
})
45
0 commit comments