Skip to content

Commit

Permalink
fix(config): hls.cmd validation fails on list with one element (#412)
Browse files Browse the repository at this point in the history
I noticed if I specify `cmd = { "static-ls" }` I get this empty list
error.
  • Loading branch information
samtay authored Oct 22, 2024
1 parent 39c4ced commit 37a2881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/haskell-tools/lsp/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ LspHelpers.get_hls_cmd = function()
local cmd = Types.evaluate(HTConfig.hls.cmd)
---@cast cmd string[]
assert(type(cmd) == 'table', 'haskell-tools: hls.cmd should evaluate to a string[]')
assert(#cmd > 1, 'haskell-tools: hls.cmd evaluates to an empty list.')
assert(#cmd > 0, 'haskell-tools: hls.cmd evaluates to an empty list.')
return cmd
end

Expand Down

0 comments on commit 37a2881

Please sign in to comment.