XeroOl
bfc6d64237
docs: add a table for lspconfig to be happy
2025-01-16 20:55:30 -06:00
Phil Hagelberg
bf06506f92
Disable printing during compilation.
2025-01-05 13:29:45 -08: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
25196aeabf
Make it so that Lua 5.1 works again
2025-01-05 13:31:13 -06:00
XeroOl
7f15f64e22
tset lint should only apply when rewriting as sym is valid
2024-12-28 15:50:44 -06:00
XeroOl
4bfa344b0e
rename "check" to add-lint-diagnostics
2024-12-28 15:50:44 -06:00
XeroOl
ea46f368be
json-rpc: handle when \r isn't present
...
In windows, (in:read) will remove the \r, so the json rpc parsing code
shouldn't assume that the carriage return is always present.
2024-10-11 22:01:12 -05:00
Matthew Lyon
e4e5054876
Add instructions for configuring Sublime Text
2024-10-10 19:56:30 -05: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
8ef844ab90
Lua 5.4 updated their docs last month apparently!
2024-09-07 23:33:08 -05:00
XeroOl
4a93642469
clean up require paths
2024-09-07 23:32:37 -05:00
XeroOl
64e909c457
Merge branch 'eb/add-love2d'
...
Thank you to emlabee for adding love2d support!
fennel-ls#32
2024-09-07 23:20:40 -05:00
Emma
72c9a30343
Refactor work and remove all unnecessary fnlfmt changes
2024-09-07 22:03:38 -04:00
Emma
3de4def951
Remove print statement for Love2D doc generation
2024-09-07 21:16:07 -04:00
Phil Hagelberg
1c6999ea3f
Fix loading of globals from love2d generated documentation.
...
The first thing to change is to load the love2d docset inside a pcall,
because it's not included in the standard `make` build, so we need to
not crash if it's not present. Note that we are storing these under
libraries.love2d rather than libraries.love-2d, because even tho it's
inconsistent with tic-80; I've never seen them use the hyphenated
version, and now the name matches the module name.
Secondly, we extend the get-global function to work with anything in
the server.configuration.libraries table, not just hard-coded to
tic-80.
Finally, update the manual to reflect the removal of the love2d hypen.
2024-09-07 15:00:13 -07:00
Emma
f0c512575e
Add Love2D API generation flag option to make docs target
2024-09-07 12:33:57 -04:00
Emma
0e0121825d
WIP adding Love2D configuration
2024-09-07 11:12:32 -04:00
Emma
e1d3b7b257
Clean up love2d parser and restructure code
2024-09-07 11:12:32 -04:00
Emma
3816bd81cc
Clean up file and abstract root love module parsing
2024-09-07 11:12:32 -04:00
Emma
0cb16a6456
Parse functions and callbacks from root love table
2024-09-07 11:12:32 -04:00
Emma
f5bfbf1c26
Convert primary love object and functions
2024-09-07 11:12:32 -04:00
Emma
2bddb4be3a
Add non-working love2d documentation tooling and integrate with get-docs.fnl
2024-09-07 11:12:32 -04:00
Emma
41a92088f8
Add git clone utility function
2024-09-07 11:12:31 -04:00
XeroOl
ffe428e0f5
slightly modify the lua-manual tool
2024-09-03 12:18:19 -05:00
XeroOl
5e8b31ea47
use fennel 1.5's native debug tracking
2024-09-03 12:17:53 -05:00
XeroOl
cbce6a8cb8
fennel 1.5.1
2024-09-03 12:04:47 -05:00
XeroOl
eb06909d22
guard against missing docstring
2024-08-17 15:18:53 -05:00
XeroOl
58c79a727e
Add tests for editing flsconfig
2024-07-30 22:30:56 -05:00
Phil Hagelberg
c1f9dc448a
Accept textDocument argument in textDocument/didSave handler.
...
According to the spec, the didSave handler takes the same textDocument
property as the other textDocument handlers, rather than having uri as
a top-level field.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textSynchronization-side
2024-07-29 15:13:49 -07:00
XeroOl
9cc22e407e
use the find command instead of makefile wildcard
2024-07-21 14:55:07 -05:00
Phil Hagelberg
4ad7987767
Add a count target to the makefile using cloc.
2024-07-20 12:56:20 -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
11c4af5ae1
add an flsproject.fnl file
2024-07-08 11:52:26 -05:00
XeroOl
a24753c45d
update changelog
2024-07-08 10:49:04 -05:00
XeroOl
6801d0d3d9
unknown module field lint works on definitions
2024-07-07 23:54:17 -05:00
XeroOl
e493b0e21f
Reorganize the readme files
2024-07-07 23:29:46 -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
caab3ebfd1
flsproject update on save
2024-07-07 12:35:26 -05:00
XeroOl
fbd9b0981f
switch from initialization options and didChangeConfiguration to flsproject.fnl
2024-07-05 12:40:15 -05:00
XeroOl
7ff4581e50
fix searcher
2024-07-05 12:33:05 -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
0a5ca27dfa
I keep messing with the luarocks stuff
2024-06-27 01:27:54 -05:00
XeroOl
8fdf538685
more fiddling with rockspecs
2024-06-27 01:20:31 -05:00
XeroOl
cb67b4e086
readme changes
2024-06-27 01:17:04 -05:00