Commit graph

126 commits

Author SHA1 Message Date
Riley Bruins
41aa130a37 refactor: use some panicking versions of util functions
With all of the ones changed in this commit, we just `unwrap()` them
anyway, so there's not really any point of having them return `Result`s.
Yay for good error handling!
2025-04-24 22:05:40 -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
Riley Bruins
9203dfdacc
fix: use tracing crate for logging, make logs more succinct (#58) 2025-04-19 21:27:37 -07:00
Riley Bruins
a6d6f51ac2
feat: lazier query, regex parsing (#57) 2025-04-19 18:39:04 -07:00
Riley Bruins
88f4ed3263
refactor: remove lazy_static (#56) 2025-04-19 17:39:43 -07:00
Riley Bruins
43089e68c9
chore: bump tokio (#55)
Prior version had safety vulnerabilities
2025-04-19 16:30:05 -07:00
Riley Bruins
b327f7d67b
chore: bump to 1.10.0 (#51) 2025-03-10 16:03:35 -07:00
Riley Bruins
5e25fd7d55
feat: standalone linter (#50)
Allows the server to act as a standalone linter for query files. Useful
for CI.

Note that the linter ignores Rust-binding specific predicate errors,
since predicate usage is largely dependent on the implementation on the
consumer's side.
2025-03-10 15:56:10 -07:00
Riley Bruins
d5330a005b
feat: standalone formatter (ts_query_ls format) (#49)
Allows the language server to act as a standalone formatter by passing
the `format` argument. It will then take a list of directories to
format, and a formatting "mode" (whether to just check the files or
actually format them). Formatting is parallelized, and quite quick for
large query repositories like `nvim-treesitter`.
2025-03-10 10:25:59 -07:00
Riley Bruins
f39a4ea131
chore: bump to 1.9.0 (#48) 2025-03-09 17:43:24 -07:00
Riley Bruins
6ee9aa52b0
feat(diagnostics): clearer error messages (#47) 2025-03-08 10:09:35 -08:00
Riley Bruins
85ab782180 fix: prevent lots of cursor allocations during formatting
Now tree iteration uses one cursor formed at the root, and all children
iterate using that one cursor. Previously, each child would allocate its
own `TreeCursor` which was very expensive.
2025-02-12 08:49:57 -08:00
Riley Bruins
64adb71f43 chore: bump to 1.8.0 2025-02-11 11:29:01 -08:00
Riley Bruins
af15adec62 refactor: replace many helper functions with trait implementations 2025-02-11 10:56:25 -08:00
Riley Bruins
2b75de1e80 feat: document symbols 2025-02-11 09:12:45 -08:00
Riley Bruins
23983d7558 docs: show how to disable the query linter for Neovim
Also update the packaging status for some platforms
2025-02-10 21:59:20 -08:00
Riley Bruins
d56003015b fix: proper hover display for anonymous subtypes 2025-02-06 11:48:25 -08:00
Riley Bruins
0dbd1f4bff chore: bump to v1.7.0 2025-02-03 09:37:32 -08:00
Riley Bruins
7bf133b2ce fix: semantic tokens for MISSING node patterns 2025-02-03 09:33:51 -08:00
Riley Bruins
a01383a32c feat: hover requests
Supports supertypes, `MISSING` and `ERROR` nodes, and wildcard nodes.
2025-02-03 09:33:51 -08:00
Riley Bruins
0f9e95b46b test: subtype completion test coverage 2025-02-02 23:04:48 -08:00
Riley Bruins
dbb2dad386 feat: semantic tokens support
Highlights supertype nodes as interfaces, and `ERROR` nodes as builtin
variables.
2025-02-02 23:04:48 -08:00
Riley Bruins
a995fca569 fix: don't format documents with syntax errors 2025-02-01 20:24:27 -08:00
Riley Bruins
cba095dd77 feat: completions and diagnostics for missing nodes 2025-02-01 16:36:41 -08:00
Riley Bruins
70fbdd80c4 feat: formatting for missing nodes 2025-02-01 15:06:53 -08:00
Riley Bruins
2a7a92552a feat: prefer #-prefixed predicates in the formatter 2025-02-01 13:44:57 -08:00
Riley Bruins
3e6669fdb8 feat: better coverage of missing nodes 2025-02-01 12:47:11 -08:00
Riley Bruins
21fe5453f4 docs: mark subtype goals as complete 2025-02-01 12:03:22 -08:00
Riley Bruins
8fdee47312 feat: completions for subtypes 2025-02-01 11:51:18 -08:00
Riley Bruins
ef338c5eab feat: diagnostics for invalid subtypes 2025-02-01 11:51:18 -08:00
Riley Bruins
eedc057466
feat: recognition of supertype nodes (#25) 2025-01-31 19:41:14 -08:00