Commit Graph

6 Commits

Author SHA1 Message Date
dundargoc
2a57613b9b build: use stylua with add_glob_target
stylua version 0.19.0 has added the flag `--respect-ignores` which
unbreaks stylua when used with add_glob_target.

See eecddd2416 for more context.
2023-11-12 20:19:10 +01:00
dundargoc
eecddd2416 build(lint): use stylua without add_glob_target
add_glob_target is our custom method to figure out whether a work needs
to be done or not. This works as expected most of the time, but causes a
problem with stylua.

Stylua makes the decision that if a file is explicitly passed to be
formatted, then it will format the file even if the file is set to be
ignored in .styluaignore. This behavior breaks add_glob_target with
seemingly no easy workaround.
More information: https://github.com/JohnnyMorganz/StyLua/issues/751

Instead, what we can do is call stylua as you would in the command line.
This will make stylua work as expected. The downside is that we no
longer get a free "is this work necessary" detection, meaning that
stylua will be run each time `make lint` is called, regardless if it's
necessary or not. For longer lint tasks such as uncrustify and
clang-tidy this would be disastrous, but this is an acceptable tradeoff
since stylua is very quick.
2023-09-14 09:58:50 +02:00
bfredl
25e51d393a build(lua): vendor coxpcall
Do not require luarocks on PUC lua CI just because of this single lua file
2023-09-10 11:43:37 +02:00
Lewis Russell
6fa17da39b
docs(options): take ownership of options.txt (#24528)
* docs(options): take ownership of options.txt

- `src/nvim/options.lua` is now the source of truth
- generate runtime/lua/vim/_meta/options.lua

* fixup! zeer comments

* fixup! zeer comments (2)

* fixup! re-enable luacheck

* fixup! regen
2023-08-04 21:26:53 +01:00
bfredl
45bcf83869 refactor(build): include lpeg as a library 2023-04-27 11:40:00 +02:00
Christian Clason
676e9e9334 ci: lint runtime with stylua 2022-05-09 16:31:55 +02:00