These strings will be displayed in a menu for the user to select.
The error codes, in addition to not being human readable sentences,
describe the issue being reported, not the solution that will be
applied.
The code action response only includes the human readable string, so the
tests need to check for that. I considered adding a custom field but
decided against going out of spec.
I received feedback that the info on setting up libraries is a little
buried in all the other details.
Pulling it up, it's likely going to be the first and most frequent
configuration people will want to change.
documentHighlight was highlighting symbols that were defined in other
files (incorrectly, because the response only contains ranges, not
locations), but this feature is meant for the current document only.
Unfortunately the experience here is not great, at least in emacs; the
spec states that the server may send showMessage during initialization,
but eglot displays these messages only for a brief flash, quickly
replacing them with the "Connected!" message.
We probably need a different solution here but it might get ugly; like
some kind of outbound queue.
The docsets are the same .lua files that are currently being generated
by `make docs`, renamed to .fls to distinguish them from regular code
files.
The files should be copied to $XDG_DATA_HOME/fennel-ls/docsets/, the
subdirectory allows the directory to be used for other things in the
future, maybe some global configutation.
The docset are only loaded if the librarys are added to flsproject.fnl
with the same syntax used until now.
But selflint still does not pass. This appears to be due to bugs:
src/fennel-ls/searcher.fnl:9:10: unknown field: path-sep
src/fennel-ls.fnl:44:2: unknown field: table.unpack
The first one is a pretty clear issue with the field being exported
from fennel-ls.utils but somehow not picked up; reason is unclear.
The second is due to the macroexpansion of `case` making reference to
`table.unpack`, but I think it should be suppressed because the
unknown global is not in this code; it's in the macro.
Once these get fixed, we can add selflint to the ci target.