Commit Graph

250 Commits

Author SHA1 Message Date
Michele Campeotto
515e40bd4c Fix unknown field false positive
When attempting to search through a require, analyzer.search-list was
returning nil instead of indeterminate if it could not find the file.

Fixes #89
2025-11-08 11:58:14 -06:00
XeroOl
7036ce5f22 fix push diagnostics sending outdated diagnostics 2025-10-26 14:03:27 -05:00
XeroOl
389de94d09 Release 0.2.2 2025-10-25 15:24:26 -05:00
XeroOl
f5ae8f1803 update to fennel version 1.6.0 2025-10-25 15:18:02 -05:00
XeroOl
59b59b98fd meta tests for selflint and release version 2025-10-25 14:12:50 -05:00
Michele Campeotto
9ea6a0965b Add documentSymbol support
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.
2025-10-22 09:55:55 -05:00
Phil Hagelberg
53426c0a3e Don't loop endlessly on EOF in server mode. 2025-10-19 13:32:38 -07:00
Phil Hagelberg
7313599907 Revert "Enable legacy-multival lint on fennel-ls itself and fix self-lints."
This reverts commit bf17771bab.
2025-10-19 13:32:38 -07:00
Michele Campeotto
1061db98d0 Don't drop multisym delimiters at the end of a symbol
added a test for completions
2025-10-19 15:24:33 -05:00
Phil Hagelberg
2b79a0955f Add --fix command to CLI.
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.
2025-10-12 15:39:49 -07:00
Phil Hagelberg
bf17771bab Enable legacy-multival lint on fennel-ls itself and fix self-lints. 2025-10-07 20:10:11 -07:00
Phil Hagelberg
2b2c31c577 Add legacy-multival/legacy-multival-case lint and fix.
As of Fennel 1.6.0, parens in destructuring is deprecated, and we want
to make it easy for people to convert to using table destructuring
instead since it's optimized to compile to the same thing.
2025-10-07 10:18:04 -07:00
XeroOl
cd9821cd80 fix fennel-ls#81 2025-08-29 16:09:27 -05:00
XeroOl
5c0894d57d fix vararg issue in compiler environment 2025-08-29 15:41:07 -05:00
XeroOl
13b75260b2 fix initialization options ignoring symbol splitting 2025-08-22 19:03:53 -05:00
Rudolf Adamkovič
fe3fd3340d Add empty-do hint 2025-08-16 10:07:19 -07:00
XeroOl
dce69a2b24 test that functions don't evaluate to themselves
There was a bug at some point that fennel assumed a function call would
evaluate to the function being called, which is not true.
2025-08-13 13:03:21 -05:00
XeroOl
bf3f353b8d fix issue with duplicate errors
fixes #75
2025-08-08 01:12:57 -05:00
XeroOl
a366e5996d rewrite diagnostics to support pull diagnostics 2025-08-07 22:57:07 -05:00
XeroOl
c127c54937 sort text for completions
some cursed heuristics for completions, because nvim-cmp kept getting
them wrong. nvim-cmp actually prioritizes kind over sort text, so it
will still get it wrong, but I'm hoping that having a correct sort-text
helps other editors.
2025-08-01 19:28:23 -05:00
XeroOl
38cfd9a249 tricky macro hidden scope completions
it's hard to tell which scope something is in. This makes completions a
little better but it misses docs during good completion
2025-07-30 15:59:43 -05:00
XeroOl
735d8d5663 suppress warnings during tests 2025-07-30 14:25:55 -05:00
XeroOl
2a23d2f950 fix completion scope bug and fix completion macro call special case and add completions for nil and false and true and improve completion test speeds
I did a lot in one big commit.

