~xerool

Trackers

~xerool/fennel-ls

Last active 17 days ago

#8 textDocument/rename responds with duplicated edits 18 days ago

~xerool assigned ~xerool to #8 on ~xerool/fennel-ls

#8 textDocument/rename responds with duplicated edits 18 days ago

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!

#7 fix workspace/didChangeConfiguration a month ago

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.

#180 symbols at the end of a file have incorrect :byteend metadata 2 months ago

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 4

I 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.

#6 some unused variables are missed 2 months ago

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)

#5 macro path ? in folder name 2 months ago

Comment by ~xerool on ~xerool/fennel-ls

REPORTED RESOLVED INVALID

#5 macro path ? in folder name 2 months ago

Comment 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 is path/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 through require calls if the path is set wrong, but it doesn't generate any diagnostics showing that a require'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

#3 Fix macro path 2 months ago

Comment by ~xerool on ~xerool/fennel-ls

REPORTED RESOLVED FIXED

#3 Fix macro path 2 months ago

Comment by ~xerool on ~xerool/fennel-ls

RESOLVED CLOSED REPORTED

#3 Fix macro path 2 months ago

Comment by ~xerool on ~xerool/fennel-ls

REPORTED RESOLVED CLOSED