Riley Bruins
da9205ebc8
test: coverage for *some* lint warnings
2025-05-05 20:08:47 -07:00
Riley Bruins
da60e772e5
test: coverage for format --check
2025-05-05 20:08:47 -07:00
Riley Bruins
78431333e7
refactor: move CLI code into its own module
2025-05-05 20:08:47 -07:00
Riley Bruins
57bef738d8
feat: hover docs for alternations, quantifiers, and anchors ( #107 )
2025-05-03 22:30:58 -07:00
Riley Bruins
3c3a3cb189
feat: pull diagnostics ( #106 )
2025-05-02 08:07:38 -07:00
Riley Bruins
0f2d9b4e1e
feat: support document versions ( #105 )
2025-05-01 09:07:54 -07:00
Will Lillis
4a3e0a034e
test: CLI format writing test ( #102 )
...
* chore: bump rstest to 0.25.0
* test: CLI format writing test
2025-04-30 22:43:28 -07:00
Riley Bruins
9dc5d3a4ed
chore: prune dependencies ( #104 )
...
Removes an old, unused dependency and only includes schemars in the
xtask builds (as it is only used for schema generation)
2025-04-30 22:17:10 -07:00
Riley Bruins
1bedfc6e57
fix: proper logging handler ( #103 )
2025-04-30 21:38:50 -07:00
Riley Bruins
473fe860f4
chore: bump to v2.0.0 ( #101 )
2025-04-30 08:30:18 -07:00
Riley Bruins
ec6e834a33
chore: bump ts deps ( #100 )
2025-04-30 08:26:48 -07:00
Riley Bruins
fdc52f4c37
fix(formatter): fix subcommand, string formatting ( #99 )
...
`format` applied a final newline to files before the actual formatter
did so. Now it does, but we must remove the `format` patch lest two
newlines be applied to files.
Additionally, strings should go back to having their inner content
untouched, as they can have other named nodes inside them, like escape
sequences.
2025-04-30 07:42:45 -07:00
Riley Bruins
bf05816216
refactor: simplify diagnostics function interface ( #97 )
2025-04-29 20:12:31 -07:00
Riley Bruins
28ffc04c44
refactor: consolidate document data in one object ( #96 )
2025-04-29 20:04:28 -07:00
Riley Bruins
0a205a9682
fix(formatter): correct blank MISSING node format ( #95 )
...
The problem was we only stopped recurring when a node had no *named*
children. A blank MISSING node, however, has no named children but a few
unnamed children. This meant the entire node was treated as one "string
unit" so spaces inside it weren't being collapsed. This commit fixes
the formatter logic and adds some more test cases for this.
2025-04-29 18:08:19 -07:00
Riley Bruins
bcea9c4252
refactor: move large query strings into their own files ( #94 )
...
This commit also adds another test for formatting, and fixes an issue
where the final newline was not appended to a formatted document.
2025-04-29 18:05:00 -07:00
Riley Bruins
5d4a423384
feat!: separate "lints" from "checks" ( #92 )
...
Lints are independent of parser objects, and run solely based off of the
server configuration. Checks require access to the language object to
attempt a full query compilation.
Note that this commit makes it so that `check` no longer lints by
default.
2025-04-29 08:48:23 -07:00
Will Lillis
b9537e0be3
feat: code action to generate impossible pattern diagnostics ( #89 )
...
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2025-04-29 07:38:49 -07:00
Riley Bruins
7f873c0d32
docs: mention the format flag for check
...
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-04-26 20:24:44 -07:00
Will Lillis
ca629075d3
feat(check): add flag to perform formatting checks
2025-04-26 20:24:44 -07:00
Riley Bruins
9d5e3da665
feat: check subcommand now validates using config ( #86 )
...
It now validates capture names, and predicates and directives
2025-04-26 14:23:07 -07:00
Riley Bruins
a118724a3a
docs: typo has -> any ( #85 )
2025-04-26 13:40:39 -07:00
Riley Bruins
f15b034e4c
feat: support not, has flags for predicate definitions ( #84 )
2025-04-26 12:32:43 -07:00
Riley Bruins
2d3520ca9f
feat!: simpler args for format subcommand ( #82 )
2025-04-26 09:51:27 -07:00
Riley Bruins
1b9026c13b
docs: note on check scans ( #81 )
2025-04-26 09:25:25 -07:00
Riley Bruins
4e0b56936a
docs: readme typo ( #78 )
2025-04-25 23:40:47 -07:00
Riley Bruins
9085fbc6c5
feat: hover for predicates, directives ( #77 )
...
Also renames the `varargs` type to `variadic`, because it makes more
sense. Not breaking becuz no release :rocket emoji:
2025-04-25 23:37:41 -07:00
Riley Bruins
16753cc394
feat: completion snippets for valid predicates, directives ( #76 )
2025-04-25 23:03:17 -07:00
Riley Bruins
38d690e4d7
feat: specify valid predicates, directives ( #75 )
2025-04-25 17:40:42 -07:00
Riley Bruins
3265f7537e
feat: completions for valid captures ( #74 )
...
This commit also improves the existing capture completions by adding
`TextEdit` support, meaning there are no longer any dodgy semantics
regarding whether or not the completion should slurp up the preceding
`@` sign.
2025-04-24 23:50:03 -07:00
Riley Bruins
baa0e1c21d
refactor: use serde(default), remove optional indirection in Options
2025-04-22 22:29:08 -07:00
Riley Bruins
6612e42891
docs: README typo
...
sorry clason
2025-04-22 09:33:35 -07:00
Riley Bruins
80e317c12c
fix: expand env variables at deserialization step
...
This allows `check` to also use env var expansion. This commit also
fixes an issue where the config file would not be read if the user
didn't pass in any configuration options during initialization.
2025-04-22 08:55:11 -07:00
Riley Bruins
a1d94fe604
feat: traverse up file tree to find config file
2025-04-21 22:11:16 -07:00
Riley Bruins
0aa1fe6a60
feat: support env var expansion for parser installation paths
2025-04-21 21:25:53 -07:00
Riley Bruins
fb30c4c7e7
refactor: move out formatting logic from util
2025-04-21 21:20:06 -07:00
Riley Bruins
a2d0b72545
fix!: rework allowable_captures
...
Rename to `valid_captures`, and change the type to a simple map from
capture name to capture description
2025-04-21 21:07:33 -07:00
Riley Bruins
6580213304
feat!: tsqueryrc.json -> .tsqueryrc.json
...
Configuration files should stay hidden.
2025-04-21 21:07:33 -07:00
Riley Bruins
dae06e36c6
chore: descriptions for captures in schema
2025-04-20 18:57:41 -07:00
Riley Bruins
eb3bc91478
feat: hover support for specified captures
2025-04-20 18:57:41 -07:00
Riley Bruins
2acb01d9fd
chore: add rustfmt.toml
2025-04-20 16:22:42 -07:00
Riley Bruins
1c05df1e71
test: add diagnostics tests
2025-04-20 16:22:42 -07:00
Riley Bruins
1ddd90d2d4
refactor: move out the more specific util code
2025-04-20 16:22:42 -07:00
Riley Bruins
99b10a6cc1
feat: partial support for capture name validation
...
Currently not support by the `check` subcommand, nor autocompletions or
hover.
2025-04-20 15:33:23 -07:00
Riley Bruins
0d0b680ef8
chore: bump to 1.11.0
2025-04-20 09:38:15 -07:00
Riley Bruins
ad48630b8f
feat: read from config file in check command
2025-04-20 09:22:11 -07:00
Riley Bruins
f403bd9a1d
fix: merge parser installation path options
2025-04-20 09:22:11 -07:00
Riley Bruins
e15605a987
chore: format
2025-04-19 22:52:00 -07:00
Riley Bruins
974f9e9851
feat: generate schema for config file
2025-04-19 22:52:00 -07:00
Riley Bruins
457ed9efd5
feat: basic config file support ( #59 )
2025-04-19 21:35:20 -07:00