Implements LSP documentSymbol request to provide a list of all symbols
defined in the current document. Clients use it to show an outline and
allow to jump to the symbol's definition.
If the user declines a fix, it will stop fixing the file it's looking
at and go on to the next one.
If they accept the fix, we have to re-run diagnostics, because fixes
can change offsets and line numbers.
Add tests that invoke the `fennel-ls` executable as a subprocess.
This implements the simple form of the signatureHelp feature, which only
displays the signature of the function being typed, without indication
of the active argument.
Active argument detection, while accounting for destructuring to support
each and for special forms turned out to be more involved than expected
and is left for a follow up patch.
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.
== Features ==
* Updated to fennel 1.5.0
* Better results when syntax errors are present
* Docs for each Lua version: 5.1 through 5.4
* Docs for TIC-80
== Changes ==
* --check is now --lint
== Bug Fixes ==
* Solved a case where there were duplicate completion candidates
* Special workaround for Eglot to be able to complete multisyms
To be honest, this isn't even Eglot's fault; the LSP specification leaves it ambiguous
[Eglot's issue](https://github.com/joaotavora/eglot/issues/402)
[LSP's issue](https://github.com/microsoft/language-server-protocol/issues/648)
[fennel-mode can't fix it on their end](188ee04e86)
== Misc ==
* Switch json libraries from rxi/json.lua to dkjson
* Lots of refactoring and renaming things
* You can now build fennel-ls with no vendored dependencies if you want
* Building is more reproducible now! `tools/get-deps.fnl` will reproducibly get all the deps, instead of you needing to trust me
* faith updated to 0.2.0
== Features ==
* Completions and docs for `coroutine`, `debug`, `io`, `math`, `os`, `string`, `table`, `utf8` and their fields.
* Global metadata can follow locals: With `(local p print)`, looking up `p` will show `print`'s information.
* New lint for erroneous calls to (values) that are in a position that would get truncated immediately.
* Upgrade to Fennel 1.4.2
== Bug Fixes ==
* `(-?> x)` and similar macros no longer give a warning (even in fennel 1.4.1 before my -?> patch landed)
* Fixed off-by-one when measuring the cursor position on a multisym. For example, `table|.insert` (where `|` is the cursor) will correctly give information about `table` instead of `insert`.
* Can give completions in the contexts "(let [x " and "(if ", which previously failed to compile.
* Fields added to a table via `(fn t.field [] ...)` now properly appear in completions
* `(include)` is now treated like `(require)`
== Misc ==
* Switched testing framework to faith
* Tests abstract out the filesystem
* Tests use the "|" character to mark the cursor, instead of manually specifying coordinates
=== Features ===
* Add [Nix(OS)](https://nixos.org) support
* Add LuaRocks build support
* Upgrade to Fennel 1.4.1, the first release of fennel that is compatible with fennel-ls without patches.
* Added a lint for operators with no arguments, such as (+)
* `textEdit` field is present in completions
=== Bug Fixes ===
* Fix bug with renaming variables in method calls
* Lots of work to improve multival tracking
* --check gives a nonzero exit code when lints are found
* Adds `/flake.nix`, which allows the package to be installed & developed
easily by most NixOS users.
* Adds `/default.nix`, which is an older way that some Nix(OS) users
may expect software to be packaged.
* Adds `/nix/**/*.nix`, which defines various additional helpers used by
`/flake.nix` and `/default.nix`.
* Updates `.gitignore` to include `/result`, which is the default output
location when the package is built using
`nix flake build .` or `nix-build .`
there should now be no cases where multivals and table destructures are
confused. ie, (local [_ x] (values 1 2)) and (local (_ x) [1 2]) are recognized
as nonsense.