Commit graph

18 commits

Author SHA1 Message Date
Paul Gauthier (aider)
795467f206 Update the OCaml tags file to follow the same pattern as the Python tags file. 2024-07-30 15:02:52 -03:00
Paul Gauthier
d24a5feab4 Update the OCaml tags query to improve module and function handling 2024-07-30 15:00:58 -03:00
Charles Joachim
8edc7740b2 Fix syntax error 2024-07-23 12:47:48 -04:00
Paul Gauthier
ecc21517ee Added README to queries scm dir 2024-06-22 06:36:23 -07:00
Ryan Freckleton
e841e029b8 fix(tree-sitter-typescript-tags.scm): Add additional queries.
This fixes the behavior of the typescript parsing, while maintaining prior functionality.
2024-03-04 15:03:55 -07:00
Ryan Freckleton
19c8fa389f fix(tree-sitter-typescript-tags): correct tree-sitter queries
Add a new test case for typescript.
Fix queries for typescript.
2024-03-04 14:36:35 -07:00
Paul Gauthier
4e2e03dfef Pick up refs in elisp 2023-11-02 09:32:55 -07:00
Paul Gauthier
5df4f2f1a4 removed empty r tags file 2023-11-01 15:01:55 -07:00
Paul Gauthier
05b0597f8b use grep-ast==0.2.4 to fully fix c-sharp bug 2023-10-31 16:48:44 -07:00
Paul Gauthier
eec174fae7 added tags.scm for C 2023-10-19 12:32:44 -07:00
Paul Gauthier
ce8b6523a6 aider: Refactor struct_specifier, function_declarator, type_definition, and enum_specifier to include the definition class in their respective queries.
# Aider chat conversation:

ASSISTANT: No changes are needed.
2023-10-19 12:27:24 -07:00
Paul Gauthier
f5a6edb568 Added tree-sitter-c-tags.scm for aider queries. 2023-10-19 12:27:23 -07:00
Paul Gauthier
056f4affa6 aider: Refactor tree-sitter-cpp-tags.scm to include the ".definition" property in the appropriate places.
# Aider chat conversation:

ASSISTANT: No changes are needed.
2023-10-19 11:19:07 -07:00
Paul Gauthier
6d1bd4fa01 Added tree-sitter-cpp-tags.scm for aider queries. 2023-10-19 11:19:05 -07:00
Paul Gauthier
4347823c36 improved debug main() func 2023-09-08 08:26:06 -07:00
Paul Gauthier
fb5616f854 aider: Updated the tags based on the grammar.
# Aider chat conversation:

USER: update the tags based on the grammar

ASSISTANT: No changes are needed.
2023-09-01 16:14:01 -07:00
Paul Gauthier
aac393f12a aider: Added queries for functions, structs, unions, and enums in the tree-sitter-c-tags.scm file.
# Aider chat conversation:

USER: I did `git reset --hard HEAD~1` to discard the last edits.

ASSISTANT: Alright. If you have any other requests or need further assistance, feel free to ask.

USER: make tags queries for the c language, following the conventions used in the c-sharp tags file. like the example, only tag definitions of *named code*, like functions, methods, classes, modules. not types, etc.

ASSISTANT: To create tags queries for the C language, we need to follow the conventions used in the C# tags file. We will create a new file named `tree-sitter-c-tags.scm` in the `aider/queries` directory.

The C language has different constructs compared to C#, so we will need to adjust the queries accordingly. For example, C doesn't have classes or interfaces, but it does have structs and unions. Also, C doesn't have namespaces, but it does have functions and variables at the global scope.

Here is the proposed content for the new file:

```scheme
aider/queries/tree-sitter-c-tags.scm
<<<<<<< HEAD
=======
(translation_unit
  (function_definition
    declarator: (function_declarator
      declarator: (identifier) @name.definition.function
    )
  ) @definition.function

  (struct_specifier
    name: (type_identifier) @name.definition.struct
  ) @definition.struct

  (union_specifier
    name: (type_identifier) @name.definition.union
  ) @definition.union

  (enum_specifier
    name: (type_identifier) @name.definition.enum
  ) @definition.enum
)
>>>>>>> updated
```

This file includes queries for functions, structs, unions, and enums. Please note that these are just the basic constructs and you might need to add more queries depending on your needs.
2023-09-01 16:02:55 -07:00
Paul Gauthier
a5e84a5302 fixed inclusion of queries for package 2023-09-01 14:14:47 -07:00