Phil Hagelberg
024083c7d2
Add test for config validation.
2025-02-28 02:30:59 -08:00
Phil Hagelberg
670f7d108b
Only generate lua manual docs; move tic80/love2d to other repo.
...
https://git.sr.ht/~technomancy/fennel-ls-docsets
2025-02-28 02:30:55 -08:00
Michele Campeotto
bb2ccd67c2
Add support for textDocument/documentHighlight
2025-02-27 18:18:35 -08:00
Phil Hagelberg
d23d36a414
Support :union as lua-version setting.
2025-02-26 23:09:11 -08:00
Phil Hagelberg
0d7e9b6183
Add test to ensure that evil docsets can't run evil code.
2025-02-26 22:54:42 -08:00
Phil Hagelberg
9b54f882c9
Add tests for tic80 docset and fake external docset.
2025-02-26 22:41:59 -08:00
Phil Hagelberg
98cd94d212
Add aliases for lua-versions.
...
Now you can specify "lua54" OR "lua5.4" and get what you need.
2025-02-26 01:38:58 -08:00
Phil Hagelberg
d7b88efe69
Only set default completion kind when it's not already present!
2025-02-26 01:12:02 -08:00
Michele Campeotto
1d2ea48c16
allow docs to set the item kind
2025-02-25 05:38:50 -08:00
Phil Hagelberg
78da9c2edc
Add support for :intersection as lua version.
...
This will only accept globals which are present in every Lua version
from 5.1-5.4. Using this for selflint currently fails, so let's fix
that next.
2025-02-25 01:08:07 -08:00
Phil Hagelberg
dc833b8db9
Disable failing tests.
2025-02-15 09:51:54 -08:00
Phil Hagelberg
adcff56050
Fix warning in completion test; remove unused stuff from makefile.
2025-02-15 09:51:54 -08:00
XeroOl
ae66e6d002
analyzer can search into macro expansions and functions
...
shoutouts to rudy for working with me on these changes.
2025-01-19 19:56:37 -06:00
Phil Hagelberg
e5dc04764c
Allow trailing underscores to bypass unused local warnings.
2025-01-05 12:40:25 -08:00
Phil Hagelberg
3979ab4c3c
Strings beginning with digits can't be rewritten as syms.
...
Also fix a self-lint.
2025-01-05 12:39:10 -08:00
XeroOl
7f15f64e22
tset lint should only apply when rewriting as sym is valid
2024-12-28 15:50:44 -06:00
Phil Hagelberg
baf1065f0b
Add assert-ok helper for linting tests.
...
Also factor out FAITH_TEST flag so you can use it to run an entire
module, not just individual tests.
2024-10-10 19:54:18 -05:00
Phil Hagelberg
b5dbeb28fe
Add unnecessary-tset, unnecessary-do, and redundant-do lints.
...
"Redundant" means that it's a `do` in a context where there's already
an implicit `do`, as defined by fennel.syntax indicating body-form? is
true. Unnecessary means it only has one argument.
2024-10-10 19:50:16 -05:00
Phil Hagelberg
a27f42bfa4
Add match-should-case lint and fix action.
...
When a `match` call's patterns do not contain any symbols that reference
the outer scope, then there is no reason to use `match`; that call
should be replaced with `case`.
This allocates diagnostic code 308 to match-should-case.
In order to detect this, I had to add a loop over file.lexicals. This
is often a very large table, so it could adverse performance impact. I
believe it is necessary in order to distinguish between case vs match
since other means seem to only be applied after macroexpansion by
which time neither one exists.
I've updated docs/linting.md to mention the new loop and cleaned up a
few things in that file that were outdated.
I've added tests for the new lint to ensure it doesn't trigger when it
shouldn't.
2024-10-10 19:46:59 -05:00
XeroOl
5e8b31ea47
use fennel 1.5's native debug tracking
2024-09-03 12:17:53 -05:00
XeroOl
58c79a727e
Add tests for editing flsconfig
2024-07-30 22:30:56 -05:00
XeroOl
3d1485060c
fix "unknown module field" when accessing fields from doc objects with no known fields
...
this means stuff like `io.stderr:write` isn't a warning anymore
2024-07-15 17:48:11 -05:00
XeroOl
07e8239216
goto module definition tested
2024-07-09 20:37:11 -05:00
XeroOl
6801d0d3d9
unknown module field lint works on definitions
2024-07-07 23:54:17 -05:00
XeroOl
d015776f5e
configuration rename some keys
2024-07-07 22:00:59 -05:00
XeroOl
b0b91a4fd4
refactoring
2024-07-07 14:31:22 -05:00
XeroOl
fbd9b0981f
switch from initialization options and didChangeConfiguration to flsproject.fnl
2024-07-05 12:40:15 -05:00
XeroOl
d309c80541
simplify tests. only one create-client function
2024-07-05 00:25:51 -05:00
XeroOl
9e9af12f41
fix issue with (set (. x y) z)
...
fennel needs to skip these instead of failing to parse them
2024-06-30 18:37:55 -05:00
XeroOl
eff9bced51
basic hovering
2024-06-24 00:48:51 -05:00
XeroOl
b11b5b7962
small changes
2024-06-24 00:22:51 -05:00
XeroOl
d8bfaa3559
--check is now --lint
2024-06-23 15:44:35 -05:00
XeroOl
664ba9b13d
bunch of small changes
2024-06-15 22:32:46 -05:00
Rudolf Adamkovič
d4343392ab
Format '--check' errors so that tooling can detect them
2024-06-15 22:30:18 -05:00
XeroOl
14094762ab
Switch from rxi/json to dkjson, switch folder structure
2024-06-09 17:36:19 -05:00
XeroOl
7469a8854c
Remove faith's readme
2024-06-09 17:36:08 -05:00
XeroOl
8dc4f3d0f8
Rename language -> analyzer
2024-06-05 01:22:08 -05:00
XeroOl
c56ce89ccf
λ now warns about unused arguments
2024-06-04 20:17:21 -05:00
XeroOl
7194838132
return both the server and client from create-client
2024-06-01 23:17:00 -05:00
XeroOl
9770e3eefd
Rename self->client in tests
2024-06-01 23:12:42 -05:00
XeroOl
0ddd8f0bf0
TIC-80 docs sort of work?
...
{:fennel-ls {:native-libraries [:tic80]}}
2024-06-01 15:14:15 -05:00
XeroOl
e0067880d1
Unknown field lint only triggers at stack size 1
...
This is probably not a good commit message, but basically, if you
require a module foo, and then look for foo.bar.baz, it won't trigger,
but foo.bar will trigger it.
2024-05-29 22:38:55 -05:00
XeroOl
3f5984df06
Add extra check to textEdit
...
I really should just make it (pairs) through all the keys, but for now
I'll just keep adding the checks manually.
2024-05-29 22:01:56 -05:00
XeroOl
4c92af1bc5
Align allowed-globals with the currently selected docs
2024-05-17 20:45:37 -05:00
XeroOl
a122d9d361
Make the root folder optional
2024-05-17 20:45:16 -05:00
XeroOl
1a21ee623d
fix positionEncoding to be a capability
2024-05-15 22:58:51 -05:00
XeroOl
3dc9e36af6
workaround for fennel#221
2024-05-14 00:46:10 -05:00
XeroOl
e37c77958d
fix zero-arg documented function formatting
2024-05-14 00:18:07 -05:00
XeroOl
3fad66a476
Switch docs to autogenerated
2024-05-13 23:58:37 -05:00
XeroOl
0068662c8b
add test for a fix I did a while ago
2024-05-13 01:53:52 -05:00