aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/format-queries.lua
Commit message (Collapse)AuthorAgeFilesLines
* refactor(lua): fix some luals warningsChristian Clason2025-05-121-13/+13
|
* fix(formatter): increase match limitChristian Clason2025-05-121-1/+1
| | | | | | Problem: Some very long patterns were not formatted correctly. Solution: Increase the match limit when iterating to 1024.
* fix(format): update scripts to support nightly (#6126)Phạm Huy Hoàng2025-05-121-12/+27
| | | | No need for assert as the use is contained within the script only
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-121-35/+41
|
* feat(formatter): support formatting missing nodesRiley Bruins2025-02-041-0/+11
| | | | | | | | | | | | | | | | | This commit makes missing nodes take formatting identical to that of regular named nodes, with the only exception being that a newline will not be prepended to a node name. E.g. this pattern: ```query (MISSING identifier) ``` will *not* be changed to: ```query (MISSING (identifier)) ```
* fix(formatter): prefer #-prefixed predicatesRiley Bruins2025-02-041-0/+3
| | | | | | This prevents the formatter for appending a space after the "." in a predicate prefix, and changes it to a "#" to match all other occurrences in the codebase.
* fix: formatter idempotency for nested groupings (#7345)Riley Bruins2024-11-111-0/+1
| | | | | | Currently, for something like `(((((node))))) @cap`, the formatter will produce `((node)) @cap`, and then after another pass it will produce `(node) @cap`. This commit makes it so that all extraneous parentheses are removed on the first pass.
* fix(formatter): simplify code, remove odd line breakRiley Bruins2024-10-261-48/+26
|
* fix(formatter): adapt formatter for nightlyRiley Bruins2024-09-071-2/+4
| | | | | After Neovim pull #30193, the formatter was broken due to changes in the way node data is passed to predicates.
* fix(format): field_def inside grouping再生花2024-08-011-0/+1
|
* feat(predicates)!: rename `has-type` to `kind-eq` to align with HelixChristian Clason2024-06-021-4/+4
| | | | No point in having a different name for the same predicate.
* feat(query): adapt to upstream changesAmaan Qureshi2024-05-261-2/+2
|
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-211-10/+0
|
* feat(format): extra newline after modelinePhạm Huy Hoàng2024-02-291-1/+16
|
* feat(format-scripts): linewrap predicates再生花2024-02-231-4/+39
| | | "format-ignore".kick()
* fix(scripts): add missing \n for nested groupingPhạm Huy Hoàng2024-02-201-6/+2
|
* fix(scripts): format-queries defaults to cwdChristian Clason2024-02-201-6/+4
|
* fix: typosdundargoc2024-02-191-1/+1
|
* fix(format): fix nested grouping indentation (#6128)Phạm Huy Hoàng2024-02-181-1/+6
|
* fix(format): handle list with 300 nodesPhạm Huy Hoàng2024-01-301-15/+3
|
* fix(format): improve error messageChristian Clason2024-01-301-1/+2
|
* fix(format-scripts): remove parens if possiblePhạm Huy Hoàng2024-01-211-1/+26
|
* Fixup format (#5934)Phạm Huy Hoàng2024-01-201-3/+4
| | | | | | | * fix(format): newline between top-level field defs * fixup: newline between node and comment * fixup: optimize pattern
* feat: query formatting scriptPham Huy Hoang2024-01-191-0/+396
Usage: - nvim -l scripts/format-queries.lua /path/to/file.scm - nvim -l scripts/format-queries.lua /path/to/dir fixup: add `format-ignore` directive to query/highlights.scm