helix-mirror/runtime/queries
Michael Davis 4e877de54d
Fix Golang textobject queries (#2153)
* log textobject query construction errors

The current behavior is that invalid queries are discarded silently
which makes it difficult to debug invalid textobjects (either invalid
syntax or an update may have come through that changed the valid set
of nodes).

* fix golang textobject query

`method_spec_list` used to be a named node but was removed (I think
for Helix, it was when updated to pull in the support for generics).
Instead of a named node for the list of method specs we have a bunch
of `method_spec` children nodes now. We can match on the set of them
with a `+` wildcard.

Example go for this query:

    type Shape interface {
       area() float64
       perimeter() float64
    }

Which is parsed as:

    (source_file
      (type_declaration
        (type_spec
          name: (type_identifier)
          type: (interface_type
            (method_spec
              name: (field_identifier)
              parameters: (parameter_list)
              result: (type_identifier))
            (method_spec
              name: (field_identifier)
              parameters: (parameter_list)
              result: (type_identifier))))))
2022-04-18 23:14:48 +08:00
..
bash Update bash tree sitter (#1917) 2022-04-01 08:48:39 -05:00
c Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
c-sharp C# highlighting improvements (#1795) 2022-03-12 12:06:56 -06:00
cmake Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
comment Add tree-sitter-comment (#1300) 2021-12-19 23:56:56 +09:00
cpp Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
css tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
dart Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
dockerfile Support dockerfiles (#1303) 2021-12-21 18:22:15 +09:00
eex add tree-sitter-eex 2022-04-13 14:28:51 +09:00
ejs add tree-sitter-embedded-template (erb & ejs) (#2055) 2022-04-10 08:23:06 +09:00
elixir add tree-sitter-heex 2022-04-13 14:28:51 +09:00
elm feat(languages): Elm (#1514) 2022-01-21 00:47:23 +09:00
erb add tree-sitter-embedded-template (erb & ejs) (#2055) 2022-04-10 08:23:06 +09:00
erlang Update tree-sitters Erlang and HEEx (#2149) 2022-04-17 23:16:22 +05:30
fish Fixing (in two ways) a small typo (#2156) 2022-04-18 13:12:47 +09:00
gdscript gdscript support (#1985) 2022-04-16 00:35:23 +09:00
git-commit update tree-sitter-git-commit (#1838) 2022-03-19 14:43:13 +09:00
git-config add tree-sitter-git-config (#1426) 2022-01-09 22:10:20 +08:00
git-diff Add tree-sitter-git-diff (#1373) 2021-12-30 00:31:23 +09:00
git-rebase add tree-sitter-git-rebase (#1402) 2021-12-31 06:58:47 +08:00
gleam add tree-sitter-gleam 2022-03-30 13:24:53 +09:00
glsl Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
go Fix Golang textobject queries (#2153) 2022-04-18 23:14:48 +08:00
graphql feat(languages): GraphQL (#1515) 2022-01-21 23:16:40 +09:00
haskell tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
hcl Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
heex Update tree-sitters Erlang and HEEx (#2149) 2022-04-17 23:16:22 +05:30
html tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
iex add tree-sitter-iex (#1576) 2022-01-25 15:50:34 +09:00
java tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
javascript Add JavaScript control keywords (#2140) 2022-04-17 15:14:55 +09:00
json Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
jsx separate JSX queries from javascript (#1921) 2022-04-02 10:07:35 +09:00
julia tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
kotlin Add kotlin language (#1689) 2022-02-23 23:25:44 +09:00
latex tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
lean feat(languages): Lean experimental tree-sitter-lean (#1422) 2022-01-17 23:05:17 +09:00
ledger Add tree-sitter-comment (#1300) 2021-12-19 23:56:56 +09:00
llvm Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
llvm-mir Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
llvm-mir-yaml Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
lua Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
make tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
markdown Allow separate styles for markup headings (#1618) 2022-02-21 16:45:48 +09:00
nix Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
ocaml Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
ocaml-interface tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
org Initial basic Org markup support thanks to tree-sitter-org (#1845) 2022-03-20 17:14:30 -05:00
perl Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
php Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
protobuf Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
python Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
r add languages r and rmarkdown (#1998) 2022-04-08 09:30:44 +09:00
regex add tree-sitter-regex (#1362) 2022-01-06 23:00:00 +08:00
rescript Fix Rescript hightlights query (#1863) 2022-03-23 14:03:58 -05:00
rmarkdown add languages r and rmarkdown (#1998) 2022-04-08 09:30:44 +09:00
ron add language ron (#1925) 2022-04-05 07:39:22 -05:00
ruby Ruby TextObjects and more file extensions (#2143) 2022-04-17 19:25:44 -05:00
rust Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
scala Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
solidity Add syntax highlighting for Solidity (#1854) 2022-03-22 11:38:49 -05:00
sql feat(languages): SQL (#2097) 2022-04-14 13:26:20 -05:00
svelte Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
swift Add swift language (#2033) 2022-04-08 13:10:37 -05:00
tablegen Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
toml tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
tsq Add tree-sitter-comment (#1300) 2021-12-19 23:56:56 +09:00
tsx tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
twig epocsquadron/add tree sitter twig (#1602) 2022-02-01 12:35:07 +09:00
typescript Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
vue tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
wgsl tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
yaml Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
zig Indentation rework (#1562) 2022-03-31 00:08:07 +09:00