aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2025-02-02 08:58:26 -0800
committerChristian Clason <ch.clason+github@icloud.com>2025-02-04 09:56:39 +0100
commit7194ff9511c811d5af0767eb6f77cf53f85ffc03 (patch)
tree7ffce6aa789787e57343cda5f0829485aa1aaab0 /scripts
parentbot(lockfile): update cue, erlang, janet_simple (diff)
downloadnvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.tar
nvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.tar.gz
nvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.tar.bz2
nvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.tar.lz
nvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.tar.xz
nvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.tar.zst
nvim-treesitter-7194ff9511c811d5af0767eb6f77cf53f85ffc03.zip
fix(formatter): prefer #-prefixed predicates
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/format-queries.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/format-queries.lua b/scripts/format-queries.lua
index 17e445369..fb1d78f49 100755
--- a/scripts/format-queries.lua
+++ b/scripts/format-queries.lua
@@ -114,6 +114,9 @@ local format_queries = [[
":"
"."
] @format.append-space
+(predicate
+ "." @format.cancel-append @format.replace
+ (#gsub! @format.replace "%." "#"))
(
"." @format.prepend-space @format.cancel-append
.