~xerool assigned ~xerool to #8 on ~xerool/fennel-ls
Comment by ~xerool on ~xerool/fennel-ls
I suspect this is because the λ macro is expanding to code that references the variable more than once. Good catch!
Ticket created by ~xerool on ~xerool/fennel-ls
Thank you to ~adjuvant for finding this.
Apparently, the spec's description of
workspace/didChangeConfiguration
involves the server sending a request for the configuration.It seems like it should be possible to simply add some code to make the request.
Ticket created by ~xerool on ~technomancy/fennel
Symbols at the end of the file have a
byteend
that extends past the end of the file. The following code parses the text"x x"
, and prints the byte ranges of the two symbols.(local fennel (require :fennel)) (print :fennel fennel.version) ;; => fennel 1.3.1 (local p (fennel.parser "x x")) (local (_ok ast1) (assert (p))) (local (_ok ast2) (assert (p))) (print ast1.bytestart ast1.byteend) ;; => 1 1 (print ast2.bytestart ast2.byteend) ;; => 3 4I expected the last line to print 3 3, because there is no fourth byte in the file.
note: it correctly prints 3 3 on
"x x "
with the trailing space.note: the problem is specific to symbols and varg. It works as I expect for lists/tables/sequences, and number/string/boolean does not have a byteend to check.
Ticket created by ~xerool on ~xerool/fennel-ls
A couple cases where a lexical variable is unused but no diagnostic is written:
;; y is unused, but not detected (let [(x y) (some-multival-fn)] x) ;; x is *technically* used because of lambda, ;; but an unused warning would still be very useful (λ [x] nil)
Comment by ~xerool on ~xerool/fennel-ls
REPORTED
RESOLVED INVALIDComment by ~xerool on ~xerool/fennel-ls
I can't reproduce the problem, everything seems to be working fine for me.
If the root dir is
path/to/godbolt.nvim
, then{:settings {:fennel-ls {:macro-file "./fnl/?/macros.fnl"}}}
finds the macro file.
If the root dir ispath/to/godbolt.nvim/fnl
, then{:settings {:fennel-ls {:macro-file "./?/macros.fnl"}}}
finds the macro file.You can check your root dir in Neovim with lsp-config by calling
:LspInfo
.Note: When the root dir
godbolt.nvim/
, I also needed to add the configuration "fennel-path": "./fnl/?/init.fnl;./fnl/?.fnl" for any cross-module stuff to work. This silently fails if it is set to the wrong value! Things like go-to-definition can't go throughrequire
calls if the path is set wrong, but it doesn't generate any diagnostics showing that arequire
's module isn't found. I should probably make another issue for that)I can't help any more than this, but this hopefully gives enough information for you to debug it on your own