fix zero-arg documented function formatting

This commit is contained in:
XeroOl 2024-05-14 00:18:07 -05:00
parent 9bad702d91
commit e37c77958d
2 changed files with 9 additions and 3 deletions

View File

@ -29,9 +29,11 @@ user code. Fennel-ls doesn't support user-code formatting as of now."
"formats a special using its builtin metadata magic"
(..
(code-block
(if metadata.fnl/arglist
(.. "(" (tostring binding) " " (table.concat metadata.fnl/arglist " ") ")")
(tostring binding)))
(if (not metadata.fnl/arglist)
(tostring binding)
(= 0 (length metadata.fnl/arglist))
(.. "(" (tostring binding) ")")
(.. "(" (tostring binding) " " (table.concat metadata.fnl/arglist " ") ")")))
"\n"
metadata.fnl/docstring))

View File

@ -233,6 +233,10 @@
(t.i"
["insert"]
[{:documentation #(= nil $)}])
(check "debug.deb|"
[{:label "debug"
:documentation #(and $.value ($.value:find "```fnl\n(debug.debug)\n```" 1 true))}]
[])
nil)
(local eglot {:params {:capabilities {:general {:positionEncodings [:utf-8]}}