fix bug where (each [foo (ipairs [])] |)  wouldn't suggest foo
fix bug with (doto foo |) wouldn't suggest specials and macros, even though it expands to | in a call position
completions for true, false, nil, .nan, .inf
docs for true, false, nil
clarify error message when passing a folder to --lint
improved test performance for completion tests
2025-07-30 00:29:32 -05:00
XeroOl
0828820097 completions no longer suggest invalid fields 2025-07-26 19:10:41 -05:00
XeroOl
251a7789a4 add undocumented :compiler-instruction-limit setting
Not sure if I want to keep this, but you can now configure fennel-ls
to cap how long it allows the compiler to compile each top level form.
It will stay undocumented for now.
2025-07-23 23:51:05 -05:00
XeroOl
abce63e696 fix hover message 2025-07-19 15:16:37 -05:00
XeroOl
319a2ddf10 better messages for not-enough-arguments and too-many-arguments 2025-07-18 13:23:10 -05:00
XeroOl
284a760224 fix the | virtual cursor character appearing in completion output 2025-07-18 12:45:48 -05:00
XeroOl
0817af9488 New nested-associative-operator lint
I want to also get like (if a (if b c)) at some point, but this lint
only covers the ones where flattening fixes it always.
2025-07-17 16:37:44 -05:00
XeroOl
5a2e6ef091 fix ci and add more changelog 2025-07-16 22:50:18 -05:00
XeroOl
1c3d7fbe21 make the completion tests run faster
performance is starting to bother me, but I've made completions faster (in tests).
2025-07-16 02:05:31 -05:00
XeroOl
8811454456 split mismatched-argument-count lint into not-enough-arguments and too-many-arguments 2025-07-15 22:56:20 -05:00
XeroOl
4671d50234 new lint invalid-flsproject-settings, and completely rewrite the way settings get checked 2025-07-15 00:57:06 -05:00
XeroOl
c0a740461b move documentation check to later 2025-07-14 22:56:49 -05:00
XeroOl
b0760a2aad stop tracking doc/lints.md 2025-07-13 13:05:50 -05:00
XeroOl
722a3a6089 make selflint now covers tests 2025-07-12 16:11:51 -05:00
XeroOl
d4c24b00f4 duplicate-table-keys lint 2025-07-12 16:11:36 -05:00
XeroOl
561f199505 hardcode in some argument counting exceptions 2025-07-11 23:39:01 -05:00
XeroOl
5143310b90 introduce mismatched-argument-count lint 2025-07-11 19:16:06 -05:00
XeroOl
772d59fff1 more changes to the linting system 2025-07-11 18:22:16 -05:00
XeroOl
7b215e15e8 fix completions in comments and strings, and more reliable binding completions 2025-07-11 14:06:33 -05:00
XeroOl
28e20f74cb better completions in destructure bindings 2025-07-08 23:01:11 -05:00
XeroOl
e17ecef292 macroexpansion feature for hover and code action 2025-07-08 20:49:35 -05:00
XeroOl
1e8784a55a rework hovering 2025-07-02 22:37:02 -05:00
XeroOl
0641b1b098 simplify completions 2025-07-02 19:11:10 -05:00
XeroOl
e2e020e3ba slightly better hashfn support 2025-06-28 19:35:39 -05:00
XeroOl
fc57612fea clean up quickfix lint title system 2025-06-25 00:52:46 -05:00
XeroOl
6f946c76ea add lint that (let [] ...) should be (do ...) 2025-06-19 12:56:29 -05:00
XeroOl
cb9f09ba84 hotfix issue with path join
Not sure why I didn't test these changes, but the path-join function
didn't actually work fully as expected.
Now, various edge cases have been ironed out:
"/path" + "/foo/bar" -> "/foo/bar", instead of "/path/foo/bar"
"" + "code.fnl" -> "code.fnl", instead of "/code.fnl"
2025-06-06 11:43:49 -05:00
XeroOl
87439744b8 rename "check" test to "cli"
technically the corresponding item in the real code was renamed to
--lint, but that's the file we should use to write future tests.
2025-06-02 22:36:11 -05:00