diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 4398fb0..31298ce 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -694,29 +694,8 @@ require'lazy'.setup{ --{{{1 ]] end }, - { name = 'nvim-treesitter', --{{{2 - dir = vim.fn.stdpath("config") .. "/vendor/nvim-treesitter", - config = function() - require'nvim-treesitter.configs'.setup{ - modules = {}, - ensure_installed = {}, - ignore_install = {}, - parser_install_dir = nil, - sync_install = false, - auto_install = true, - indent = { - enable = true, - }, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - } - end, - }, { 'mfussenegger/nvim-dap', --{{{2 dependencies = { - 'nvim-treesitter', 'theHamsta/nvim-dap-virtual-text', 'leoluz/nvim-dap-go', 'mfussenegger/nvim-dap-python', diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/CONTRIBUTING.md b/nvim/.config/nvim/vendor/nvim-treesitter/CONTRIBUTING.md deleted file mode 100644 index 23321f0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/CONTRIBUTING.md +++ /dev/null @@ -1,401 +0,0 @@ -# Contributing to `nvim-treesitter` - -First of all, thank you very much for contributing to `nvim-treesitter`. - -If you haven't already, you should really come and reach out to us on our -[Matrix channel], so we can help you with any question you might have! - -As you know, `nvim-treesitter` is roughly split in two parts: - -- Parser configurations : for various things like `locals`, `highlights` -- What we like to call _modules_ : tiny Lua modules that provide a given feature, based on parser configurations - -Depending on which part of the plugin you want to contribute to, please read the appropriate section. - -## Style Checks and Tests - -We haven't implemented any functional tests yet. Feel free to contribute. -However, we check code style with `luacheck` and `stylua`! -Please install luacheck and activate our `pre-push` hook to automatically check style before -every push: - -```bash -luarocks install luacheck -cargo install stylua -ln -s ../../scripts/pre-push .git/hooks/pre-push -``` - -## Adding new modules - -If you want to see a new functionality added to `nvim-treesitter` feel free to first open an issue -to that we can track our solution! -Thus far, there is basically two types of modules: - -- Little modules (like `incremental selection`) that are built in `nvim-treesitter`, we call them - `builtin modules`. -- Bigger modules (like `completion-treesitter`, or `nvim-tree-docs`), or modules that integrate - with other plugins, that we call `remote modules`. - -In any case, you can build your own module! To help you started in the process, we have a template -repository designed to build new modules [here](https://github.com/nvim-treesitter/module-template). -Feel free to use it, and contact us over on our -on the "Neovim tree-sitter" [Matrix channel]. - -## Parser configurations - -Contributing to parser configurations is basically modifying one of the `queries/*/*.scm`. -Each of these `scheme` files contains a _tree-sitter query_ for a given purpose. -Before going any further, we highly suggest that you [read more about tree-sitter queries](https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries). - -Each query has an appropriate name, which is then used by modules to extract data from the syntax tree. -For now these are the types of queries used by `nvim-treesitter`: - -- `highlights.scm`: used for syntax highlighting, using the `highlight` module. -- `locals.scm`: used to extract keyword definitions, scopes, references, etc, using the `locals` module. -- `textobjects.scm`: used to define text objects. -- `folds.scm`: used to define folds. -- `injections.scm`: used to define injections. - -For these types there is a _norm_ you will have to follow so that features work fine. -Here are some global advices: - -- If your language is listed [here](https://github.com/nvim-treesitter/nvim-treesitter#supported-languages), - you can install the [playground plugin](https://github.com/nvim-treesitter/playground). -- If your language is listed [here](https://github.com/nvim-treesitter/nvim-treesitter#supported-languages), - you can debug and experiment with your queries there. -- If not, you should consider installing the [tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/tree/master/cli), - you should then be able to open a local playground using `tree-sitter build-wasm && tree-sitter web-ui` within the - parsers repo. -- Examples of queries can be found in [queries/](queries/) -- Matches in the bottom will override queries that are above of them. - -#### Inheriting languages - -If your language is an extension of a language (TypeScript is an extension of JavaScript for -example), you can include the queries from your base language by adding the following _as the first -line of your file_. - -```query -; inherits: lang1,(optionallang) -``` - -If you want to inherit a language, but don't want the languages inheriting from yours to inherit it, -you can mark the language as optional (by putting it between parenthesis). - -#### Formatting - -All queries are expected to follow a standard format, with every node on a single line and indented by two spaces for each level of nesting. You can automatically format the bundled queries by running the provided formatter `./scripts/format-queries.lua` on a single file (ending in `.scm`) or directory to format. - -Should you need to preserve a specific format for a node, you can exempt it (and all contained nodes) by placing before it -```query -; format-ignore -``` - -### Highlights - -As languages differ quite a lot, here is a set of captures available to you when building a `highlights.scm` query. Note that your color scheme needs to define (or link) these captures as highlight groups. - -#### Identifiers - -```query -@variable ; various variable names -@variable.builtin ; built-in variable names (e.g. `this`) -@variable.parameter ; parameters of a function -@variable.parameter.builtin ; special parameters (e.g. `_`, `it`) -@variable.member ; object and struct fields - -@constant ; constant identifiers -@constant.builtin ; built-in constant values -@constant.macro ; constants defined by the preprocessor - -@module ; modules or namespaces -@module.builtin ; built-in modules or namespaces -@label ; GOTO and other labels (e.g. `label:` in C), including heredoc labels -``` - -#### Literals - -```query -@string ; string literals -@string.documentation ; string documenting code (e.g. Python docstrings) -@string.regexp ; regular expressions -@string.escape ; escape sequences -@string.special ; other special strings (e.g. dates) -@string.special.symbol ; symbols or atoms -@string.special.url ; URIs (e.g. hyperlinks) -@string.special.path ; filenames - -@character ; character literals -@character.special ; special characters (e.g. wildcards) - -@boolean ; boolean literals -@number ; numeric literals -@number.float ; floating-point number literals -``` - -#### Types - -```query -@type ; type or class definitions and annotations -@type.builtin ; built-in types -@type.definition ; identifiers in type definitions (e.g. `typedef ` in C) - -@attribute ; attribute annotations (e.g. Python decorators, Rust lifetimes) -@attribute.builtin ; builtin annotations (e.g. `@property` in Python) -@property ; the key in key/value pairs -``` - -#### Functions - -```query -@function ; function definitions -@function.builtin ; built-in functions -@function.call ; function calls -@function.macro ; preprocessor macros - -@function.method ; method definitions -@function.method.call ; method calls - -@constructor ; constructor calls and definitions -@operator ; symbolic operators (e.g. `+` / `*`) -``` - -#### Keywords - -```query -@keyword ; keywords not fitting into specific categories -@keyword.coroutine ; keywords related to coroutines (e.g. `go` in Go, `async/await` in Python) -@keyword.function ; keywords that define a function (e.g. `func` in Go, `def` in Python) -@keyword.operator ; operators that are English words (e.g. `and` / `or`) -@keyword.import ; keywords for including or exporting modules (e.g. `import` / `from` in Python) -@keyword.type ; keywords describing namespaces and composite types (e.g. `struct`, `enum`) -@keyword.modifier ; keywords modifying other constructs (e.g. `const`, `static`, `public`) -@keyword.repeat ; keywords related to loops (e.g. `for` / `while`) -@keyword.return ; keywords like `return` and `yield` -@keyword.debug ; keywords related to debugging -@keyword.exception ; keywords related to exceptions (e.g. `throw` / `catch`) - -@keyword.conditional ; keywords related to conditionals (e.g. `if` / `else`) -@keyword.conditional.ternary ; ternary operator (e.g. `?` / `:`) - -@keyword.directive ; various preprocessor directives & shebangs -@keyword.directive.define ; preprocessor definition directives -``` - -#### Punctuation - -```query -@punctuation.delimiter ; delimiters (e.g. `;` / `.` / `,`) -@punctuation.bracket ; brackets (e.g. `()` / `{}` / `[]`) -@punctuation.special ; special symbols (e.g. `{}` in string interpolation) -``` - -#### Comments - -```query -@comment ; line and block comments -@comment.documentation ; comments documenting code - -@comment.error ; error-type comments (e.g. `ERROR`, `FIXME`, `DEPRECATED`) -@comment.warning ; warning-type comments (e.g. `WARNING`, `FIX`, `HACK`) -@comment.todo ; todo-type comments (e.g. `TODO`, `WIP`) -@comment.note ; note-type comments (e.g. `NOTE`, `INFO`, `XXX`) -``` - -#### Markup - -Mainly for markup languages. - -```query -@markup.strong ; bold text -@markup.italic ; italic text -@markup.strikethrough ; struck-through text -@markup.underline ; underlined text (only for literal underline markup!) - -@markup.heading ; headings, titles (including markers) -@markup.heading.1 ; top-level heading -@markup.heading.2 ; section heading -@markup.heading.3 ; subsection heading -@markup.heading.4 ; and so on -@markup.heading.5 ; and so forth -@markup.heading.6 ; six levels ought to be enough for anybody - -@markup.quote ; block quotes -@markup.math ; math environments (e.g. `$ ... $` in LaTeX) - -@markup.link ; text references, footnotes, citations, etc. -@markup.link.label ; link, reference descriptions -@markup.link.url ; URL-style links - -@markup.raw ; literal or verbatim text (e.g. inline code) -@markup.raw.block ; literal or verbatim text as a stand-alone block - ; (use priority 90 for blocks with injections) - -@markup.list ; list markers -@markup.list.checked ; checked todo-style list markers -@markup.list.unchecked ; unchecked todo-style list markers -``` - -```query -@diff.plus ; added text (for diff files) -@diff.minus ; deleted text (for diff files) -@diff.delta ; changed text (for diff files) -``` - -```query -@tag ; XML-style tag names (and similar) -@tag.builtin ; builtin tag names (e.g. HTML5 tags) -@tag.attribute ; XML-style tag attributes -@tag.delimiter ; XML-style tag delimiters -``` - -#### Non-highlighting captures - -```query -@none ; completely disable the highlight -@conceal ; captures that are only meant to be concealed -``` - -```query -@spell ; for defining regions to be spellchecked -@nospell ; for defining regions that should NOT be spellchecked -``` - -The main types of nodes which are spell checked are: -- Comments -- Strings; where it makes sense. Strings that have interpolation or are typically used for non text purposes are not spell checked (e.g. bash). - -#### Predicates - -Captures can be restricted according to node contents using [predicates](https://neovim.io/doc/user/treesitter.html#treesitter-predicates). For performance reasons, prefer earlier predicates in this list: - -1. `#eq?` (literal match) -2. `#any-of?` (one of several literal matches) -3. `#lua-match?` (match against a [Lua pattern](https://neovim.io/doc/user/luaref.html#lua-pattern)) -4. `#match?`/`#vim-match?` (match against a [Vim regular expression](https://neovim.io/doc/user/pattern.html#regexp) - -#### Conceal - -Captures can be concealed by setting the [`conceal` metadata](https://neovim.io/doc/user/treesitter.html#treesitter-highlight-conceal), e.g.., -```query - (fenced_code_block_delimiter @markup.raw.block (#set! conceal "")) -``` -The capture should be meaningful to allow proper highlighting when `set conceallevel=0`. If the unconcealed capture should not be highlighted (e.g., because an earlier pattern handles this), you can use `@conceal`. - -A conceal can be restricted to part of the capture via the [`#offset!` directive](https://neovim.io/doc/user/treesitter.html#treesitter-directive-offset%21). - -#### Priority - -Captures can be assigned a priority to control precedence of highlights via the -`#set! priority ` directive (see `:h treesitter-highlight-priority`). -The default priority for treesitter highlights is `100`; queries should only -set priorities between `90` and `120`, to avoid conflict with other sources of -highlighting (such as diagnostics or LSP semantic tokens). - -### Locals - -Locals are used to keep track of definitions and references in local or global -scopes, see [upstream -documentation](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables). -Note that nvim-treesitter uses more specific subcaptures for definitions and -**does not use locals for highlighting**. - -```query -@local.definition ; various definitions -@local.definition.constant ; constants -@local.definition.function ; functions -@local.definition.method ; methods -@local.definition.var ; variables -@local.definition.parameter ; parameters -@local.definition.macro ; preprocessor macros -@local.definition.type ; types or classes -@local.definition.field ; fields or properties -@local.definition.enum ; enumerations -@local.definition.namespace ; modules or namespaces -@local.definition.import ; imported names -@local.definition.associated ; the associated type of a variable - -@local.scope ; scope block -@local.reference ; identifier reference -``` - -#### Definition Scope - -You can set the scope of a definition by setting the `scope` property on the definition. - -For example, a JavaScript function declaration creates a scope. The function name is captured as the definition. -This means that the function definition would only be available WITHIN the scope of the function, which is not the case. -The definition can be used in the scope the function was defined in. - -```javascript -function doSomething() {} - -doSomething(); // Should point to the declaration as the definition -``` - -```query -(function_declaration - ((identifier) @local.definition.var) - (#set! definition.var.scope "parent")) -``` - -Possible scope values are: - -- `parent`: The definition is valid in the containing scope and one more scope above that scope -- `global`: The definition is valid in the root scope -- `local`: The definition is valid in the containing scope. This is the default behavior - -### Folds - -You can define folds for a given language by adding a `folds.scm` query : - -```query -@fold ; fold this node -``` - -If the `folds.scm` query is not present, this will fall back to the `@local.scope` captures in the `locals` -query. - -### Injections - -Some captures are related to language injection (like markdown code blocks). They are used in `injections.scm`. - -If you want to dynamically detect the language (e.g. for Markdown blocks) use the `@injection.language` to capture -the node describing the language and `@injection.content` to describe the injection region. - -```query -@injection.language ; dynamic detection of the injection language (i.e. the text of the captured node describes the language) -@injection.content ; region for the dynamically detected language -``` - -For example, to inject javascript into HTML's ` -``` - -```query -(script_element - (raw_text) @injection.content - (#set! injection.language "javascript")) ; set the parser language for @injection.content region to javascript -``` - -For regions that don't have a corresponding `@injection.language`, you need to manually set the language -through `(#set injection.language "lang_name")` - -To combine all matches of a pattern as one single block of content, add `(#set! injection.combined)` to such pattern - -### Indents - -```query -@indent.begin ; indent children when matching this node -@indent.end ; marks the end of indented block -@indent.align ; behaves like python aligned/hanging indent -@indent.dedent ; dedent children when matching this node -@indent.branch ; dedent itself when matching this node -@indent.ignore ; do not indent in this node -@indent.auto ; behaves like 'autoindent' buffer option -@indent.zero ; sets this node at position 0 (no indent) -``` - -[Matrix channel]: https://matrix.to/#/#nvim-treesitter:matrix.org diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/LICENSE b/nvim/.config/nvim/vendor/nvim-treesitter/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/Makefile b/nvim/.config/nvim/vendor/nvim-treesitter/Makefile deleted file mode 100644 index 338c754..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# https://github.com/luarocks/luarocks/wiki/Creating-a-Makefile-that-plays-nice-with-LuaRocks -build: - echo "Do nothing" - -install: - mkdir -p $(INST_LUADIR) - cp -r lua/* $(INST_LUADIR) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/README.md b/nvim/.config/nvim/vendor/nvim-treesitter/README.md deleted file mode 100644 index c904346..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/README.md +++ /dev/null @@ -1,861 +0,0 @@ -
-

nvim-treesitter

-

- - Matrix Chat - - - Linting and Style - - - Syntax files - -

-
- -
-

- Logo -

-

- Treesitter - configurations and abstraction layer for - Neovim. -

-

- - Logo by @steelsojka - -

-
- ->[!CAUTION] -> The `master` branch is frozen and provided for backward compatibility only. All future updates happen on the [`main` branch](https://github.com/nvim-treesitter/nvim-treesitter/blob/main/README.md), which will become the default branch in the future. - -The goal of `nvim-treesitter` is both to provide a simple and easy way to use the interface for [tree-sitter](https://github.com/tree-sitter/tree-sitter) in Neovim and to provide some basic functionality such as highlighting based on it: - -![example-cpp](https://user-images.githubusercontent.com/2361214/202753610-e923bf4e-e88f-494b-bb1e-d22a7688446f.png) - -Traditional highlighting (left) vs Treesitter-based highlighting (right). -More examples can be found in [our gallery](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Gallery). - -**Warning: Treesitter and nvim-treesitter highlighting are an experimental feature of Neovim. -Please consider the experience with this plug-in as experimental until Tree-Sitter support in Neovim is stable! -We recommend using the nightly builds of Neovim if possible. -You can find the current roadmap [here](https://github.com/nvim-treesitter/nvim-treesitter/issues/4767). -The roadmap and all features of this plugin are open to change, and any suggestion will be highly appreciated!** - -Nvim-treesitter is based on three interlocking features: [**language parsers**](#language-parsers), [**queries**](#adding-queries), and [**modules**](#available-modules), where _modules_ provide features – e.g., highlighting – based on _queries_ for syntax objects extracted from a given buffer by _language parsers_. -Users will generally only need to interact with parsers and modules as explained in the next section. -For more detailed information on setting these up, see ["Advanced setup"](#advanced-setup). - ---- - -### Table of contents - -- [Quickstart](#quickstart) -- [Supported languages](#supported-languages) -- [Available modules](#available-modules) -- [Advanced setup](#advanced-setup) -- [Extra features](#extra-features) -- [Troubleshooting](#troubleshooting) - ---- - -# Quickstart - -## Requirements - -- **Neovim 0.10 or 0.11** (Neovim 0.12 is **not supported**); -- `tar` and `curl` in your path (or alternatively `git`); -- a C compiler in your path and libstdc++ installed ([Windows users please read this!](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support)). -- `tree-sitter-cli` up to **0.25.x**. - -## Installation - -You can install `nvim-treesitter` with your favorite package manager (or using the native `package` feature of vim, see `:h packages`). - -**NOTE: This plugin is only guaranteed to work with specific versions of language parsers** (as specified in the `lockfile.json`). **When upgrading the plugin, you must make sure that all installed parsers are updated to the latest version** via `:TSUpdate`. -It is strongly recommended to automate this; e.g., if you are using `lazy.nvim`, put this in your `init.lua` file: - -```lua -require("lazy").setup({ - {"nvim-treesitter/nvim-treesitter", branch = 'master', lazy = false, build = ":TSUpdate"} -}) -``` - ->[!CAUTION] -> * This plugin does not support lazy-loading. -> * Make sure to specify the `master` branch, as the default branch will switch to `main` in the future. - -For other plugin managers such as `packer.nvim`, see this [Installation page from the wiki](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation) (Note that this page is community maintained). - -## Language parsers - -Treesitter uses a different _parser_ for every language, which needs to be generated via `tree-sitter-cli` from a `grammar.js` file, then compiled to a `.so` library that needs to be placed in neovim's `runtimepath` (typically under `parser/{language}.so`). -To simplify this, `nvim-treesitter` provides commands to automate this process. -If the language is already [supported by `nvim-treesitter`](#supported-languages), you can install it with - -```vim -:TSInstall -``` - -This command supports tab expansion. -You can also get a list of all available languages and their installation status with `:TSInstallInfo`. -Parsers not on this list can be added manually by following the steps described under ["Adding parsers"](#adding-parsers) below. - -To make sure a parser is at the latest compatible version (as specified in `nvim-treesitter`'s `lockfile.json`), use `:TSUpdate {language}`. To update all parsers unconditionally, use `:TSUpdate all` or just `:TSUpdate`. - -## Modules - -Each module provides a distinct tree-sitter-based feature such as [highlighting](#highlight), [indentation](#indentation), or [folding](#folding); see [`:h nvim-treesitter-modules`](doc/nvim-treesitter.txt) or ["Available modules"](#available-modules) below for a list of modules and their options. - -Following examples assume that you are configuring neovim with lua. If you are using vimscript, see `:h lua-heredoc`. -All modules are disabled by default and need to be activated explicitly in your `init.lua`, e.g., via - -```lua -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the listed parsers MUST always be installed) - ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - -- List of parsers to ignore installing (or "all") - ignore_install = { "javascript" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - highlight = { - enable = true, - - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - disable = { "c", "rust" }, - -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files - disable = function(lang, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} -``` - -Each module can also be enabled or disabled interactively through the following commands: - -```vim -:TSBufEnable {module} " enable module on current buffer -:TSBufDisable {module} " disable module on current buffer -:TSEnable {module} [{ft}] " enable module on every buffer. If filetype is specified, enable only for this filetype. -:TSDisable {module} [{ft}] " disable module on every buffer. If filetype is specified, disable only for this filetype. -:TSModuleInfo [{module}] " list information about modules state for each filetype -``` - -Check [`:h nvim-treesitter-commands`](doc/nvim-treesitter.txt) for a list of all available commands. -It may be necessary to reload the buffer (e.g., via `:e`) after enabling a module interactively. - -# Supported languages - -For `nvim-treesitter` to support a specific feature for a specific language requires both a parser for that language and an appropriate language-specific query file for that feature. - -The following is a list of languages for which a parser can be installed through `:TSInstall`; a checked box means that `nvim-treesitter` also contains queries at least for the `highlight` module. - -Experimental parsers are parsers that have a maintainer but are not stable enough for -daily use yet. - -We are looking for maintainers to add more parsers and to write query files for their languages. Check our [tracking issue](https://github.com/nvim-treesitter/nvim-treesitter/issues/2282) for open language requests. - - - -- [x] [ada](https://github.com/briot/tree-sitter-ada) (maintained by @briot) -- [x] [agda](https://github.com/tree-sitter/tree-sitter-agda) (maintained by @Decodetalkers) -- [x] [angular](https://github.com/dlvandenberg/tree-sitter-angular) (experimental, maintained by @dlvandenberg) -- [x] [apex](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber, @xixiaofinland) -- [x] [arduino](https://github.com/ObserverOfTime/tree-sitter-arduino) (maintained by @ObserverOfTime) -- [x] [asm](https://github.com/RubixDev/tree-sitter-asm) (maintained by @RubixDev) -- [x] [astro](https://github.com/virchau13/tree-sitter-astro) (maintained by @virchau13) -- [x] [authzed](https://github.com/mleonidas/tree-sitter-authzed) (maintained by @mattpolzin) -- [ ] [awk](https://github.com/Beaglefoot/tree-sitter-awk) -- [x] [bash](https://github.com/tree-sitter/tree-sitter-bash) (maintained by @TravonteD) -- [x] [bass](https://github.com/vito/tree-sitter-bass) (maintained by @amaanq) -- [x] [beancount](https://github.com/polarmutex/tree-sitter-beancount) (maintained by @polarmutex) -- [x] [bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) (maintained by @theHamsta, @clason) -- [x] [bicep](https://github.com/amaanq/tree-sitter-bicep) (maintained by @amaanq) -- [x] [bitbake](https://github.com/amaanq/tree-sitter-bitbake) (maintained by @amaanq) -- [x] [blade](https://github.com/EmranMR/tree-sitter-blade) (maintained by @calebdw) -- [x] [blueprint](https://gitlab.com/gabmus/tree-sitter-blueprint.git) (experimental, maintained by @gabmus) -- [x] [bp](https://github.com/ambroisie/tree-sitter-bp) (maintained by @ambroisie) -- [x] [brightscript](https://github.com/ajdelcimmuto/tree-sitter-brightscript) (maintained by @ajdelcimmuto) -- [x] [c](https://github.com/tree-sitter/tree-sitter-c) (maintained by @amaanq) -- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @amaanq) -- [x] [caddy](https://github.com/opa-oz/tree-sitter-caddy) (maintained by @opa-oz) -- [x] [cairo](https://github.com/amaanq/tree-sitter-cairo) (maintained by @amaanq) -- [x] [capnp](https://github.com/amaanq/tree-sitter-capnp) (maintained by @amaanq) -- [x] [chatito](https://github.com/ObserverOfTime/tree-sitter-chatito) (maintained by @ObserverOfTime) -- [x] [circom](https://github.com/Decurity/tree-sitter-circom) (maintained by @alexandr-martirosyan) -- [x] [clojure](https://github.com/sogaiu/tree-sitter-clojure) (maintained by @NoahTheDuke) -- [x] [cmake](https://github.com/uyha/tree-sitter-cmake) (maintained by @uyha) -- [x] [comment](https://github.com/stsewd/tree-sitter-comment) (maintained by @stsewd) -- [x] [commonlisp](https://github.com/theHamsta/tree-sitter-commonlisp) (maintained by @theHamsta) -- [x] [cooklang](https://github.com/addcninblue/tree-sitter-cooklang) (maintained by @addcninblue) -- [x] [corn](https://github.com/jakestanger/tree-sitter-corn) (maintained by @jakestanger) -- [x] [cpon](https://github.com/amaanq/tree-sitter-cpon) (maintained by @amaanq) -- [x] [cpp](https://github.com/tree-sitter/tree-sitter-cpp) (maintained by @theHamsta) -- [x] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD) -- [x] [csv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq) -- [x] [cuda](https://github.com/theHamsta/tree-sitter-cuda) (maintained by @theHamsta) -- [x] [cue](https://github.com/eonpatapon/tree-sitter-cue) (maintained by @amaanq) -- [x] [cylc](https://github.com/elliotfontaine/tree-sitter-cylc) (maintained by @elliotfontaine) -- [x] [d](https://github.com/gdamore/tree-sitter-d) (maintained by @amaanq) -- [x] [dart](https://github.com/UserNobody14/tree-sitter-dart) (maintained by @akinsho) -- [x] [desktop](https://github.com/ValdezFOmar/tree-sitter-desktop) (maintained by @ValdezFOmar) -- [x] [devicetree](https://github.com/joelspadin/tree-sitter-devicetree) (maintained by @jedrzejboczar) -- [x] [dhall](https://github.com/jbellerb/tree-sitter-dhall) (maintained by @amaanq) -- [x] [diff](https://github.com/the-mikedavis/tree-sitter-diff) (maintained by @gbprod) -- [x] [disassembly](https://github.com/ColinKennedy/tree-sitter-disassembly) (maintained by @ColinKennedy) -- [x] [djot](https://github.com/treeman/tree-sitter-djot) (maintained by @NoahTheDuke) -- [x] [dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) (maintained by @camdencheek) -- [x] [dot](https://github.com/rydesun/tree-sitter-dot) (maintained by @rydesun) -- [x] [doxygen](https://github.com/amaanq/tree-sitter-doxygen) (maintained by @amaanq) -- [x] [dtd](https://github.com/tree-sitter-grammars/tree-sitter-xml) (maintained by @ObserverOfTime) -- [x] [earthfile](https://github.com/glehmann/tree-sitter-earthfile) (maintained by @glehmann) -- [x] [ebnf](https://github.com/RubixDev/ebnf) (experimental, maintained by @RubixDev) -- [x] [editorconfig](https://github.com/ValdezFOmar/tree-sitter-editorconfig) (maintained by @ValdezFOmar) -- [x] [eds](https://github.com/uyha/tree-sitter-eds) (maintained by @uyha) -- [x] [eex](https://github.com/connorlay/tree-sitter-eex) (maintained by @connorlay) -- [x] [elixir](https://github.com/elixir-lang/tree-sitter-elixir) (maintained by @connorlay) -- [x] [elm](https://github.com/elm-tooling/tree-sitter-elm) (maintained by @zweimach) -- [x] [elsa](https://github.com/glapa-grossklag/tree-sitter-elsa) (maintained by @glapa-grossklag, @amaanq) -- [x] [elvish](https://github.com/elves/tree-sitter-elvish) (maintained by @elves) -- [ ] [embedded_template](https://github.com/tree-sitter/tree-sitter-embedded-template) -- [x] [enforce](https://github.com/simonvic/tree-sitter-enforce) (maintained by @simonvic) -- [x] [erlang](https://github.com/WhatsApp/tree-sitter-erlang) (maintained by @filmor) -- [x] [facility](https://github.com/FacilityApi/tree-sitter-facility) (maintained by @bryankenote) -- [x] [faust](https://github.com/khiner/tree-sitter-faust) (maintained by @khiner) -- [x] [fennel](https://github.com/alexmozaidze/tree-sitter-fennel) (maintained by @alexmozaidze) -- [x] [fidl](https://github.com/google/tree-sitter-fidl) (maintained by @chaopeng) -- [x] [firrtl](https://github.com/amaanq/tree-sitter-firrtl) (maintained by @amaanq) -- [x] [fish](https://github.com/ram02z/tree-sitter-fish) (maintained by @ram02z) -- [x] [foam](https://github.com/FoamScience/tree-sitter-foam) (experimental, maintained by @FoamScience) -- [x] [forth](https://github.com/AlexanderBrevig/tree-sitter-forth) (maintained by @amaanq) -- [x] [fortran](https://github.com/stadelmanma/tree-sitter-fortran) (maintained by @amaanq) -- [x] [fsh](https://github.com/mgramigna/tree-sitter-fsh) (maintained by @mgramigna) -- [x] [fsharp](https://github.com/ionide/tree-sitter-fsharp) (maintained by @nsidorenco) -- [x] [func](https://github.com/amaanq/tree-sitter-func) (maintained by @amaanq) -- [x] [fusion](https://gitlab.com/jirgn/tree-sitter-fusion.git) (maintained by @jirgn) -- [x] [GAP system](https://github.com/gap-system/tree-sitter-gap) (maintained by @reiniscirpons) -- [x] [GAP system test files](https://github.com/gap-system/tree-sitter-gaptst) (maintained by @reiniscirpons) -- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by @PrestonKnopp) -- [x] [gdshader](https://github.com/GodOfAvacyn/tree-sitter-gdshader) (maintained by @godofavacyn) -- [x] [git_config](https://github.com/the-mikedavis/tree-sitter-git-config) (maintained by @amaanq) -- [x] [git_rebase](https://github.com/the-mikedavis/tree-sitter-git-rebase) (maintained by @gbprod) -- [x] [gitattributes](https://github.com/ObserverOfTime/tree-sitter-gitattributes) (maintained by @ObserverOfTime) -- [x] [gitcommit](https://github.com/gbprod/tree-sitter-gitcommit) (maintained by @gbprod) -- [x] [gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) (maintained by @theHamsta) -- [x] [gleam](https://github.com/gleam-lang/tree-sitter-gleam) (maintained by @amaanq) -- [x] [Glimmer and Ember](https://github.com/ember-tooling/tree-sitter-glimmer) (maintained by @NullVoxPopuli) -- [x] [glimmer_javascript](https://github.com/NullVoxPopuli/tree-sitter-glimmer-javascript) (maintained by @NullVoxPopuli) -- [x] [glimmer_typescript](https://github.com/NullVoxPopuli/tree-sitter-glimmer-typescript) (maintained by @NullVoxPopuli) -- [x] [glsl](https://github.com/theHamsta/tree-sitter-glsl) (maintained by @theHamsta) -- [x] [GN (Generate Ninja)](https://github.com/amaanq/tree-sitter-gn) (maintained by @amaanq) -- [x] [gnuplot](https://github.com/dpezto/tree-sitter-gnuplot) (maintained by @dpezto) -- [x] [go](https://github.com/tree-sitter/tree-sitter-go) (maintained by @theHamsta, @WinWisely268) -- [x] [goctl](https://github.com/chaozwn/tree-sitter-goctl) (maintained by @chaozwn) -- [x] [Godot Resources (gdresource)](https://github.com/PrestonKnopp/tree-sitter-godot-resource) (maintained by @pierpo) -- [x] [gomod](https://github.com/camdencheek/tree-sitter-go-mod) (maintained by @camdencheek) -- [x] [gosum](https://github.com/amaanq/tree-sitter-go-sum) (maintained by @amaanq) -- [x] [gotmpl](https://github.com/ngalaiko/tree-sitter-go-template) (maintained by @qvalentin) -- [x] [gowork](https://github.com/omertuc/tree-sitter-go-work) (maintained by @omertuc) -- [x] [gpg](https://github.com/ObserverOfTime/tree-sitter-gpg-config) (maintained by @ObserverOfTime) -- [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley) -- [x] [gren](https://github.com/MaeBrooks/tree-sitter-gren) (maintained by @MaeBrooks) -- [x] [groovy](https://github.com/murtaza64/tree-sitter-groovy) (maintained by @murtaza64) -- [x] [gstlaunch](https://github.com/theHamsta/tree-sitter-gstlaunch) (maintained by @theHamsta) -- [ ] [hack](https://github.com/slackhq/tree-sitter-hack) -- [x] [hare](https://github.com/amaanq/tree-sitter-hare) (maintained by @amaanq) -- [x] [haskell](https://github.com/tree-sitter/tree-sitter-haskell) (maintained by @mrcjkb) -- [x] [haskell_persistent](https://github.com/MercuryTechnologies/tree-sitter-haskell-persistent) (maintained by @lykahb) -- [x] [hcl](https://github.com/MichaHoffmann/tree-sitter-hcl) (maintained by @MichaHoffmann) -- [x] [heex](https://github.com/connorlay/tree-sitter-heex) (maintained by @connorlay) -- [x] [helm](https://github.com/ngalaiko/tree-sitter-go-template) (maintained by @qvalentin) -- [x] [hjson](https://github.com/winston0410/tree-sitter-hjson) (maintained by @winston0410) -- [x] [hlsl](https://github.com/theHamsta/tree-sitter-hlsl) (maintained by @theHamsta) -- [x] [hlsplaylist](https://github.com/Freed-Wu/tree-sitter-hlsplaylist) (maintained by @Freed-Wu) -- [x] [hocon](https://github.com/antosha417/tree-sitter-hocon) (maintained by @antosha417) -- [x] [hoon](https://github.com/urbit-pilled/tree-sitter-hoon) (experimental, maintained by @urbit-pilled) -- [x] [html](https://github.com/tree-sitter/tree-sitter-html) (maintained by @TravonteD) -- [x] [htmldjango](https://github.com/interdependence/tree-sitter-htmldjango) (experimental, maintained by @ObserverOfTime) -- [x] [http](https://github.com/rest-nvim/tree-sitter-http) (maintained by @amaanq, @NTBBloodbath) -- [x] [hurl](https://github.com/pfeiferj/tree-sitter-hurl) (maintained by @pfeiferj) -- [x] [hyprlang](https://github.com/luckasRanarison/tree-sitter-hyprlang) (maintained by @luckasRanarison) -- [x] [idl](https://github.com/cathaysia/tree-sitter-idl) (maintained by @cathaysia) -- [x] [idris](https://github.com/kayhide/tree-sitter-idris) (maintained by @srghma) -- [x] [ini](https://github.com/justinmk/tree-sitter-ini) (experimental, maintained by @theHamsta) -- [x] [inko](https://github.com/inko-lang/tree-sitter-inko) (maintained by @yorickpeterse) -- [x] [ipkg](https://github.com/srghma/tree-sitter-ipkg) (maintained by @srghma) -- [x] [ispc](https://github.com/fab4100/tree-sitter-ispc) (maintained by @fab4100) -- [x] [janet_simple](https://github.com/sogaiu/tree-sitter-janet-simple) (maintained by @sogaiu) -- [x] [java](https://github.com/tree-sitter/tree-sitter-java) (maintained by @p00f) -- [x] [javadoc](https://github.com/rmuir/tree-sitter-javadoc) (maintained by @rmuir) -- [x] [javascript](https://github.com/tree-sitter/tree-sitter-javascript) (maintained by @steelsojka) -- [x] [jinja](https://github.com/cathaysia/tree-sitter-jinja) (maintained by @cathaysia) -- [x] [jinja_inline](https://github.com/cathaysia/tree-sitter-jinja) (maintained by @cathaysia) -- [x] [jq](https://github.com/flurie/tree-sitter-jq) (maintained by @ObserverOfTime) -- [x] [jsdoc](https://github.com/tree-sitter/tree-sitter-jsdoc) (maintained by @steelsojka) -- [x] [json](https://github.com/tree-sitter/tree-sitter-json) (maintained by @steelsojka) -- [x] [json5](https://github.com/Joakker/tree-sitter-json5) (maintained by @Joakker) -- [x] [JSON with comments](https://gitlab.com/WhyNotHugo/tree-sitter-jsonc.git) (maintained by @WhyNotHugo) -- [x] [jsonnet](https://github.com/sourcegraph/tree-sitter-jsonnet) (maintained by @nawordar) -- [x] [julia](https://github.com/tree-sitter/tree-sitter-julia) (maintained by @fredrikekre) -- [x] [just](https://github.com/IndianBoy42/tree-sitter-just) (maintained by @Hubro) -- [x] [kcl](https://github.com/kcl-lang/tree-sitter-kcl) (maintained by @bertbaron) -- [x] [kconfig](https://github.com/amaanq/tree-sitter-kconfig) (maintained by @amaanq) -- [x] [kdl](https://github.com/amaanq/tree-sitter-kdl) (maintained by @amaanq) -- [x] [kotlin](https://github.com/fwcd/tree-sitter-kotlin) (maintained by @SalBakraa) -- [x] [koto](https://github.com/koto-lang/tree-sitter-koto) (maintained by @irh) -- [x] [kusto](https://github.com/Willem-J-an/tree-sitter-kusto) (maintained by @Willem-J-an) -- [x] [lalrpop](https://github.com/traxys/tree-sitter-lalrpop) (maintained by @traxys) -- [x] [latex](https://github.com/latex-lsp/tree-sitter-latex) (maintained by @theHamsta, @clason) -- [x] [ledger](https://github.com/cbarrete/tree-sitter-ledger) (maintained by @cbarrete) -- [x] [leo](https://github.com/r001/tree-sitter-leo) (maintained by @r001) -- [x] [linkerscript](https://github.com/amaanq/tree-sitter-linkerscript) (maintained by @amaanq) -- [x] [liquid](https://github.com/hankthetank27/tree-sitter-liquid) (maintained by @hankthetank27) -- [x] [liquidsoap](https://github.com/savonet/tree-sitter-liquidsoap) (maintained by @toots) -- [x] [llvm](https://github.com/benwilliamgraham/tree-sitter-llvm) (maintained by @benwilliamgraham) -- [x] [lua](https://github.com/MunifTanjim/tree-sitter-lua) (maintained by @muniftanjim) -- [x] [luadoc](https://github.com/amaanq/tree-sitter-luadoc) (maintained by @amaanq) -- [x] [lua patterns](https://github.com/amaanq/tree-sitter-luap) (maintained by @amaanq) -- [x] [luau](https://github.com/amaanq/tree-sitter-luau) (maintained by @amaanq) -- [x] [m68k](https://github.com/grahambates/tree-sitter-m68k) (maintained by @grahambates) -- [x] [make](https://github.com/alemuller/tree-sitter-make) (maintained by @lewis6991) -- [x] [markdown (basic highlighting)](https://github.com/MDeiml/tree-sitter-markdown) (experimental, maintained by @MDeiml) -- [x] [markdown_inline (needed for full highlighting)](https://github.com/MDeiml/tree-sitter-markdown) (experimental, maintained by @MDeiml) -- [x] [matlab](https://github.com/acristoffers/tree-sitter-matlab) (maintained by @acristoffers) -- [x] [menhir](https://github.com/Kerl13/tree-sitter-menhir) (maintained by @Kerl13) -- [ ] [mermaid](https://github.com/monaqa/tree-sitter-mermaid) (experimental) -- [x] [meson](https://github.com/Decodetalkers/tree-sitter-meson) (maintained by @Decodetalkers) -- [x] [mlir](https://github.com/artagnon/tree-sitter-mlir) (experimental, maintained by @artagnon) -- [x] [muttrc](https://github.com/neomutt/tree-sitter-muttrc) (maintained by @Freed-Wu) -- [x] [nasm](https://github.com/naclsn/tree-sitter-nasm) (maintained by @ObserverOfTime) -- [x] [nginx](https://github.com/opa-oz/tree-sitter-nginx) (maintained by @opa-oz) -- [ ] [nickel](https://github.com/nickel-lang/tree-sitter-nickel) -- [x] [nim](https://github.com/alaviss/tree-sitter-nim) (maintained by @aMOPel) -- [x] [nim_format_string](https://github.com/aMOPel/tree-sitter-nim-format-string) (maintained by @aMOPel) -- [x] [ninja](https://github.com/alemuller/tree-sitter-ninja) (maintained by @alemuller) -- [x] [nix](https://github.com/cstrahan/tree-sitter-nix) (maintained by @leo60228) -- [x] [norg](https://github.com/nvim-neorg/tree-sitter-norg) (maintained by @JoeyGrajciar, @vhyrro) -- [x] [nqc](https://github.com/amaanq/tree-sitter-nqc) (maintained by @amaanq) -- [x] [nu](https://github.com/nushell/tree-sitter-nu) (maintained by @abhisheksingh0x558) -- [x] [objc](https://github.com/amaanq/tree-sitter-objc) (maintained by @amaanq) -- [x] [objdump](https://github.com/ColinKennedy/tree-sitter-objdump) (maintained by @ColinKennedy) -- [x] [ocaml](https://github.com/tree-sitter/tree-sitter-ocaml) (maintained by @undu) -- [x] [ocaml_interface](https://github.com/tree-sitter/tree-sitter-ocaml) (maintained by @undu) -- [x] [ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) (maintained by @undu) -- [x] [odin](https://github.com/amaanq/tree-sitter-odin) (maintained by @amaanq) -- [x] [pascal](https://github.com/Isopod/tree-sitter-pascal) (maintained by @Isopod) -- [x] [passwd](https://github.com/ath3/tree-sitter-passwd) (maintained by @amaanq) -- [x] [pem](https://github.com/ObserverOfTime/tree-sitter-pem) (maintained by @ObserverOfTime) -- [x] [perl](https://github.com/tree-sitter-perl/tree-sitter-perl) (maintained by @RabbiVeesh, @LeoNerd) -- [x] [php](https://github.com/tree-sitter/tree-sitter-php) (maintained by @tk-shirasaka, @calebdw) -- [x] [php_only](https://github.com/tree-sitter/tree-sitter-php) (maintained by @tk-shirasaka, @calebdw) -- [x] [phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc) (experimental, maintained by @mikehaertl) -- [x] [pioasm](https://github.com/leo60228/tree-sitter-pioasm) (maintained by @leo60228) -- [x] [po](https://github.com/erasin/tree-sitter-po) (maintained by @amaanq) -- [x] [pod](https://github.com/tree-sitter-perl/tree-sitter-pod) (maintained by @RabbiVeesh, @LeoNerd) -- [x] [Path of Exile item filter](https://github.com/ObserverOfTime/tree-sitter-poe-filter) (experimental, maintained by @ObserverOfTime) -- [x] [pony](https://github.com/amaanq/tree-sitter-pony) (maintained by @amaanq, @mfelsche) -- [x] [powershell](https://github.com/airbus-cert/tree-sitter-powershell) (maintained by @L2jLiga) -- [x] [printf](https://github.com/ObserverOfTime/tree-sitter-printf) (maintained by @ObserverOfTime) -- [x] [prisma](https://github.com/victorhqc/tree-sitter-prisma) (maintained by @elianiva) -- [x] [problog](https://github.com/foxyseta/tree-sitter-prolog) (maintained by @foxyseta) -- [x] [prolog](https://github.com/foxyseta/tree-sitter-prolog) (maintained by @foxyseta) -- [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann) -- [x] [properties](https://github.com/tree-sitter-grammars/tree-sitter-properties) (maintained by @ObserverOfTime) -- [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood) -- [x] [prql](https://github.com/PRQL/tree-sitter-prql) (maintained by @matthias-Q) -- [x] [psv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq) -- [x] [pug](https://github.com/zealot128/tree-sitter-pug) (experimental, maintained by @zealot128) -- [x] [puppet](https://github.com/amaanq/tree-sitter-puppet) (maintained by @amaanq) -- [x] [purescript](https://github.com/postsolar/tree-sitter-purescript) (maintained by @postsolar) -- [x] [PyPA manifest](https://github.com/ObserverOfTime/tree-sitter-pymanifest) (maintained by @ObserverOfTime) -- [x] [python](https://github.com/tree-sitter/tree-sitter-python) (maintained by @stsewd, @theHamsta) -- [x] [ql](https://github.com/tree-sitter/tree-sitter-ql) (maintained by @pwntester) -- [x] [qmldir](https://github.com/Decodetalkers/tree-sitter-qmldir) (maintained by @amaanq) -- [x] [qmljs](https://github.com/yuja/tree-sitter-qmljs) (maintained by @Decodetalkers) -- [x] [Tree-Sitter query language](https://github.com/nvim-treesitter/tree-sitter-query) (maintained by @steelsojka) -- [x] [r](https://github.com/r-lib/tree-sitter-r) (maintained by @ribru17) -- [ ] [racket](https://github.com/6cdh/tree-sitter-racket) -- [x] [ralph](https://github.com/alephium/tree-sitter-ralph) (maintained by @tdroxler) -- [x] [rasi](https://github.com/Fymyte/tree-sitter-rasi) (maintained by @Fymyte) -- [x] [razor](https://github.com/tris203/tree-sitter-razor) (maintained by @tris203) -- [x] [rbs](https://github.com/joker1007/tree-sitter-rbs) (maintained by @joker1007) -- [x] [re2c](https://github.com/amaanq/tree-sitter-re2c) (maintained by @amaanq) -- [x] [readline](https://github.com/ribru17/tree-sitter-readline) (maintained by @ribru17) -- [x] [regex](https://github.com/tree-sitter/tree-sitter-regex) (maintained by @theHamsta) -- [x] [rego](https://github.com/FallenAngel97/tree-sitter-rego) (maintained by @FallenAngel97) -- [x] [pip requirements](https://github.com/ObserverOfTime/tree-sitter-requirements) (maintained by @ObserverOfTime) -- [x] [rescript](https://github.com/rescript-lang/tree-sitter-rescript) (maintained by @ribru17) -- [x] [rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) (maintained by @bamonroe) -- [x] [robot](https://github.com/Hubro/tree-sitter-robot) (maintained by @Hubro) -- [x] [robots](https://github.com/opa-oz/tree-sitter-robots-txt) (maintained by @opa-oz) -- [x] [roc](https://github.com/faldor20/tree-sitter-roc) (maintained by @nat-418) -- [x] [ron](https://github.com/amaanq/tree-sitter-ron) (maintained by @amaanq) -- [x] [rst](https://github.com/stsewd/tree-sitter-rst) (maintained by @stsewd) -- [x] [ruby](https://github.com/tree-sitter/tree-sitter-ruby) (maintained by @TravonteD) -- [x] [runescript](https://github.com/2004Scape/tree-sitter-runescript) (maintained by @2004Scape) -- [x] [rust](https://github.com/tree-sitter/tree-sitter-rust) (maintained by @amaanq) -- [x] [scala](https://github.com/tree-sitter/tree-sitter-scala) (maintained by @stevanmilic) -- [x] [scfg](https://github.com/rockorager/tree-sitter-scfg) (maintained by @WhyNotHugo) -- [ ] [scheme](https://github.com/6cdh/tree-sitter-scheme) -- [x] [scss](https://github.com/serenadeai/tree-sitter-scss) (maintained by @elianiva) -- [x] [sflog](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber, @xixiaofinland) -- [x] [slang](https://github.com/theHamsta/tree-sitter-slang) (experimental, maintained by @theHamsta) -- [x] [slim](https://github.com/theoo/tree-sitter-slim) (maintained by @theoo) -- [x] [slint](https://github.com/slint-ui/tree-sitter-slint) (maintained by @hunger) -- [x] [smali](https://github.com/tree-sitter-grammars/tree-sitter-smali) (maintained by @amaanq) -- [x] [smithy](https://github.com/indoorvivants/tree-sitter-smithy) (maintained by @amaanq, @keynmol) -- [ ] [snakemake](https://github.com/osthomas/tree-sitter-snakemake) (experimental) -- [x] [solidity](https://github.com/JoranHonig/tree-sitter-solidity) (maintained by @amaanq) -- [x] [soql](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber, @xixiaofinland) -- [x] [sosl](https://github.com/aheber/tree-sitter-sfapex) (maintained by @aheber, @xixiaofinland) -- [x] [sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) (maintained by @Sarrus1) -- [x] [sparql](https://github.com/GordianDziwis/tree-sitter-sparql) (maintained by @GordianDziwis) -- [x] [sql](https://github.com/derekstride/tree-sitter-sql) (maintained by @derekstride) -- [x] [squirrel](https://github.com/amaanq/tree-sitter-squirrel) (maintained by @amaanq) -- [x] [ssh_config](https://github.com/ObserverOfTime/tree-sitter-ssh-config) (maintained by @ObserverOfTime) -- [x] [starlark](https://github.com/amaanq/tree-sitter-starlark) (maintained by @amaanq) -- [x] [strace](https://github.com/sigmaSd/tree-sitter-strace) (maintained by @amaanq) -- [x] [styled](https://github.com/mskelton/tree-sitter-styled) (maintained by @mskelton) -- [x] [supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) (maintained by @madskjeldgaard) -- [x] [superhtml](https://github.com/kristoff-it/superhtml) (maintained by @rockorager) -- [x] [surface](https://github.com/connorlay/tree-sitter-surface) (maintained by @connorlay) -- [x] [svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte) (maintained by @amaanq) -- [x] [sway](https://github.com/FuelLabs/tree-sitter-sway.git) (maintained by @ribru17) -- [x] [swift](https://github.com/alex-pinkus/tree-sitter-swift) (maintained by @alex-pinkus) -- [x] [sxhkdrc](https://github.com/RaafatTurki/tree-sitter-sxhkdrc) (maintained by @RaafatTurki) -- [x] [systemtap](https://github.com/ok-ryoko/tree-sitter-systemtap) (maintained by @ok-ryoko) -- [x] [t32](https://gitlab.com/xasc/tree-sitter-t32.git) (maintained by @xasc) -- [x] [tablegen](https://github.com/amaanq/tree-sitter-tablegen) (maintained by @amaanq) -- [x] [tact](https://github.com/tact-lang/tree-sitter-tact) (maintained by @novusnota) -- [x] [tcl](https://github.com/tree-sitter-grammars/tree-sitter-tcl) (maintained by @lewis6991) -- [x] [teal](https://github.com/euclidianAce/tree-sitter-teal) (maintained by @euclidianAce) -- [x] [templ](https://github.com/vrischmann/tree-sitter-templ) (maintained by @vrischmann) -- [x] [tera](https://github.com/uncenter/tree-sitter-tera) (maintained by @uncenter) -- [x] [terraform](https://github.com/MichaHoffmann/tree-sitter-hcl) (maintained by @MichaHoffmann) -- [x] [textproto](https://github.com/PorterAtGoogle/tree-sitter-textproto) (maintained by @Porter) -- [x] [thrift](https://github.com/duskmoon314/tree-sitter-thrift) (maintained by @amaanq, @duskmoon314) -- [x] [tiger](https://github.com/ambroisie/tree-sitter-tiger) (maintained by @ambroisie) -- [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer, @susliko) -- [x] [tmux](https://github.com/Freed-Wu/tree-sitter-tmux) (maintained by @Freed-Wu) -- [x] [todotxt](https://github.com/arnarg/tree-sitter-todotxt) (experimental, maintained by @arnarg) -- [x] [toml](https://github.com/tree-sitter-grammars/tree-sitter-toml) (maintained by @tk-shirasaka) -- [x] [tsv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq) -- [x] [tsx](https://github.com/tree-sitter/tree-sitter-typescript) (maintained by @steelsojka) -- [x] [turtle](https://github.com/GordianDziwis/tree-sitter-turtle) (maintained by @GordianDziwis) -- [x] [twig](https://github.com/gbprod/tree-sitter-twig) (maintained by @gbprod) -- [x] [typescript](https://github.com/tree-sitter/tree-sitter-typescript) (maintained by @steelsojka) -- [x] [typespec](https://github.com/happenslol/tree-sitter-typespec) (maintained by @happenslol) -- [x] [typoscript](https://github.com/Teddytrombone/tree-sitter-typoscript) (maintained by @Teddytrombone) -- [x] [typst](https://github.com/uben0/tree-sitter-typst) (maintained by @uben0, @RaafatTurki) -- [x] [udev](https://github.com/ObserverOfTime/tree-sitter-udev) (maintained by @ObserverOfTime) -- [x] [ungrammar](https://github.com/Philipp-M/tree-sitter-ungrammar) (maintained by @Philipp-M, @amaanq) -- [x] [unison](https://github.com/kylegoetz/tree-sitter-unison) (maintained by @tapegram) -- [x] [usd](https://github.com/ColinKennedy/tree-sitter-usd) (maintained by @ColinKennedy) -- [x] [uxn tal](https://github.com/amaanq/tree-sitter-uxntal) (maintained by @amaanq) -- [x] [v](https://github.com/vlang/v-analyzer) (maintained by @kkharji, @amaanq) -- [x] [vala](https://github.com/vala-lang/tree-sitter-vala) (maintained by @Prince781) -- [x] [vento](https://github.com/ventojs/tree-sitter-vento) (maintained by @wrapperup, @oscarotero) -- [x] [verilog](https://github.com/gmlarumbe/tree-sitter-systemverilog) (maintained by @zhangwwpeng) -- [x] [vhdl](https://github.com/jpt13653903/tree-sitter-vhdl) (maintained by @jpt13653903) -- [x] [vhs](https://github.com/charmbracelet/tree-sitter-vhs) (maintained by @caarlos0) -- [x] [vim](https://github.com/neovim/tree-sitter-vim) (maintained by @clason) -- [x] [vimdoc](https://github.com/neovim/tree-sitter-vimdoc) (maintained by @clason) -- [x] [vrl](https://github.com/belltoy/tree-sitter-vrl) (maintained by @belltoy) -- [x] [vue](https://github.com/tree-sitter-grammars/tree-sitter-vue) (maintained by @WhyNotHugo, @lucario387) -- [x] [wgsl](https://github.com/szebniok/tree-sitter-wgsl) (maintained by @szebniok) -- [x] [wgsl_bevy](https://github.com/theHamsta/tree-sitter-wgsl-bevy) (maintained by @theHamsta) -- [x] [wing](https://github.com/winglang/tree-sitter-wing) (maintained by @gshpychka, @MarkMcCulloh) -- [x] [wit](https://github.com/liamwh/tree-sitter-wit) (maintained by @liamwh) -- [x] [xcompose](https://github.com/ObserverOfTime/tree-sitter-xcompose) (maintained by @ObserverOfTime) -- [x] [xml](https://github.com/tree-sitter-grammars/tree-sitter-xml) (maintained by @ObserverOfTime) -- [x] [xresources](https://github.com/ValdezFOmar/tree-sitter-xresources) (maintained by @ValdezFOmar) -- [x] [yaml](https://github.com/tree-sitter-grammars/tree-sitter-yaml) (maintained by @amaanq) -- [x] [yang](https://github.com/Hubro/tree-sitter-yang) (maintained by @Hubro) -- [x] [yuck](https://github.com/Philipp-M/tree-sitter-yuck) (maintained by @Philipp-M, @amaanq) -- [x] [zathurarc](https://github.com/Freed-Wu/tree-sitter-zathurarc) (maintained by @Freed-Wu) -- [x] [zig](https://github.com/tree-sitter-grammars/tree-sitter-zig) (maintained by @amaanq) -- [x] [ziggy](https://github.com/kristoff-it/ziggy) (maintained by @rockorager) -- [x] [ziggy_schema](https://github.com/kristoff-it/ziggy) (maintained by @rockorager) - - -For related information on the supported languages, including related plugins, see [this wiki page](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Supported-Languages-Information). - -# Available modules - -Modules provide the top-level features of `nvim-treesitter`. -The following is a list of modules included in `nvim-treesitter` and their configuration via `init.lua` (where multiple modules can be combined in a single call to `setup`). -Note that not all modules work for all languages (depending on the queries available for them). -Additional modules can be provided as [external plugins](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Extra-modules-and-plugins). - -#### Highlight - -Consistent syntax highlighting. - -```lua -require'nvim-treesitter.configs'.setup { - highlight = { - enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} -``` - -To customize the syntax highlighting of a capture, simply define or link a highlight group of the same name: - -```lua --- Highlight the @foo.bar capture group with the "Identifier" highlight group -vim.api.nvim_set_hl(0, "@foo.bar", { link = "Identifier" }) -``` - -For a language-specific highlight, append the name of the language: - -```lua --- Highlight @foo.bar as "Identifier" only in Lua files -vim.api.nvim_set_hl(0, "@foo.bar.lua", { link = "Identifier" }) -``` - -See `:h treesitter-highlight-groups` for details. - -#### Incremental selection - -Incremental selection based on the named nodes from the grammar. - -```lua -require'nvim-treesitter.configs'.setup { - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", -- set to `false` to disable one of the mappings - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, -} -``` - -#### Indentation - -Indentation based on treesitter for the `=` operator. -**NOTE: This is an experimental feature**. - -```lua -require'nvim-treesitter.configs'.setup { - indent = { - enable = true - } -} -``` - -#### Folding - -Tree-sitter based folding (implemented in Neovim itself, see `:h vim.treesitter.foldexpr()`). To enable it for the current window, set - -```lua -vim.wo.foldmethod = 'expr' -vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' -``` - -This will respect your `foldminlines` and `foldnestmax` settings. - -# Advanced setup - -## Changing the parser install directory - -If you want to install the parsers to a custom directory you can specify this -directory with `parser_install_dir` option in that is passed to `setup`. -`nvim-treesitter` will then install the parser files into this directory. - -This directory must be writeable and must be explicitly prepended to the -`runtimepath`. For example: - -```lua - -- It MUST be at the beginning of runtimepath. Otherwise the parsers from Neovim itself - -- is loaded that may not be compatible with the queries from the 'nvim-treesitter' plugin. - vim.opt.runtimepath:prepend("/some/path/to/store/parsers") - - require'nvim-treesitter.configs'.setup { - parser_install_dir = "/some/path/to/store/parsers", - - ... - - } -``` - -If this option is not included in the setup options, or is explicitly set to -`nil` then the default install directories will be used. If this value is set -the default directories will be ignored. - -Bear in mind that any parser installed into a parser folder on the runtime path -will still be considered installed. (For example if -"~/.local/share/nvim/site/parser/c.so" exists then the "c" parser will be -considered installed, even though it is not in `parser_install_dir`) - -The default paths are: - -1. first the package folder. Where `nvim-treesitter` is installed. -2. second the site directory. This is the "site" subdirectory of `stdpath("data")`. - -## Adding parsers - -If you have a parser that is not on the list of supported languages (either as a repository on Github or in a local directory), you can add it manually for use by `nvim-treesitter` as follows: - -1. Clone the repository or [create a new project](https://tree-sitter.github.io/tree-sitter/creating-parsers#project-setup) in, say, `~/projects/tree-sitter-zimbu`. Make sure that the `tree-sitter-cli` executable is installed and in your path; see for installation instructions. -2. Run `tree-sitter generate` in this directory (followed by `tree-sitter test` for good measure). -3. Add the following snippet to your `init.lua`: - -```lua -local parser_config = require "nvim-treesitter.parsers".get_parser_configs() -parser_config.zimbu = { - install_info = { - url = "~/projects/tree-sitter-zimbu", -- local path or git repo - files = {"src/parser.c"}, -- note that some parsers also require src/scanner.c or src/scanner.cc - -- optional entries: - branch = "main", -- default branch in case of git repo if different from master - generate_requires_npm = false, -- if stand-alone parser without npm dependencies - requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c - }, - filetype = "zu", -- if filetype does not match the parser name -} -``` - -If you wish to set a specific parser for a filetype, you should use `vim.treesitter.language.register()`: - -```lua -vim.treesitter.language.register('python', 'someft') -- the someft filetype will use the python parser and queries. -``` - -Note this requires Nvim v0.9. - -4. Start `nvim` and `:TSInstall zimbu`. - -You can also skip step 2 and use `:TSInstallFromGrammar zimbu` to install directly from a `grammar.js` in the top-level directory specified by `url`. -Once the parser is installed, you can update it (from the latest revision of the `main` branch if `url` is a Github repository) with `:TSUpdate zimbu`. - -Note that neither `:TSInstall` nor `:TSInstallFromGrammar` copy query files from the grammar repository. -If you want your installed grammar to be useful, you must manually [add query files](#adding-queries) to your local nvim-treesitter installation. -Note also that module functionality is only triggered if your language's filetype is correctly identified. -If Neovim does not detect your language's filetype by default, you can use [Neovim's `vim.filetype.add()`]() to add a custom detection rule. - -If you use a git repository for your parser and want to use a specific version, you can set the `revision` key -in the `install_info` table for you parser config. - -## Adding queries - -Queries are what `nvim-treesitter` uses to extract information from the syntax tree; -they are located in the `queries/{language}/*` runtime directories (see `:h rtp`), -like the `queries` folder of this plugin, e.g. `queries/{language}/{locals,highlights,textobjects}.scm`. -Other modules may require additional queries such as `folding.scm`. You can find a -list of all supported capture names in [CONTRIBUTING.md](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#parser-configurations). - -The first query file on `runtimepath` will be used (see `:h treesitter-query`). -If you want to make a query on the user config extend other queries instead of -replacing them, see `:h treesitter-query-modeline-extends`. - -If you want to completely override a query, you can use `:h vim.treesitter.query.set()`. -For example, to override the `injections` queries from `c` with your own: - -```lua -vim.treesitter.query.set("c", "injections", "(comment) @comment") -``` - -Note: when using `query.set()`, all queries in the runtime directories will be ignored. - -## Adding modules - -If you wish you write your own module, you need to support - -- tree-sitter language detection support; -- attaching and detaching to buffers; -- all nvim-treesitter commands. - -At the top level, you can use the `define_modules` function to define one or more modules or module groups: - -```lua -require'nvim-treesitter'.define_modules { - my_cool_plugin = { - attach = function(bufnr, lang) - -- Do cool stuff here - end, - detach = function(bufnr) - -- Undo cool stuff here - end, - is_supported = function(lang) - -- Check if the language is supported - end - } -} -``` - -with the following properties: - -- `module_path` specifies a require path (string) that exports a module with an `attach` and `detach` function. This is not required if the functions are on this definition. -- `enable` determines if the module is enabled by default. This is usually overridden by the user. -- `disable` takes a list of languages that this module is disabled for. This is usually overridden by the user. -- `is_supported` takes a function that takes a language and determines if this module supports that language. -- `attach` takes a function that attaches to a buffer. This is required if `module_path` is not provided. -- `detach` takes a function that detaches from a buffer. This is required if `module_path` is not provided. - -# Extra features - -### Statusline indicator - -```vim -echo nvim_treesitter#statusline(90) " 90 can be any length -module->expression_statement->call->identifier -``` - -### Utilities - -You can get some utility functions with - -```lua -local ts_utils = require 'nvim-treesitter.ts_utils' -``` - -Check [`:h nvim-treesitter-utils`](doc/nvim-treesitter.txt) for more information. - -# Troubleshooting - -Before doing anything, make sure you have the latest version of this plugin and run `:checkhealth nvim-treesitter`. -It can also help to update the parsers via `:TSUpdate`. - -#### Feature `X` does not work for `{language}`... - -First, check the `health#nvim_treesitter#check` and the `health#treesitter#check` sections of `:checkhealth` for any warning. -If there is one, it's highly likely that this is the cause of the problem. - -Next check the `## Parser/Features` subsection of the `health#nvim_treesitter#check` section of `:checkhealth` to ensure the desired module is enabled for your language. -If not, you might be missing query files; see [Adding queries](#adding-queries). - -Finally, ensure Neovim is correctly identifying your language's filetype using the `:echo &filetype` command while one of your language's files is open in Neovim. -If not, add a short Vimscript file to nvim-treesitter's `ftdetect` runtime directory following [Neovim's documentation](https://neovim.io/doc/user/filetype.html#new-filetype) on filetype detection. -You can also quickly & temporarily set the filetype for a single buffer with the `:set filetype=langname` command to test whether it fixes the problem. - -If everything is okay, then it might be an actual error. -In that case, feel free to [open an issue here](https://github.com/nvim-treesitter/nvim-treesitter/issues/new/choose). - -#### I get `module 'vim.treesitter.query' not found` - -Make sure you have the latest version of Neovim. - -#### I get `Error detected while processing .../plugin/nvim-treesitter.vim` every time I open Neovim - -This is probably due to a change in a parser's grammar or its queries. -Try updating the parser that you suspect has changed (`:TSUpdate {language}`) or all of them (`:TSUpdate`). -If the error persists after updating all parsers, -please [open an issue](https://github.com/nvim-treesitter/nvim-treesitter/issues/new/choose). - -#### I get `query error: invalid node type at position` - -This could be due a query file outside this plugin using outdated nodes, -or due to an outdated parser. - -- Make sure you have the parsers up to date with `:TSUpdate` -- Make sure you don't have more than one `parser` runtime directory. - You can execute this command `:echo nvim_get_runtime_file('parser', v:true)` to find all runtime directories. - If you get more than one path, remove the ones that are outside this plugin (`nvim-treesitter` directory), - so the correct version of the parser is used. - -#### I experience weird highlighting issues similar to [#78](https://github.com/nvim-treesitter/nvim-treesitter/issues/78) - -This is a well known issue, which arises when the tree and the buffer have gotten out of sync. -As this is an upstream issue, we don't have any definite fix. -To get around this, you can force reparsing the buffer with - -```vim -:write | edit | TSBufEnable highlight -``` - -This will save, restore and enable highlighting for the current buffer. - -#### I experience bugs when using `nvim-treesitter`'s `foldexpr` similar to [#194](https://github.com/nvim-treesitter/nvim-treesitter/issues/194) - -This might happen, and is known to happen, with `vim-clap`. -To avoid these kind of errors, please use `setlocal` instead of `set` for the respective filetypes. - -#### I run into errors like `module 'nvim-treesitter.configs' not found` at startup - -This is because of `rtp` management in `nvim`, adding `packadd -nvim-treesitter` should fix the issue. - -#### I want to use Git instead of curl for downloading the parsers - -In your Lua config: - -```lua -require("nvim-treesitter.install").prefer_git = true -``` - -#### I want to use a HTTP proxy for downloading the parsers - -You can either configure curl to use additional CLI arguments in your Lua config: - -```lua -require("nvim-treesitter.install").command_extra_args = { - curl = { "--proxy", "" }, -} -``` - -or you can configure git via `.gitconfig` and use git instead of curl - -```lua -require("nvim-treesitter.install").prefer_git = true -``` - -#### I want to use a mirror instead of "https://github.com/" - -In your Lua config: - -```lua -for _, config in pairs(require("nvim-treesitter.parsers").get_parser_configs()) do - config.install_info.url = config.install_info.url:gsub("https://github.com/", "something else") -end - -require'nvim-treesitter.configs'.setup { - -- - -- -} -``` - -#### Using an existing parser for another filetype - -For example, to use the `bash` tree-sitter to highlight file with -`filetype=apkbuild`, use: - -```lua -vim.treesitter.language.register("bash", "apkbuild") -``` - -The `bash` tree-sitter must be installed following the usual procedure [as -described above](#language-parsers). diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/assets/logo.png b/nvim/.config/nvim/vendor/nvim-treesitter/assets/logo.png deleted file mode 100644 index a60e536..0000000 Binary files a/nvim/.config/nvim/vendor/nvim-treesitter/assets/logo.png and /dev/null differ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/autoload/nvim_treesitter.vim b/nvim/.config/nvim/vendor/nvim-treesitter/autoload/nvim_treesitter.vim deleted file mode 100644 index 9095398..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/autoload/nvim_treesitter.vim +++ /dev/null @@ -1,27 +0,0 @@ -function! nvim_treesitter#statusline(...) abort - return luaeval("require'nvim-treesitter.statusline'.statusline(_A)", get(a:, 1, {})) -endfunction - -function! nvim_treesitter#foldexpr() abort - return luaeval(printf('require"nvim-treesitter.fold".get_fold_indic(%d)', v:lnum)) -endfunction - -function! nvim_treesitter#installable_parsers(arglead, cmdline, cursorpos) abort - return join(luaeval("require'nvim-treesitter.parsers'.available_parsers()") + ['all'], "\n") -endfunction - -function! nvim_treesitter#installed_parsers(arglead, cmdline, cursorpos) abort - return join(luaeval("require'nvim-treesitter.info'.installed_parsers()") + ['all'], "\n") -endfunction - -function! nvim_treesitter#available_modules(arglead, cmdline, cursorpos) abort - return join(luaeval("require'nvim-treesitter.configs'.available_modules()"), "\n") -endfunction - -function! nvim_treesitter#available_query_groups(arglead, cmdline, cursorpos) abort - return join(luaeval("require'nvim-treesitter.query'.available_query_groups()"), "\n") -endfunction - -function! nvim_treesitter#indent() abort - return luaeval(printf('require"nvim-treesitter.indent".get_indent(%d)', v:lnum)) -endfunction diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/contrib/nvim-treesitter-luarocks.template b/nvim/.config/nvim/vendor/nvim-treesitter/contrib/nvim-treesitter-luarocks.template deleted file mode 100644 index 8109f5f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/contrib/nvim-treesitter-luarocks.template +++ /dev/null @@ -1,41 +0,0 @@ -local git_ref = '$git_ref' -local modrev = '$modrev' -local specrev = '-1' - -local repo_url = '$repo_url' - -rockspec_format = '3.0' -package = '$package' -version = modrev .. specrev - -description = { - summary = 'Nvim Treesitter configurations and abstraction layer', - detailed = $detailed_description, - labels = { 'neovim' }, - homepage = 'https://github.com/nvim-treesitter/nvim-treesitter', - license = 'Apache-2.0', -} - -dependencies = { - 'lua >= 5.1', -} - --- source = file:///. - -source = { - url = repo_url .. '/archive/' .. git_ref .. '.zip', - dir = '$repo_name-' .. '$archive_dir_suffix', -} - -build = { - type = 'make', - build_pass = false, - install_variables = { - INST_PREFIX='$(PREFIX)', - INST_BINDIR='$(BINDIR)', - INST_LIBDIR='$(LIBDIR)', - INST_LUADIR='$(LUADIR)', - INST_CONFDIR='$(CONFDIR)', - }, - copy_directories = $copy_directories, -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/contrib/nvim-treesitter-scm-1.rockspec b/nvim/.config/nvim/vendor/nvim-treesitter/contrib/nvim-treesitter-scm-1.rockspec deleted file mode 100644 index a901c5b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/contrib/nvim-treesitter-scm-1.rockspec +++ /dev/null @@ -1,36 +0,0 @@ -local MODREV, SPECREV = 'scm', '-1' -rockspec_format = '3.0' -package = 'nvim-treesitter' -version = MODREV .. SPECREV - -description = { - summary = 'Nvim Treesitter configurations and abstraction layer', - labels = { 'neovim' }, - homepage = 'https://github.com/nvim-treesitter/nvim-treesitter', - license = 'Apache-2.0', -} - -dependencies = { - 'lua >= 5.1', -} - -source = { - url = 'git://github.com/nvim-treesitter/nvim-treesitter', -} - -build = { - type = 'make', - install_variables = { - INST_PREFIX='$(PREFIX)', - INST_BINDIR='$(BINDIR)', - INST_LIBDIR='$(LIBDIR)', - INST_LUADIR='$(LUADIR)', - INST_CONFDIR='$(CONFDIR)', - }, - copy_directories = { - 'autoload', - 'doc', - 'plugin', - 'queries' - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/doc/nvim-treesitter.txt b/nvim/.config/nvim/vendor/nvim-treesitter/doc/nvim-treesitter.txt deleted file mode 100644 index f7a91b8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/doc/nvim-treesitter.txt +++ /dev/null @@ -1,590 +0,0 @@ -*nvim-treesitter* Treesitter configurations and abstraction layer for Neovim. - -Minimum version of neovim: nightly - -Authors: - Kiyan Yazdani - Thomas Vigouroux - Stephan Seitz - Steven Sojka - Santos Gallegos - https://github.com/nvim-treesitter/nvim-treesitter/graphs/contributors - - Type |gO| to see the table of contents. - -============================================================================== -INTRODUCTION *nvim-treesitter-intro* - -nvim-treesitter wraps the Neovim treesitter API to provide functionalities -such as highlighting and incremental selection, and a command to easily -install parsers. - -============================================================================== -QUICK START *nvim-treesitter-quickstart* - -Install the parser for your language - -> - :TSInstall {language} -< - -To get a list of supported languages - -> - :TSInstallInfo -< - -By default, everything is disabled. -To enable supported features, put this in your `init.lua` file: - -> - require'nvim-treesitter.configs'.setup { - -- A directory to install the parsers into. - -- If this is excluded or nil parsers are installed - -- to either the package dir, or the "site" dir. - -- If a custom path is used (not nil) it must be added to the runtimepath. - parser_install_dir = "/some/path/to/store/parsers", - - -- A list of parser names, or "all" - ensure_installed = { "c", "lua", "rust" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - auto_install = false, - - -- List of parsers to ignore installing (for "all") - ignore_install = { "javascript" }, - - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- list of language that will be disabled - disable = { "c", "rust" }, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - } - vim.opt.runtimepath:append("/some/path/to/store/parsers") -< - -See |nvim-treesitter-modules| for a list of all available modules and its options. - -============================================================================== -MODULES *nvim-treesitter-modules* - -|nvim-treesitter| provides several functionalities via modules (and submodules), -each module makes use of the query files defined for each language, - -All modules are disabled by default, and some provide default keymaps. -Each module corresponds to an entry in the dictionary passed to the -`nvim-treesitter.configs.setup` function, this should be in your `init.lua` file. - -> - require'nvim-treesitter.configs'.setup { - -- Modules and its options go here - highlight = { enable = true }, - incremental_selection = { enable = true }, - textobjects = { enable = true }, - } -< - -All modules share some common options, like `enable` and `disable`. -When `enable` is `true` this will enable the module for all supported languages, -if you want to disable the module for some languages you can pass a list to the `disable` option. - -> - require'nvim-treesitter.configs'.setup { - highlight = { - enable = true, - disable = { "cpp", "lua" }, - }, - } -< - -For more fine-grained control, `disable` can also take a function and -whenever it returns `true`, the module is disabled for that buffer. -The function is called once when a module starts in a buffer and receives the -language and buffer number as arguments: - -> - require'nvim-treesitter.configs'.setup { - highlight = { - enable = true, - disable = function(lang, bufnr) -- Disable in large C++ buffers - return lang == "cpp" and vim.api.nvim_buf_line_count(bufnr) > 50000 - end, - }, - } -< - -Options that define or accept a keymap use the same format you use to define -keymaps in Neovim, so you can write keymaps as `gd`, `a`, `a` -`` (control + a), `` (alt + n), `` (enter), etc. - -External plugins can provide their own modules with their own options, -those can also be configured using the `nvim-treesitter.configs.setup` -function. - ------------------------------------------------------------------------------- -HIGHLIGHT *nvim-treesitter-highlight-mod* - -Consistent syntax highlighting. - -Query files: `highlights.scm`. -Supported options: - -- enable: `true` or `false`. -- disable: list of languages. -- additional_vim_regex_highlighting: `true` or `false`, or a list of languages. - Set this to `true` if you depend on 'syntax' being enabled - (like for indentation). Using this option may slow down your editor, - and you may see some duplicate highlights. - Defaults to `false`. - -> - require'nvim-treesitter.configs'.setup { - highlight = { - enable = true, - custom_captures = { - -- Highlight the @foo.bar capture group with the "Identifier" highlight group. - ["foo.bar"] = "Identifier", - }, - -- Setting this to true or a list of languages will run `:h syntax` and tree-sitter at the same time. - additional_vim_regex_highlighting = false, - }, - } -< - -You can also set custom highlight captures -> - lua < - require'nvim-treesitter.configs'.setup { - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, - } -< - ------------------------------------------------------------------------------- -INDENTATION *nvim-treesitter-indentation-mod* - -Indentation based on treesitter for the |=| operator. -NOTE: this is an experimental feature. - -Query files: `indents.scm`. -Supported options: -- enable: `true` or `false`. -- disable: list of languages. -> - require'nvim-treesitter.configs'.setup { - indent = { - enable = true - }, - } - -`@indent` *nvim-treesitter-indentation-queries* -Queries can use the following captures: `@indent.begin` and `@indent.dedent`, -`@indent.branch`, `@indent.end` or `@indent.align`. An `@indent.ignore` capture tells -treesitter to ignore indentation and a `@indent.zero` capture sets -the indentation to 0. - -`@indent.begin` *nvim-treesitter-indentation-indent.begin* -The `@indent.begin` specifies that the next line should be indented. Multiple -indents on the same line get collapsed. Eg. - -> - ( - (if_statement) - (ERROR "else") @indent.begin - ) -< -Indent can also have `indent.immediate` set using a `#set!` directive, which -permits the next line to indent even when the block intended to be indented -has no content yet, improving interactive typing. - -eg for python: -> - ((if_statement) @indent.begin - (#set! indent.immediate 1)) -< - -Will allow: -> - if True: - # Auto indent to here - -`@indent.end` *nvim-treesitter-indentation-indent.end* -An `@indent.end` capture is used to specify that the indented region ends and -any text subsequent to the capture should be dedented. - -`@indent.branch` *nvim-treesitter-indentation-indent.branch* -An `@indent.branch` capture is used to specify that a dedented region starts -at the line including the captured nodes. - -`@indent.dedent` *nvim-treesitter-indentation-indent.dedent* -A `@indent.dedent` capture specifies dedenting starting on the next line. -> -`@indent.align` *nvim-treesitter-indentation-aligned_indent.align* -Aligned indent blocks may be specified with the `@indent.align` capture. -This permits - -> - foo(a, - b, - c) -< -As well as -> - foo( - a, - b, - c) -< -and finally -> - foo( - a, - b, - c - ) -< -To specify the delimiters to use `indent.open_delimiter` and -`indent.close_delimiter` should be used. Eg. -> - ((argument_list) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")")) -< - -For some languages the last line of an `indent.align` block must not be -the same indent as the natural next line. - -For example in python: - -> - if (a > b and - c < d): - pass - -Is not correct, whereas -> - if (a > b and - c < d): - pass - -Would be correctly indented. This behavior may be chosen using -`indent.avoid_last_matching_next`. Eg. - -> - (if_statement - condition: (parenthesized_expression) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")") - (#set! indent.avoid_last_matching_next 1) - ) -< -Could be used to specify that the last line of an `@indent.align` capture -should be additionally indented to avoid clashing with the indent of the first -line of the block inside an if. - -============================================================================== -COMMANDS *nvim-treesitter-commands* - - *:TSInstall* -:TSInstall {language} ...~ - -Install one or more treesitter parsers. -You can use |:TSInstall| `all` to install all parsers. Use |:TSInstall!| to -force the reinstallation of already installed parsers. - *:TSInstallSync* -:TSInstallSync {language} ...~ - -Perform the |:TSInstall| operation synchronously. - - *:TSInstallInfo* -:TSInstallInfo~ - -List information about currently installed parsers - - *:TSUpdate* -:TSUpdate {language} ...~ - -Update the installed parser for one more {language} or all installed parsers -if {language} is omitted. The specified parser is installed if it is not already -installed. - - *:TSUpdateSync* -:TSUpdateSync {language} ...~ - -Perform the |:TSUpdate| operation synchronously. - - *:TSUninstall* -:TSUninstall {language} ...~ - -Deletes the parser for one or more {language}. You can use 'all' for language -to uninstall all parsers. - - *:TSBufEnable* -:TSBufEnable {module}~ - -Enable {module} on the current buffer. -A list of modules can be found at |:TSModuleInfo| - - *:TSBufDisable* -:TSBufDisable {module}~ - -Disable {module} on the current buffer. -A list of modules can be found at |:TSModuleInfo| - - *:TSBufToggle* -:TSBufToggle {module}~ - -Toggle (enable if disabled, disable if enabled) {module} on the current -buffer. -A list of modules can be found at |:TSModuleInfo| - - *:TSEnable* -:TSEnable {module} [{language}]~ - -Enable {module} for the session. -If {language} is specified, enable module for the session only for this -particular language. -A list of modules can be found at |:TSModuleInfo| -A list of languages can be found at |:TSInstallInfo| - - *:TSDisable* -:TSDisable {module} [{language}]~ - -Disable {module} for the session. -If {language} is specified, disable module for the session only for this -particular language. -A list of modules can be found at |:TSModuleInfo| -A list of languages can be found at |:TSInstallInfo| - - *:TSToggle* -:TSToggle {module} [{language}]~ - -Toggle (enable if disabled, disable if enabled) {module} for the session. -If {language} is specified, toggle module for the session only for this -particular language. -A list of modules can be found at |:TSModuleInfo| -A list of languages can be found at |:TSInstallInfo| - - *:TSModuleInfo* -:TSModuleInfo [{module}]~ - -List the state for the given module or all modules for the current session in -a new buffer. - -These highlight groups are used by default: -> - highlight default TSModuleInfoGood guifg=LightGreen gui=bold - highlight default TSModuleInfoBad guifg=Crimson - highlight default link TSModuleInfoHeader Type - highlight default link TSModuleInfoNamespace Statement - highlight default link TSModuleInfoParser Identifier -< - - *:TSEditQuery* -:TSEditQuery {query-group} [{lang}]~ - -Edit the query file for a {query-group} (e.g. highlights, locals) for given -{lang}. If there are multiple files, the user is prompted to select one of them. -If no such file exists, a buffer for a new file in the user's config directory -is created. If {lang} is not specified, the language of the current buffer -is used. - - *:TSEditQueryUserAfter* -:TSEditQueryUserAfter {query-group} [{lang}]~ - -Same as |:TSEditQuery| but edits a file in the `after` directory of the -user's config directory. Useful to add custom extensions for the queries -provided by a plugin. - -============================================================================== -UTILS *nvim-treesitter-utils* - -Nvim treesitter has some wrapper functions that you can retrieve with: -> - local ts_utils = require 'nvim-treesitter.ts_utils' -< -Methods - *ts_utils.get_node_at_cursor* -get_node_at_cursor(winnr)~ - -`winnr` will be 0 if nil. -Returns the node under the cursor. - - *ts_utils.is_parent* -is_parent(dest, source)~ - -Determines whether `dest` is a parent of `source`. -Returns a boolean. - - *ts_utils.get_named_children* -get_named_children(node)~ - -Returns a table of named children of `node`. - - *ts_utils.get_next_node* -get_next_node(node, allow_switch_parent, allow_next_parent)~ - -Returns the next node within the same parent. -If no node is found, returns `nil`. -If `allow_switch_parent` is true, it will allow switching parent -when the node is the last node. -If `allow_next_parent` is true, it will allow next parent if -the node is the last node and the next parent doesn't have children. - - *ts_utils.get_previous_node* -get_previous_node(node, allow_switch_parents, allow_prev_parent)~ - -Returns the previous node within the same parent. -`allow_switch_parent` and `allow_prev_parent` follow the same rule -as |ts_utils.get_next_node| but if the node is the first node. - - *ts_utils.goto_node* -goto_node(node, goto_end, avoid_set_jump)~ - -Sets cursor to the position of `node` in the current windows. -If `goto_end` is truthy, the cursor is set to the end the node range. -Setting `avoid_set_jump` to `true`, avoids setting the current cursor position -to the jump list. - - *ts_utils.swap_nodes* -swap_nodes(node_or_range1, node_or_range2, bufnr, cursor_to_second)~ - -Swaps the nodes or ranges. -set `cursor_to_second` to true to move the cursor to the second node - - *ts_utils.memoize_by_buf_tick* -memoize_by_buf_tick(fn, options)~ - -Caches the return value for a function and returns the cache value if the tick -of the buffer has not changed from the previous. - - `fn`: a function that takes any arguments - and returns a value to store. - `options?`: - - `bufnr`: a function/value that extracts the bufnr from the given arguments. - - `key`: a function/value that extracts the cache key from the given arguments. - `returns`: a function to call with bufnr as argument to - retrieve the value from the cache - - *ts_utils.node_to_lsp_range* -node_to_lsp_range(node)~ - -Get an lsp formatted range from a node range - - *ts_utils.node_length* -node_length(node)~ - -Get the byte length of node range - - *ts_utils.update_selection* -update_selection(buf, node)~ - -Set the selection to the node range - - *ts_utils.highlight_range* -highlight_range(range, buf, hl_namespace, hl_group)~ - -Set a highlight that spans the given range - - *ts_utils.highlight_node* -highlight_node(node, buf, hl_namespace, hl_group)~ - -Set a highlight that spans the given node's range - -============================================================================== -FUNCTIONS *nvim-treesitter-functions* - - *nvim_treesitter#statusline()* -nvim_treesitter#statusline(opts)~ - -Returns a string describing the current position in the file. This -could be used as a statusline indicator. -Default options (lua syntax): -> - { - indicator_size = 100, - type_patterns = {'class', 'function', 'method'}, - transform_fn = function(line, _node) return line:gsub('%s*[%[%(%{]*%s*$', '') end, - separator = ' -> ', - allow_duplicates = false - } -< -- `indicator_size` - How long should the string be. If longer, it is cut from - the beginning. -- `type_patterns` - Which node type patterns to match. -- `transform_fn` - Function used to transform the single item in line. By - default it removes opening brackets and spaces from end. Takes two arguments: - the text of the line in question, and the corresponding treesitter node. -- `separator` - Separator between nodes. -- `allow_duplicates` - Whether or not to remove duplicate components. - - *nvim_treesitter#foldexpr()* -nvim_treesitter#foldexpr()~ - -Functions to be used to determine the fold level at a given line number. -To use it: > - set foldmethod=expr - set foldexpr=nvim_treesitter#foldexpr() -< - -This will respect your 'foldminlines' and 'foldnestmax' settings. - -Note: This is highly experimental, and folding can break on some types of - edits. If you encounter such breakage, hitting `zx` should fix folding. - In any case, feel free to open an issue with the reproducing steps. - -============================================================================== -PERFORMANCE *nvim-treesitter-performance* - -`nvim-treesitter` checks the 'runtimepath' on startup in order to discover -available parsers and queries and index them. As a consequence, a very long -'runtimepath' might result in delayed startup times. - - -vim:tw=78:ts=8:expandtab:noet:ft=help:norl: diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/doc/tags b/nvim/.config/nvim/vendor/nvim-treesitter/doc/tags deleted file mode 100644 index 813e79d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/doc/tags +++ /dev/null @@ -1,47 +0,0 @@ -:TSBufDisable nvim-treesitter.txt /*:TSBufDisable* -:TSBufEnable nvim-treesitter.txt /*:TSBufEnable* -:TSBufToggle nvim-treesitter.txt /*:TSBufToggle* -:TSDisable nvim-treesitter.txt /*:TSDisable* -:TSEditQuery nvim-treesitter.txt /*:TSEditQuery* -:TSEditQueryUserAfter nvim-treesitter.txt /*:TSEditQueryUserAfter* -:TSEnable nvim-treesitter.txt /*:TSEnable* -:TSInstall nvim-treesitter.txt /*:TSInstall* -:TSInstallInfo nvim-treesitter.txt /*:TSInstallInfo* -:TSInstallSync nvim-treesitter.txt /*:TSInstallSync* -:TSModuleInfo nvim-treesitter.txt /*:TSModuleInfo* -:TSToggle nvim-treesitter.txt /*:TSToggle* -:TSUninstall nvim-treesitter.txt /*:TSUninstall* -:TSUpdate nvim-treesitter.txt /*:TSUpdate* -:TSUpdateSync nvim-treesitter.txt /*:TSUpdateSync* -nvim-treesitter nvim-treesitter.txt /*nvim-treesitter* -nvim-treesitter-commands nvim-treesitter.txt /*nvim-treesitter-commands* -nvim-treesitter-functions nvim-treesitter.txt /*nvim-treesitter-functions* -nvim-treesitter-highlight-mod nvim-treesitter.txt /*nvim-treesitter-highlight-mod* -nvim-treesitter-incremental-selection-mod nvim-treesitter.txt /*nvim-treesitter-incremental-selection-mod* -nvim-treesitter-indentation-aligned_indent.align nvim-treesitter.txt /*nvim-treesitter-indentation-aligned_indent.align* -nvim-treesitter-indentation-indent.begin nvim-treesitter.txt /*nvim-treesitter-indentation-indent.begin* -nvim-treesitter-indentation-indent.branch nvim-treesitter.txt /*nvim-treesitter-indentation-indent.branch* -nvim-treesitter-indentation-indent.dedent nvim-treesitter.txt /*nvim-treesitter-indentation-indent.dedent* -nvim-treesitter-indentation-indent.end nvim-treesitter.txt /*nvim-treesitter-indentation-indent.end* -nvim-treesitter-indentation-mod nvim-treesitter.txt /*nvim-treesitter-indentation-mod* -nvim-treesitter-indentation-queries nvim-treesitter.txt /*nvim-treesitter-indentation-queries* -nvim-treesitter-intro nvim-treesitter.txt /*nvim-treesitter-intro* -nvim-treesitter-modules nvim-treesitter.txt /*nvim-treesitter-modules* -nvim-treesitter-performance nvim-treesitter.txt /*nvim-treesitter-performance* -nvim-treesitter-quickstart nvim-treesitter.txt /*nvim-treesitter-quickstart* -nvim-treesitter-utils nvim-treesitter.txt /*nvim-treesitter-utils* -nvim_treesitter#foldexpr() nvim-treesitter.txt /*nvim_treesitter#foldexpr()* -nvim_treesitter#statusline() nvim-treesitter.txt /*nvim_treesitter#statusline()* -ts_utils.get_named_children nvim-treesitter.txt /*ts_utils.get_named_children* -ts_utils.get_next_node nvim-treesitter.txt /*ts_utils.get_next_node* -ts_utils.get_node_at_cursor nvim-treesitter.txt /*ts_utils.get_node_at_cursor* -ts_utils.get_previous_node nvim-treesitter.txt /*ts_utils.get_previous_node* -ts_utils.goto_node nvim-treesitter.txt /*ts_utils.goto_node* -ts_utils.highlight_node nvim-treesitter.txt /*ts_utils.highlight_node* -ts_utils.highlight_range nvim-treesitter.txt /*ts_utils.highlight_range* -ts_utils.is_parent nvim-treesitter.txt /*ts_utils.is_parent* -ts_utils.memoize_by_buf_tick nvim-treesitter.txt /*ts_utils.memoize_by_buf_tick* -ts_utils.node_length nvim-treesitter.txt /*ts_utils.node_length* -ts_utils.node_to_lsp_range nvim-treesitter.txt /*ts_utils.node_to_lsp_range* -ts_utils.swap_nodes nvim-treesitter.txt /*ts_utils.swap_nodes* -ts_utils.update_selection nvim-treesitter.txt /*ts_utils.update_selection* diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lockfile.json b/nvim/.config/nvim/vendor/nvim-treesitter/lockfile.json deleted file mode 100644 index 3f87966..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lockfile.json +++ /dev/null @@ -1,959 +0,0 @@ -{ - "ada": { - "revision": "e8e2515465cc2d7c444498e68bdb9f1d86767f95" - }, - "agda": { - "revision": "b9b32fa042c2952a7bfca86847ea325e44ccc897" - }, - "angular": { - "revision": "843525141575e397541e119698f0532755e959f6" - }, - "apex": { - "revision": "3597575a429766dd7ecce9f5bb97f6fec4419d5d" - }, - "arduino": { - "revision": "017696bdf47ca2b10948c5a511f9ab387722d0f3" - }, - "asm": { - "revision": "04962e15f6b464cf1d75eada59506dc25090e186" - }, - "astro": { - "revision": "0ad33e32ae9726e151d16ca20ba3e507ff65e01f" - }, - "authzed": { - "revision": "1dec7e1af96c56924e3322cd85fdce15d0a31d00" - }, - "awk": { - "revision": "34bbdc7cce8e803096f47b625979e34c1be38127" - }, - "bash": { - "revision": "0c46d792d54c536be5ff7eb18eb95c70fccdb232" - }, - "bass": { - "revision": "28dc7059722be090d04cd751aed915b2fee2f89a" - }, - "beancount": { - "revision": "9bc460a05b5f096d69568b5fb36105032ff4ff97" - }, - "bibtex": { - "revision": "ccfd77db0ed799b6c22c214fe9d2937f47bc8b34" - }, - "bicep": { - "revision": "bff59884307c0ab009bd5e81afd9324b46a6c0f9" - }, - "bitbake": { - "revision": "a5d04fdb5a69a02b8fa8eb5525a60dfb5309b73b" - }, - "blade": { - "revision": "bcdc4b01827cac21205f7453e9be02f906943128" - }, - "blueprint": { - "revision": "60ba73739c6083c693d86a1a7cf039c07eb4ed59" - }, - "bp": { - "revision": "16c43068ec30828c5aed11e87262c56f36782595" - }, - "brightscript": { - "revision": "48ce1687125c6dfefcc7a1bef19fa0f0f00426cc" - }, - "c": { - "revision": "2a265d69a4caf57108a73ad2ed1e6922dd2f998c" - }, - "c_sharp": { - "revision": "b5eb5742f6a7e9438bee22ce8026d6b927be2cd7" - }, - "caddy": { - "revision": "2686186edb61be47960431c93a204fb249681360" - }, - "cairo": { - "revision": "6238f609bea233040fe927858156dee5515a0745" - }, - "capnp": { - "revision": "7b0883c03e5edd34ef7bcf703194204299d7099f" - }, - "chatito": { - "revision": "b4cbe9ab7672d5106e9550d8413835395a1be362" - }, - "circom": { - "revision": "02150524228b1e6afef96949f2d6b7cc0aaf999e" - }, - "clojure": { - "revision": "f4236d4da8aa92bc105d9c118746474c608e6af7" - }, - "cmake": { - "revision": "fe48221d4d9842d916d66b5e71ab3c6307ec28b3" - }, - "comment": { - "revision": "3555706cef8b98d3e4c7379d7260548ff03ad363" - }, - "commonlisp": { - "revision": "32323509b3d9fe96607d151c2da2c9009eb13a2f" - }, - "cooklang": { - "revision": "4ebe237c1cf64cf3826fc249e9ec0988fe07e58e" - }, - "corn": { - "revision": "464654742cbfd3a3de560aba120998f1d5dfa844" - }, - "cpon": { - "revision": "594289eadfec719198e560f9d7fd243c4db678d5" - }, - "cpp": { - "revision": "e5cea0ec884c5c3d2d1e41a741a66ce13da4d945" - }, - "css": { - "revision": "6e327db434fec0ee90f006697782e43ec855adf5" - }, - "csv": { - "revision": "7eb7297823605392d2bbcc4c09b1cd18d6fa9529" - }, - "cuda": { - "revision": "014628ae8d2df391b88ddb9fa0260fd97f770829" - }, - "cue": { - "revision": "770737bcff2c4aa3f624d439e32b07dbb07102d3" - }, - "cylc": { - "revision": "8b895c278f98d05e67997f5e3a43fb5531933023" - }, - "d": { - "revision": "45e5f1e9d6de2c68591bc8e5ec662cf18e950b4a" - }, - "dart": { - "revision": "80e23c07b64494f7e21090bb3450223ef0b192f4" - }, - "desktop": { - "revision": "6d66eea37afa1d6bc1e25ef457113743df42416d" - }, - "devicetree": { - "revision": "16f640f3c59117c9e749d581634afdb00e004f4c" - }, - "dhall": { - "revision": "4a6c08abfb54827db4e722d6cdca81b093898988" - }, - "diff": { - "revision": "e42b8def4f75633568f1aecfe01817bf15164928" - }, - "disassembly": { - "revision": "0229c0211dba909c5d45129ac784a3f4d49c243a" - }, - "djot": { - "revision": "eb31845d59b9ee8c1b2098e78e9ca72004bd1579" - }, - "dockerfile": { - "revision": "971acdd908568b4531b0ba28a445bf0bb720aba5" - }, - "dot": { - "revision": "9ab85550c896d8b294d9b9ca1e30698736f08cea" - }, - "doxygen": { - "revision": "ccd998f378c3f9345ea4eeb223f56d7b84d16687" - }, - "dtd": { - "revision": "0d9a8099c963ed53e183425c1b47fa2622c8eaf7" - }, - "earthfile": { - "revision": "ae378d9d1306e9a967698516041f6f8803db5592" - }, - "ebnf": { - "revision": "8e635b0b723c620774dfb8abf382a7f531894b40" - }, - "editorconfig": { - "revision": "3f2b371537355f6e53cc3af37f79ba450efb5132" - }, - "eds": { - "revision": "26d529e6cfecde391a03c21d1474eb51e0285805" - }, - "eex": { - "revision": "f742f2fe327463335e8671a87c0b9b396905d1d1" - }, - "elixir": { - "revision": "450a8194f5a66561135962cfc8d7545a27b61c4c" - }, - "elm": { - "revision": "e34bdc5c512918628b05b48e633f711123204e45" - }, - "elsa": { - "revision": "0a66b2b3f3c1915e67ad2ef9f7dbd2a84820d9d7" - }, - "elvish": { - "revision": "5e7210d945425b77f82cbaebc5af4dd3e1ad40f5" - }, - "embedded_template": { - "revision": "8495d106154741e6d35d37064f864758ece75de6" - }, - "enforce": { - "revision": "aedd0bbab9dcc9caec9cc4e32bd303e86509522b" - }, - "erlang": { - "revision": "416ca60d7d2a824c0d346163541153e230710780" - }, - "facility": { - "revision": "e4bfd3e960de9f4b4648acb1c92e9b95b47d8cfb" - }, - "faust": { - "revision": "f3b9274514b5f9bf6b0dd4a01c30f9cc15c58bc4" - }, - "fennel": { - "revision": "cfbfa478dc2dbef267ee94ae4323d9c886f45e94" - }, - "fidl": { - "revision": "0a8910f293268e27ff554357c229ba172b0eaed2" - }, - "firrtl": { - "revision": "8503d3a0fe0f9e427863cb0055699ff2d29ae5f5" - }, - "fish": { - "revision": "70640c0696abde32622afc43291a385681afbd32" - }, - "foam": { - "revision": "f08bb76892b93e5b23c45ac3bd6b1eea5df323cc" - }, - "forth": { - "revision": "90189238385cf636b9ee99ce548b9e5b5e569d48" - }, - "fortran": { - "revision": "d738334e4a21866a1ab81fb3f27f9b0b2ad2e515" - }, - "fsh": { - "revision": "fad2e175099a45efbc98f000cc196d3674cc45e0" - }, - "fsharp": { - "revision": "02929f084726db969e5b916d144436f248146824" - }, - "func": { - "revision": "f780ca55e65e7d7360d0229331763e16c452fc98" - }, - "fusion": { - "revision": "19db2f47ba4c3a0f6238d4ae0e2abfca16e61dd6" - }, - "gap": { - "revision": "7db79590d2f8b0e0246008ecfd569b4bfca587a9" - }, - "gaptst": { - "revision": "69086d7627c03e1f4baf766bcef14c60d9e92331" - }, - "gdscript": { - "revision": "48b49330888a4669b48619b211cc8da573827725" - }, - "gdshader": { - "revision": "ffd9f958df13cae04593781d7d2562295a872455" - }, - "git_config": { - "revision": "9c2a1b7894e6d9eedfe99805b829b4ecd871375e" - }, - "git_rebase": { - "revision": "bff4b66b44b020d918d67e2828eada1974a966aa" - }, - "gitattributes": { - "revision": "5425944fd61bf2b3bad2c17c2dc9f53172b0f01d" - }, - "gitcommit": { - "revision": "a716678c0f00645fed1e6f1d0eb221481dbd6f6d" - }, - "gitignore": { - "revision": "f4685bf11ac466dd278449bcfe5fd014e94aa504" - }, - "gleam": { - "revision": "99ec4101504452c488b7c835fb65cfef75b090b7" - }, - "glimmer": { - "revision": "da605af8c5999b43e6839b575eae5e6cafabb06f" - }, - "glimmer_javascript": { - "revision": "5cc865a2a0a77cbfaf5062c8fcf2a9919bd54f87" - }, - "glimmer_typescript": { - "revision": "12d98944c1d5077b957cbdb90d663a7c4d50118c" - }, - "glsl": { - "revision": "24a6c8ef698e4480fecf8340d771fbcb5de8fbb4" - }, - "gn": { - "revision": "bc06955bc1e3c9ff8e9b2b2a55b38b94da923c05" - }, - "gnuplot": { - "revision": "8923c1e38b9634a688a6c0dce7c18c8ffb823e79" - }, - "go": { - "revision": "5e73f476efafe5c768eda19bbe877f188ded6144" - }, - "goctl": { - "revision": "49c43532689fe1f53e8b9e009d0521cab02c432b" - }, - "godot_resource": { - "revision": "91c55fdf325a832659e59cdf4a02bfe8a423f14c" - }, - "gomod": { - "revision": "6efb59652d30e0e9cd5f3b3a669afd6f1a926d3c" - }, - "gosum": { - "revision": "e2ac513b2240c7ff1069ae33b2df29ce90777c11" - }, - "gotmpl": { - "revision": "5f19a36bb1eebb30454e277b222b278ceafed0dd" - }, - "gowork": { - "revision": "949a8a470559543857a62102c84700d291fc984c" - }, - "gpg": { - "revision": "63e80cfe1302da9f9c7ee8d9df295f47d7d181bf" - }, - "graphql": { - "revision": "5e66e961eee421786bdda8495ed1db045e06b5fe" - }, - "gren": { - "revision": "06389ece5bc7344ed3931dc516bb609d8864dd2a" - }, - "groovy": { - "revision": "86911590a8e46d71301c66468e5620d9faa5b6af" - }, - "gstlaunch": { - "revision": "549aef253fd38a53995cda1bf55c501174372bf7" - }, - "hack": { - "revision": "bc5b3a10d6d27e8220a113a9a7fe9bec0a1574b0" - }, - "hare": { - "revision": "4af5d82cf9ec39f67cb1db5b7a9269d337406592" - }, - "haskell": { - "revision": "0975ef72fc3c47b530309ca93937d7d143523628" - }, - "haskell_persistent": { - "revision": "577259b4068b2c281c9ebf94c109bd50a74d5857" - }, - "hcl": { - "revision": "de10d494dbd6b71cdf07a678fecbf404dbfe4398" - }, - "heex": { - "revision": "008626a3fad379d17c81d5ed576edd9bd7a4fbf7" - }, - "helm": { - "revision": "5f19a36bb1eebb30454e277b222b278ceafed0dd" - }, - "hjson": { - "revision": "02fa3b79b3ff9a296066da6277adfc3f26cbc9e0" - }, - "hlsl": { - "revision": "bab9111922d53d43668fabb61869bec51bbcb915" - }, - "hlsplaylist": { - "revision": "3bfda9271e3adb08d35f47a2102fe957009e1c55" - }, - "hocon": { - "revision": "c390f10519ae69fdb03b3e5764f5592fb6924bcc" - }, - "hoon": { - "revision": "1545137aadcc63660c47db9ad98d02fa602655d0" - }, - "html": { - "revision": "cbb91a0ff3621245e890d1c50cc811bffb77a26b" - }, - "htmldjango": { - "revision": "ea71012d3fe14dd0b69f36be4f96bdfe9155ebae" - }, - "http": { - "revision": "db8b4398de90b6d0b6c780aba96aaa2cd8e9202c" - }, - "hurl": { - "revision": "ff07a42d9ec95443b5c1b57ed793414bf7b79be5" - }, - "hyprlang": { - "revision": "d719158abe537b1916daaea6fa03287089f0b601" - }, - "idl": { - "revision": "b14e7971cfbd64fa0ebcdeaa4dfbb3cb0bfabd7c" - }, - "idris": { - "revision": "c56a25cf57c68ff929356db25505c1cc4c7820f6" - }, - "ini": { - "revision": "32b31863f222bf22eb43b07d4e9be8017e36fb31" - }, - "inko": { - "revision": "f58a87ac4dc6a7955c64c9e4408fbd693e804686" - }, - "ipkg": { - "revision": "8d3e9782f2d091d0cd39c13bfb3068db0c675960" - }, - "ispc": { - "revision": "9b2f9aec2106b94b4e099fe75e73ebd8ae707c04" - }, - "janet_simple": { - "revision": "b08b402207fba0037d5152ce7c521351147f4388" - }, - "java": { - "revision": "a7db5227ec40fcfe94489559d8c9bc7c8181e25a" - }, - "javadoc": { - "revision": "330cc9cb4f33545f7bfce6c3b6aa77fe6db1b537" - }, - "javascript": { - "revision": "6fbef40512dcd9f0a61ce03a4c9ae7597b36ab5c" - }, - "jinja": { - "revision": "9af6ce9380fabd3d5b19d0254b8c8936e879c471" - }, - "jinja_inline": { - "revision": "9af6ce9380fabd3d5b19d0254b8c8936e879c471" - }, - "jq": { - "revision": "13990f530e8e6709b7978503da9bc8701d366791" - }, - "jsdoc": { - "revision": "a417db5dbdd869fccb6a8b75ec04459e1d4ccd2c" - }, - "json": { - "revision": "46aa487b3ade14b7b05ef92507fdaa3915a662a3" - }, - "json5": { - "revision": "ab0ba8229d639ec4f3fa5f674c9133477f4b77bd" - }, - "jsonc": { - "revision": "02b01653c8a1c198ae7287d566efa86a135b30d5" - }, - "jsonnet": { - "revision": "ddd075f1939aed8147b7aa67f042eda3fce22790" - }, - "julia": { - "revision": "12a3aede757bc7fbdfb1909507c7a6fddd31df37" - }, - "just": { - "revision": "bb0c898a80644de438e6efe5d88d30bf092935cd" - }, - "kcl": { - "revision": "b0b2eb38009e04035a6e266c7e11e541f3caab7c" - }, - "kconfig": { - "revision": "9ac99fe4c0c27a35dc6f757cef534c646e944881" - }, - "kdl": { - "revision": "b37e3d58e5c5cf8d739b315d6114e02d42e66664" - }, - "kotlin": { - "revision": "c4ddea359a7ff4d92360b2efcd6cfce5dc25afe6" - }, - "koto": { - "revision": "46770abba021e2ddd2c51d9fa3087fd1ab6b2aea" - }, - "kusto": { - "revision": "8353a1296607d6ba33db7c7e312226e5fc83e8ce" - }, - "lalrpop": { - "revision": "8d38e9755c05d37df8a24dadb0fc64f6588ac188" - }, - "latex": { - "revision": "7b06f6ed394308e7407a1703d2724128c45fc9d7" - }, - "ledger": { - "revision": "d313153eef68c557ba4538b20de2d0e92f3ef6f8" - }, - "leo": { - "revision": "6bc5564917edacd070afc4d33cf5e2e677831ea9" - }, - "linkerscript": { - "revision": "f99011a3554213b654985a4b0a65b3b032ec4621" - }, - "liquid": { - "revision": "d269f4d52cd08f6cbc6636ee23cc30a9f6c32e42" - }, - "liquidsoap": { - "revision": "8e51fa63ddb93ac179d4e34a311d3d3f03780b42" - }, - "llvm": { - "revision": "c14cb839003348692158b845db9edda201374548" - }, - "lua": { - "revision": "db16e76558122e834ee214c8dc755b4a3edc82a9" - }, - "luadoc": { - "revision": "873612aadd3f684dd4e631bdf42ea8990c57634e" - }, - "luap": { - "revision": "c134aaec6acf4fa95fe4aa0dc9aba3eacdbbe55a" - }, - "luau": { - "revision": "a8914d6c1fc5131f8e1c13f769fa704c9f5eb02f" - }, - "m68k": { - "revision": "e128454c2210c0e0c10b68fe45ddb8fee80182a3" - }, - "make": { - "revision": "a4b9187417d6be349ee5fd4b6e77b4172c6827dd" - }, - "markdown": { - "revision": "413285231ce8fa8b11e7074bbe265b48aa7277f9" - }, - "markdown_inline": { - "revision": "413285231ce8fa8b11e7074bbe265b48aa7277f9" - }, - "matlab": { - "revision": "bbf1b3f0bd7417c1efb8958fe95be3d0d540207a" - }, - "menhir": { - "revision": "be8866a6bcc2b563ab0de895af69daeffa88fe70" - }, - "mermaid": { - "revision": "90ae195b31933ceb9d079abfa8a3ad0a36fee4cc" - }, - "meson": { - "revision": "a56af662e8540412fed5e40cc20435b2b9a20502" - }, - "mlir": { - "revision": "922cbb97f3d20044e6b4362b3d7af5e530ed8f34" - }, - "muttrc": { - "revision": "173b0ab53a9c07962c9777189c4c70e90f1c1837" - }, - "nasm": { - "revision": "d1b3638d017f2a8585e26dcfc66fe1df94185e30" - }, - "nginx": { - "revision": "989da760be05a3334af3ec88705cbf57e6a9c41d" - }, - "nickel": { - "revision": "25464b33522c3f609fa512aa9651707c0b66d48b" - }, - "nim": { - "revision": "897e5d346f0b59ed62b517cfb0f1a845ad8f0ab7" - }, - "nim_format_string": { - "revision": "d45f75022d147cda056e98bfba68222c9c8eca3a" - }, - "ninja": { - "revision": "0a95cfdc0745b6ae82f60d3a339b37f19b7b9267" - }, - "nix": { - "revision": "cfc53fd287d23ab7281440a8526c73542984669b" - }, - "norg": { - "revision": "d89d95af13d409f30a6c7676387bde311ec4a2c8" - }, - "nqc": { - "revision": "14e6da1627aaef21d2b2aa0c37d04269766dcc1d" - }, - "nu": { - "revision": "d5c71a10b4d1b02e38967b05f8de70e847448dd1" - }, - "objc": { - "revision": "181a81b8f23a2d593e7ab4259981f50122909fda" - }, - "objdump": { - "revision": "28d3b2e25a0b1881d1b47ed1924ca276c7003d45" - }, - "ocaml": { - "revision": "91708deb10cb4fe68ab3c50891426b9967dbf35a" - }, - "ocaml_interface": { - "revision": "91708deb10cb4fe68ab3c50891426b9967dbf35a" - }, - "ocamllex": { - "revision": "c5cf996c23e38a1537069fbe2d4bb83a75fc7b2f" - }, - "odin": { - "revision": "d2ca8efb4487e156a60d5bd6db2598b872629403" - }, - "pascal": { - "revision": "78426d96bde7114af979e314283e45d087603428" - }, - "passwd": { - "revision": "20239395eacdc2e0923a7e5683ad3605aee7b716" - }, - "pem": { - "revision": "1d16b8e063fdf4385e389096c4bc4999eaaef05f" - }, - "perl": { - "revision": "ecd90bd8b381bcc7219fed4fe351903630e761c6" - }, - "php": { - "revision": "576a56fa7f8b68c91524cdd211eb2ffc43e7bb11" - }, - "php_only": { - "revision": "576a56fa7f8b68c91524cdd211eb2ffc43e7bb11" - }, - "phpdoc": { - "revision": "fe3202e468bc17332bec8969f2b50ff1f1da3a46" - }, - "pioasm": { - "revision": "afece58efdb30440bddd151ef1347fa8d6f744a9" - }, - "po": { - "revision": "bd860a0f57f697162bf28e576674be9c1500db5e" - }, - "pod": { - "revision": "0bf8387987c21bf2f8ed41d2575a8f22b139687f" - }, - "poe_filter": { - "revision": "2902dc45439125b9386812c1089a8e9b5f71c4ab" - }, - "pony": { - "revision": "73ff874ae4c9e9b45462673cbc0a1e350e2522a7" - }, - "powershell": { - "revision": "66d5e61126989c0aca57ff77d19b2064919b51e1" - }, - "printf": { - "revision": "df6b69967db7d74ab338a86a9ab45c0966c5ee3c" - }, - "prisma": { - "revision": "73f39a6d5401cfdcd143951e499336cf5ab2ffaa" - }, - "problog": { - "revision": "d8d415f6a1cf80ca138524bcc395810b176d40fa" - }, - "prolog": { - "revision": "d8d415f6a1cf80ca138524bcc395810b176d40fa" - }, - "promql": { - "revision": "77625d78eebc3ffc44d114a07b2f348dff3061b0" - }, - "properties": { - "revision": "579b62f5ad8d96c2bb331f07d1408c92767531d9" - }, - "proto": { - "revision": "e9f6b43f6844bd2189b50a422d4e2094313f6aa3" - }, - "prql": { - "revision": "09e158cd3650581c0af4c49c2e5b10c4834c8646" - }, - "psv": { - "revision": "7eb7297823605392d2bbcc4c09b1cd18d6fa9529" - }, - "pug": { - "revision": "13e9195370172c86a8b88184cc358b23b677cc46" - }, - "puppet": { - "revision": "15f192929b7d317f5914de2b4accd37b349182a6" - }, - "purescript": { - "revision": "daf9b3e2be18b0b2996a1281f7783e0d041d8b80" - }, - "pymanifest": { - "revision": "be062582956165019d3253794b4d712f66dfeaaa" - }, - "python": { - "revision": "710796b8b877a970297106e5bbc8e2afa47f86ec" - }, - "ql": { - "revision": "1fd627a4e8bff8c24c11987474bd33112bead857" - }, - "qmldir": { - "revision": "6b2b5e41734bd6f07ea4c36ac20fb6f14061c841" - }, - "qmljs": { - "revision": "0889da4632bba3ec6f39ef4102625654890c15c1" - }, - "query": { - "revision": "930202c2a80965a7a9ca018b5b2a08b25dfa7f12" - }, - "r": { - "revision": "a0d3e3307489c3ca54da8c7b5b4e0c5f5fd6953a" - }, - "racket": { - "revision": "5b211bf93021d1c45f39aa96898be9f794f087e4" - }, - "ralph": { - "revision": "f6d81bf7a4599c77388035439cf5801cd461ff77" - }, - "rasi": { - "revision": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa" - }, - "razor": { - "revision": "fe46ce5ea7d844e53d59bc96f2175d33691c61c5" - }, - "rbs": { - "revision": "de893b166476205b09e79cd3689f95831269579a" - }, - "re2c": { - "revision": "c18a3c2f4b6665e35b7e50d6048ea3cff770c572" - }, - "readline": { - "revision": "74addc90fc539d31d413c0c7cf7581997a7fa46e" - }, - "regex": { - "revision": "b638d29335ef41215b86732dd51be34c701ef683" - }, - "rego": { - "revision": "20b5a5958c837bc9f74b231022a68a594a313f6d" - }, - "requirements": { - "revision": "728910099ddea7f1f94ea95a35a70d1ea76a1639" - }, - "rescript": { - "revision": "4606cd81c4c31d1d02390fee530858323410a74c" - }, - "rnoweb": { - "revision": "1a74dc0ed731ad07db39f063e2c5a6fe528cae7f" - }, - "robot": { - "revision": "17c2300e91fc9da4ba14c16558bf4292941dc074" - }, - "robots": { - "revision": "8e3a4205b76236bb6dbebdbee5afc262ce38bb62" - }, - "roc": { - "revision": "0b1afe88161cbd81f5ddea1bb4fa786314ed49a7" - }, - "ron": { - "revision": "78938553b93075e638035f624973083451b29055" - }, - "rst": { - "revision": "4e562e1598b95b93db4f3f64fe40ddefbc677a15" - }, - "ruby": { - "revision": "89bd7a8e5450cb6a942418a619d30469f259e5d6" - }, - "runescript": { - "revision": "cf85bbd5da0c5ad243301d889c7f84d790a4cae4" - }, - "rust": { - "revision": "e86119bdb4968b9799f6a014ca2401c178d54b5f" - }, - "scala": { - "revision": "c1189954df854977c3a52003ca8a247c5f4729ba" - }, - "scfg": { - "revision": "2f3709e7656fa2c443f92041c91a9f843f8cd625" - }, - "scheme": { - "revision": "63e25a4a84142ae7ee0ee01fe3a32c985ca16745" - }, - "scss": { - "revision": "c478c6868648eff49eb04a4df90d703dc45b312a" - }, - "sflog": { - "revision": "3597575a429766dd7ecce9f5bb97f6fec4419d5d" - }, - "slang": { - "revision": "3ed23c04a412a0559162d9cadf96dfff7cb36079" - }, - "slim": { - "revision": "546e3aa1af8a3b355c7734efccd9a759ffc0b43a" - }, - "slint": { - "revision": "f11da7e62051ba8b9d4faa299c26de8aeedfc1cd" - }, - "smali": { - "revision": "fdfa6a1febc43c7467aa7e937b87b607956f2346" - }, - "smithy": { - "revision": "fa898ac0885d1da9a253695c3e0e91f5efc587cd" - }, - "snakemake": { - "revision": "f36c1587624d6d84376c82a357c20fc319cbf02c" - }, - "solidity": { - "revision": "d38dcd0b58b223c43e3f9265914fb3167dc624c6" - }, - "soql": { - "revision": "3597575a429766dd7ecce9f5bb97f6fec4419d5d" - }, - "sosl": { - "revision": "3597575a429766dd7ecce9f5bb97f6fec4419d5d" - }, - "sourcepawn": { - "revision": "f2af8d0dc14c6790130cceb2a20027eb41a8297c" - }, - "sparql": { - "revision": "d853661ca680d8ff7f8d800182d5782b61d0dd58" - }, - "sql": { - "revision": "b9d109588d5b5ed986c857464830c2f0bef53f18" - }, - "squirrel": { - "revision": "072c969749e66f000dba35a33c387650e203e96e" - }, - "ssh_config": { - "revision": "0dd3c7e9f301758f6c69a6efde43d3048deb4d8a" - }, - "starlark": { - "revision": "a453dbf3ba433db0e5ec621a38a7e59d72e4dc69" - }, - "strace": { - "revision": "d819cdd5dbe455bd3c859193633c8d91c0df7c36" - }, - "styled": { - "revision": "319cdcaa0346ba6db668a222d938e5c3569e2a51" - }, - "supercollider": { - "revision": "1a8ee0da9a4f2df5a8a22f4d637ac863623a78a7" - }, - "superhtml": { - "revision": "16887e9fa3122c36a3d4942470e33c1c282fe859" - }, - "surface": { - "revision": "f4586b35ac8548667a9aaa4eae44456c1f43d032" - }, - "svelte": { - "revision": "ae5199db47757f785e43a14b332118a5474de1a2" - }, - "sway": { - "revision": "395006713db3bbb90d267ebdfcbf1881b399b05c" - }, - "swift": { - "revision": "aca5a52aa3cab858944d3c02701ccf5b2d8fd0f9" - }, - "sxhkdrc": { - "revision": "440d5f913d9465c9c776a1bd92334d32febcf065" - }, - "systemtap": { - "revision": "f2b378a9af0b7e1192cff67a5fb45508c927205d" - }, - "t32": { - "revision": "e5a12f798f056049642aa03fbb83786e3a5b95d4" - }, - "tablegen": { - "revision": "b1170880c61355aaf38fc06f4af7d3c55abdabc4" - }, - "tact": { - "revision": "47af20264abbd24ea282ded0f8ee9cad3cf3bf2f" - }, - "tcl": { - "revision": "f15e711167661d1ba541d4f62b9dbfc4ce61ec56" - }, - "teal": { - "revision": "3db655924b2ff1c54fdf6371b5425ea6b5dccefe" - }, - "templ": { - "revision": "def9849184de71a797c4e2b2837df85abeccf92c" - }, - "tera": { - "revision": "25a7c617192253bddfa65e378975d8c476419010" - }, - "terraform": { - "revision": "de10d494dbd6b71cdf07a678fecbf404dbfe4398" - }, - "textproto": { - "revision": "568471b80fd8793d37ed01865d8c2208a9fefd1b" - }, - "thrift": { - "revision": "68fd0d80943a828d9e6f49c58a74be1e9ca142cf" - }, - "tiger": { - "revision": "4a77b2d7a004587646bddc4e854779044b6db459" - }, - "tlaplus": { - "revision": "4ba91b07b97741a67f61221d0d50e6d962e4987e" - }, - "tmux": { - "revision": "0252ecd080016e45e6305ef1a943388f5ae2f4b4" - }, - "todotxt": { - "revision": "3937c5cd105ec4127448651a21aef45f52d19609" - }, - "toml": { - "revision": "64b56832c2cffe41758f28e05c756a3a98d16f41" - }, - "tsv": { - "revision": "7eb7297823605392d2bbcc4c09b1cd18d6fa9529" - }, - "tsx": { - "revision": "75b3874edb2dc714fb1fd77a32013d0f8699989f" - }, - "turtle": { - "revision": "7f789ea7ef765080f71a298fc96b7c957fa24422" - }, - "twig": { - "revision": "085648e01d1422163a1702a44e72303b4e2a0bd1" - }, - "typescript": { - "revision": "75b3874edb2dc714fb1fd77a32013d0f8699989f" - }, - "typespec": { - "revision": "42fb163442ef2691b9b720fb4e4e846809415d18" - }, - "typoscript": { - "revision": "5d8fde870b0ded1f429ba5bb249a9d9f8589ff5f" - }, - "typst": { - "revision": "46cf4ded12ee974a70bf8457263b67ad7ee0379d" - }, - "udev": { - "revision": "18a1d183c4c0cc40438bae2ebf8191aaf2dee8dc" - }, - "ungrammar": { - "revision": "debd26fed283d80456ebafa33a06957b0c52e451" - }, - "unison": { - "revision": "169e7f748a540ec360c0cb086b448faad012caa4" - }, - "usd": { - "revision": "4e0875f724d94d0c2ff36f9b8cb0b12f8b20d216" - }, - "uxntal": { - "revision": "ad9b638b914095320de85d59c49ab271603af048" - }, - "v": { - "revision": "26c2c4c2b3fb4f7a07ae78d298b36998b7ffa956" - }, - "vala": { - "revision": "97e6db3c8c73b15a9541a458d8e797a07f588ef4" - }, - "vento": { - "revision": "3b32474bc29584ea214e4e84b47102408263fe0e" - }, - "verilog": { - "revision": "15fbf73dafaffc89050d247857beb27500ea30e8" - }, - "vhdl": { - "revision": "35ed277d3e98836796bc764010dc3fb800d14ee4" - }, - "vhs": { - "revision": "0c6fae9d2cfc5b217bfd1fe84a7678f5917116db" - }, - "vim": { - "revision": "11b688a1f0e97c0c4e3dbabf4a38016335f4d237" - }, - "vimdoc": { - "revision": "2694c3d27e2ca98a0ccde72f33887394300d524e" - }, - "vrl": { - "revision": "274b3ce63f72aa8ffea18e7fc280d3062d28f0ba" - }, - "vue": { - "revision": "22bdfa6c9fc0f5ffa44c6e938ec46869ac8a99ff" - }, - "wgsl": { - "revision": "40259f3c77ea856841a4e0c4c807705f3e4a2b65" - }, - "wgsl_bevy": { - "revision": "47c1818d245a6156a488c4c4d06e9336714bae9b" - }, - "wing": { - "revision": "76e0c25844a66ebc6e866d690fcc5f4e90698947" - }, - "wit": { - "revision": "81490b4e74c792369e005f72b0d46fe082d3fed2" - }, - "xcompose": { - "revision": "fff3e72242aa110ebba6441946ea4d12d200fa68" - }, - "xml": { - "revision": "0d9a8099c963ed53e183425c1b47fa2622c8eaf7" - }, - "xresources": { - "revision": "d0f9dc7cec4dc15fc6f9d556bb4e9dd5050328a6" - }, - "yaml": { - "revision": "1805917414a9a8ba2473717fd69447277a175fae" - }, - "yang": { - "revision": "2c0e6be8dd4dcb961c345fa35c309ad4f5bd3502" - }, - "yuck": { - "revision": "e877f6ade4b77d5ef8787075141053631ba12318" - }, - "zathurarc": { - "revision": "0554b4a5d313244b7fc000cbb41c04afae4f4e31" - }, - "zig": { - "revision": "b670c8df85a1568f498aa5c8cae42f51a90473c0" - }, - "ziggy": { - "revision": "8a29017169f43dc2c3526817e98142eb9a335087" - }, - "ziggy_schema": { - "revision": "8a29017169f43dc2c3526817e98142eb9a335087" - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter.lua deleted file mode 100644 index 963fe73..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter.lua +++ /dev/null @@ -1,22 +0,0 @@ -local install = require "nvim-treesitter.install" -local utils = require "nvim-treesitter.utils" -local info = require "nvim-treesitter.info" -local configs = require "nvim-treesitter.configs" -local statusline = require "nvim-treesitter.statusline" - --- Registers all query predicates -require "nvim-treesitter.query_predicates" - -local M = {} - -function M.setup() - utils.setup_commands("install", install.commands) - utils.setup_commands("info", info.commands) - utils.setup_commands("configs", configs.commands) - configs.init() -end - -M.define_modules = configs.define_modules -M.statusline = statusline.statusline - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/caching.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/caching.lua deleted file mode 100644 index 64e967c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/caching.lua +++ /dev/null @@ -1,70 +0,0 @@ -local api = vim.api - -local M = {} - --- Creates a cache table for buffers keyed by a type name. --- Cache entries attach to the buffer and cleanup entries --- as buffers are detached. -function M.create_buffer_cache() - local cache = {} - - ---@type table> - local items = setmetatable({}, { - __index = function(tbl, key) - rawset(tbl, key, {}) - return rawget(tbl, key) - end, - }) - - ---@type table - local loaded_buffers = {} - - ---@param type_name string - ---@param bufnr integer - ---@param value any - function cache.set(type_name, bufnr, value) - if not loaded_buffers[bufnr] then - loaded_buffers[bufnr] = true - -- Clean up the cache if the buffer is detached - -- to avoid memory leaks - api.nvim_buf_attach(bufnr, false, { - on_detach = function() - cache.clear_buffer(bufnr) - loaded_buffers[bufnr] = nil - end, - on_reload = function() end, -- this is needed to prevent on_detach being called on buffer reload - }) - end - - items[bufnr][type_name] = value - end - - ---@param type_name string - ---@param bufnr integer - ---@return any - function cache.get(type_name, bufnr) - return items[bufnr][type_name] - end - - ---@param type_name string - ---@param bufnr integer - ---@return boolean - function cache.has(type_name, bufnr) - return cache.get(type_name, bufnr) ~= nil - end - - ---@param type_name string - ---@param bufnr integer - function cache.remove(type_name, bufnr) - items[bufnr][type_name] = nil - end - - ---@param bufnr integer - function cache.clear_buffer(bufnr) - items[bufnr] = nil - end - - return cache -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/compat.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/compat.lua deleted file mode 100644 index a503958..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/compat.lua +++ /dev/null @@ -1,35 +0,0 @@ --- Shim module to address deprecations across nvim versions -local ts = vim.treesitter -local tsq = ts.query - -local M = {} - -function M.get_query_files(lang, query_group, is_included) - return (tsq.get_files or tsq.get_query_files)(lang, query_group, is_included) -end - -function M.get_query(lang, query_name) - return (tsq.get or tsq.get_query)(lang, query_name) -end - -function M.parse_query(lang, query) - return (tsq.parse or tsq.parse_query)(lang, query) -end - -function M.get_range(node, source, metadata) - return (ts.get_range or tsq.get_range)(node, source, metadata) -end - -function M.get_node_text(node, bufnr) - return (ts.get_node_text or tsq.get_node_text)(node, bufnr) -end - -function M.require_language(lang, opts) - return ts.language.add(lang, opts) -end - -function M.flatten(t) - return vim.iter(t):flatten():totable() -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/configs.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/configs.lua deleted file mode 100644 index 6d061d7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/configs.lua +++ /dev/null @@ -1,619 +0,0 @@ -local api = vim.api - -local queries = require "nvim-treesitter.query" -local ts = require "nvim-treesitter.compat" -local parsers = require "nvim-treesitter.parsers" -local utils = require "nvim-treesitter.utils" -local caching = require "nvim-treesitter.caching" - -local M = {} - ----@class TSConfig ----@field modules {[string]:TSModule} ----@field sync_install boolean ----@field ensure_installed string[]|string ----@field ignore_install string[] ----@field auto_install boolean ----@field parser_install_dir string|nil - ----@type TSConfig -local config = { - modules = {}, - sync_install = false, - ensure_installed = {}, - auto_install = false, - ignore_install = {}, - parser_install_dir = nil, -} - --- List of modules that need to be setup on initialization. ----@type TSModule[][] -local queued_modules_defs = {} --- Whether we've initialized the plugin yet. -local is_initialized = false - ----@class TSModule ----@field module_path string ----@field enable boolean|string[]|function(string): boolean ----@field disable? boolean|string[]|function(string): boolean ----@field keymaps? table ----@field is_supported function(string): boolean ----@field attach? function(string) ----@field detach? function(string) ----@field enabled_buffers? table ----@field additional_vim_regex_highlighting? boolean|string[] ----@field loaded? boolean - ----@type {[string]: TSModule} -local builtin_modules = { - highlight = { - module_path = "nvim-treesitter.highlight", - -- @deprecated: use `highlight.set_custom_captures` instead - custom_captures = {}, - enable = false, - is_supported = function(lang) - return queries.has_highlights(lang) - end, - additional_vim_regex_highlighting = false, - }, - incremental_selection = { - module_path = "nvim-treesitter.incremental_selection", - enable = false, - keymaps = { - init_selection = "gnn", -- set to `false` to disable one of the mappings - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - is_supported = function() - return true - end, - }, - indent = { - module_path = "nvim-treesitter.indent", - enable = false, - is_supported = queries.has_indents, - }, -} - -local attached_buffers_by_module = caching.create_buffer_cache() - ----Resolves a module by requiring the `module_path` or using the module definition. ----@param mod_name string ----@return TSModule|nil -local function resolve_module(mod_name) - local config_mod = M.get_module(mod_name) - - if not config_mod then - return - end - - if type(config_mod.attach) == "function" and type(config_mod.detach) == "function" then - return config_mod - elseif type(config_mod.module_path) == "string" then - return require(config_mod.module_path) - end -end - ----Enables and attaches the module to a buffer for lang. ----@param mod string path to module ----@param bufnr integer|nil buffer number, defaults to current buffer ----@param lang string|nil language, defaults to current language -local function enable_module(mod, bufnr, lang) - local module = M.get_module(mod) - if not module then - return - end - - bufnr = bufnr or api.nvim_get_current_buf() - lang = lang or parsers.get_buf_lang(bufnr) - - if not module.enable then - if module.enabled_buffers then - module.enabled_buffers[bufnr] = true - else - module.enabled_buffers = { [bufnr] = true } - end - end - - M.attach_module(mod, bufnr, lang) -end - ----Enables autocomands for the module. ----After the module is loaded `loaded` will be set to true for the module. ----@param mod string path to module -local function enable_mod_conf_autocmd(mod) - local config_mod = M.get_module(mod) - if not config_mod or config_mod.loaded then - return - end - - api.nvim_create_autocmd("FileType", { - group = api.nvim_create_augroup("NvimTreesitter-" .. mod, {}), - callback = function(args) - require("nvim-treesitter.configs").reattach_module(mod, args.buf) - end, - desc = "Reattach module", - }) - - config_mod.loaded = true -end - ----Enables the module globally and for all current buffers. ----After enabled, `enable` will be set to true for the module. ----@param mod string path to module -local function enable_all(mod) - local config_mod = M.get_module(mod) - if not config_mod then - return - end - - enable_mod_conf_autocmd(mod) - config_mod.enable = true - config_mod.enabled_buffers = nil - - for _, bufnr in pairs(api.nvim_list_bufs()) do - enable_module(mod, bufnr) - end -end - ----Disables and detaches the module for a buffer. ----@param mod string path to module ----@param bufnr integer buffer number, defaults to current buffer -local function disable_module(mod, bufnr) - local module = M.get_module(mod) - if not module then - return - end - - bufnr = bufnr or api.nvim_get_current_buf() - if module.enabled_buffers then - module.enabled_buffers[bufnr] = false - end - M.detach_module(mod, bufnr) -end - ----Disables autocomands for the module. ----After the module is unloaded `loaded` will be set to false for the module. ----@param mod string path to module -local function disable_mod_conf_autocmd(mod) - local config_mod = M.get_module(mod) - if not config_mod or not config_mod.loaded then - return - end - api.nvim_clear_autocmds { event = "FileType", group = "NvimTreesitter-" .. mod } - config_mod.loaded = false -end - ----Disables the module globally and for all current buffers. ----After disabled, `enable` will be set to false for the module. ----@param mod string path to module -local function disable_all(mod) - local config_mod = M.get_module(mod) - if not config_mod then - return - end - - config_mod.enabled_buffers = nil - disable_mod_conf_autocmd(mod) - config_mod.enable = false - - for _, bufnr in pairs(api.nvim_list_bufs()) do - disable_module(mod, bufnr) - end -end - ----Toggles a module for a buffer ----@param mod string path to module ----@param bufnr integer buffer number, defaults to current buffer ----@param lang string language, defaults to current language -local function toggle_module(mod, bufnr, lang) - bufnr = bufnr or api.nvim_get_current_buf() - lang = lang or parsers.get_buf_lang(bufnr) - - if attached_buffers_by_module.has(mod, bufnr) then - disable_module(mod, bufnr) - else - enable_module(mod, bufnr, lang) - end -end - --- Toggles the module globally and for all current buffers. --- @param mod path to module -local function toggle_all(mod) - local config_mod = M.get_module(mod) - if not config_mod then - return - end - - if config_mod.enable then - disable_all(mod) - else - enable_all(mod) - end -end - ----Recurses through all modules including submodules ----@param accumulator function called for each module ----@param root {[string]: TSModule}|nil root configuration table to start at ----@param path string|nil prefix path -local function recurse_modules(accumulator, root, path) - root = root or config.modules - - for name, module in pairs(root) do - local new_path = path and (path .. "." .. name) or name - - if M.is_module(module) then - accumulator(name, module, new_path, root) - elseif type(module) == "table" then - recurse_modules(accumulator, module, new_path) - end - end -end - --- Shows current configuration of all nvim-treesitter modules ----@param process_function function used as the `process` parameter ---- for vim.inspect (https://github.com/kikito/inspect.lua#optionsprocess) -local function config_info(process_function) - process_function = process_function - or function(item, path) - if path[#path] == vim.inspect.METATABLE then - return - end - if path[#path] == "is_supported" then - return - end - return item - end - print(vim.inspect(config, { process = process_function })) -end - ----@param query_group string ----@param lang string -function M.edit_query_file(query_group, lang) - lang = lang or parsers.get_buf_lang() - local files = ts.get_query_files(lang, query_group, true) - if #files == 0 then - utils.notify "No query file found! Creating a new one!" - M.edit_query_file_user_after(query_group, lang) - elseif #files == 1 then - vim.cmd(":edit " .. files[1]) - else - vim.ui.select(files, { prompt = "Select a file:" }, function(file) - if file then - vim.cmd(":edit " .. file) - end - end) - end -end - ----@param query_group string ----@param lang string -function M.edit_query_file_user_after(query_group, lang) - lang = lang or parsers.get_buf_lang() - local folder = utils.join_path(vim.fn.stdpath "config", "after", "queries", lang) - local file = utils.join_path(folder, query_group .. ".scm") - if vim.fn.isdirectory(folder) ~= 1 then - vim.ui.select({ "Yes", "No" }, { prompt = '"' .. folder .. '" does not exist. Create it?' }, function(choice) - if choice == "Yes" then - vim.fn.mkdir(folder, "p", "0755") - vim.cmd(":edit " .. file) - end - end) - else - vim.cmd(":edit " .. file) - end -end - -M.commands = { - TSBufEnable = { - run = enable_module, - args = { - "-nargs=1", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, - TSBufDisable = { - run = disable_module, - args = { - "-nargs=1", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, - TSBufToggle = { - run = toggle_module, - args = { - "-nargs=1", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, - TSEnable = { - run = enable_all, - args = { - "-nargs=+", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, - TSDisable = { - run = disable_all, - args = { - "-nargs=+", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, - TSToggle = { - run = toggle_all, - args = { - "-nargs=+", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, - TSConfigInfo = { - run = config_info, - args = { - "-nargs=0", - }, - }, - TSEditQuery = { - run = M.edit_query_file, - args = { - "-nargs=+", - "-complete=custom,nvim_treesitter#available_query_groups", - }, - }, - TSEditQueryUserAfter = { - run = M.edit_query_file_user_after, - args = { - "-nargs=+", - "-complete=custom,nvim_treesitter#available_query_groups", - }, - }, -} - ----@param mod string module ----@param lang string the language of the buffer ----@param bufnr integer the buffer -function M.is_enabled(mod, lang, bufnr) - if not parsers.has_parser(lang) then - return false - end - - local module_config = M.get_module(mod) - if not module_config then - return false - end - - local buffer_enabled = module_config.enabled_buffers and module_config.enabled_buffers[bufnr] - local config_enabled = module_config.enable or buffer_enabled - if not config_enabled or not module_config.is_supported(lang) then - return false - end - - local disable = module_config.disable - if type(disable) == "function" then - if disable(lang, bufnr) then - return false - end - elseif type(disable) == "table" then - -- Otherwise it's a list of languages - for _, parser in pairs(disable) do - if lang == parser then - return false - end - end - end - - return true -end - ----Setup call for users to override module configurations. ----@param user_data TSConfig module overrides -function M.setup(user_data) - config.modules = vim.tbl_deep_extend("force", config.modules, user_data) - config.ignore_install = user_data.ignore_install or {} - config.parser_install_dir = user_data.parser_install_dir or nil - if config.parser_install_dir then - ---@diagnostic disable-next-line: param-type-mismatch - config.parser_install_dir = vim.fn.expand(config.parser_install_dir, ":p") - end - - config.auto_install = user_data.auto_install or false - if config.auto_install then - require("nvim-treesitter.install").setup_auto_install() - end - - local ensure_installed = user_data.ensure_installed or {} - if #ensure_installed > 0 then - if user_data.sync_install then - require("nvim-treesitter.install").ensure_installed_sync(ensure_installed) - else - require("nvim-treesitter.install").ensure_installed(ensure_installed) - end - end - - config.modules.ensure_installed = nil - config.ensure_installed = ensure_installed - - recurse_modules(function(_, _, new_path) - local data = utils.get_at_path(config.modules, new_path) - assert(data ~= nil) - if data.enable then - enable_all(new_path) - end - end, config.modules) -end - --- Defines a table of modules that can be attached/detached to buffers --- based on language support. A module consist of the following properties: ----* @enable Whether the modules is enabled. Can be true or false. ----* @disable A list of languages to disable the module for. Only relevant if enable is true. ----* @keymaps A list of user mappings for a given module if relevant. ----* @is_supported A function which, given a ft, will return true if the ft works on the module. ----* @module_path A string path to a module file using `require`. The exported module must contain ---- an `attach` and `detach` function. This path is not required if `attach` and `detach` ---- functions are provided directly on the module definition. ----* @attach An attach function that is called for each buffer that the module is enabled for. This is required ---- if a `module_path` is not specified. ----* @detach A detach function that is called for each buffer that the module is enabled for. This is required ---- if a `module_path` is not specified. --- --- Modules are not setup until `init` is invoked by the plugin. This allows modules to be defined in any order --- and can be loaded lazily. --- ----* @example ----require"nvim-treesitter".define_modules { ---- my_cool_module = { ---- attach = function() ---- do_some_cool_setup() ---- end, ---- detach = function() ---- do_some_cool_teardown() ---- end ---- } ----} ----@param mod_defs TSModule[] -function M.define_modules(mod_defs) - if not is_initialized then - table.insert(queued_modules_defs, mod_defs) - return - end - - recurse_modules(function(key, mod, _, group) - group[key] = vim.tbl_extend("keep", mod, { - enable = false, - disable = {}, - is_supported = function() - return true - end, - }) - end, mod_defs) - - config.modules = vim.tbl_deep_extend("keep", config.modules, mod_defs) - - for _, mod in ipairs(M.available_modules(mod_defs)) do - local module_config = M.get_module(mod) - if module_config and module_config.enable then - enable_mod_conf_autocmd(mod) - end - end -end - ----Attaches a module to a buffer ----@param mod_name string the module name ----@param bufnr integer the buffer ----@param lang string the language of the buffer -function M.attach_module(mod_name, bufnr, lang) - bufnr = bufnr or api.nvim_get_current_buf() - lang = lang or parsers.get_buf_lang(bufnr) - local resolved_mod = resolve_module(mod_name) - - if resolved_mod and not attached_buffers_by_module.has(mod_name, bufnr) and M.is_enabled(mod_name, lang, bufnr) then - attached_buffers_by_module.set(mod_name, bufnr, true) - resolved_mod.attach(bufnr, lang) - end -end - --- Detaches a module to a buffer ----@param mod_name string the module name ----@param bufnr integer the buffer -function M.detach_module(mod_name, bufnr) - local resolved_mod = resolve_module(mod_name) - bufnr = bufnr or api.nvim_get_current_buf() - - if resolved_mod and attached_buffers_by_module.has(mod_name, bufnr) then - attached_buffers_by_module.remove(mod_name, bufnr) - resolved_mod.detach(bufnr) - end -end - --- Same as attach_module, but if the module is already attached, detach it first. ----@param mod_name string the module name ----@param bufnr integer the buffer ----@param lang string the language of the buffer -function M.reattach_module(mod_name, bufnr, lang) - M.detach_module(mod_name, bufnr) - M.attach_module(mod_name, bufnr, lang) -end - --- Gets available modules ----@param root {[string]:TSModule}|nil table to find modules ----@return string[] modules list of module paths -function M.available_modules(root) - local modules = {} - - recurse_modules(function(_, _, path) - table.insert(modules, path) - end, root) - - return modules -end - ----Gets a module config by path ----@param mod_path string path to the module ----@return TSModule|nil: the module or nil -function M.get_module(mod_path) - local mod = utils.get_at_path(config.modules, mod_path) - - return M.is_module(mod) and mod or nil -end - --- Determines whether the provided table is a module. --- A module should contain an attach and detach function. ----@param mod table|nil the module table ----@return boolean -function M.is_module(mod) - return type(mod) == "table" - and ((type(mod.attach) == "function" and type(mod.detach) == "function") or type(mod.module_path) == "string") -end - --- Initializes built-in modules and any queued modules --- registered by plugins or the user. -function M.init() - is_initialized = true - M.define_modules(builtin_modules) - - for _, mod_def in ipairs(queued_modules_defs) do - M.define_modules(mod_def) - end -end - --- If parser_install_dir is not nil is used or created. --- If parser_install_dir is nil try the package dir of the nvim-treesitter --- plugin first, followed by the "site" dir from "runtimepath". "site" dir will --- be created if it doesn't exist. Using only the package dir won't work when --- the plugin is installed with Nix, since the "/nix/store" is read-only. ----@param folder_name string|nil ----@return string|nil, string|nil -function M.get_parser_install_dir(folder_name) - folder_name = folder_name or "parser" - - local install_dir = config.parser_install_dir or utils.get_package_path() - local parser_dir = utils.join_path(install_dir, folder_name) - - return utils.create_or_reuse_writable_dir( - parser_dir, - utils.join_space("Could not create parser dir '", parser_dir, "': "), - utils.join_space( - "Parser dir '", - parser_dir, - "' should be read/write (see README on how to configure an alternative install location)" - ) - ) -end - -function M.get_parser_info_dir() - return M.get_parser_install_dir "parser-info" -end - -function M.get_ignored_parser_installs() - return config.ignore_install or {} -end - -function M.get_ensure_installed_parsers() - if type(config.ensure_installed) == "string" then - return { config.ensure_installed } - end - return config.ensure_installed or {} -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/fold.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/fold.lua deleted file mode 100644 index 7595998..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/fold.lua +++ /dev/null @@ -1,123 +0,0 @@ -local api = vim.api -local tsutils = require "nvim-treesitter.ts_utils" -local query = require "nvim-treesitter.query" -local parsers = require "nvim-treesitter.parsers" - -local M = {} - --- This is cached on buf tick to avoid computing that multiple times --- Especially not for every line in the file when `zx` is hit -local folds_levels = tsutils.memoize_by_buf_tick(function(bufnr) - local max_fold_level = api.nvim_win_get_option(0, "foldnestmax") - local trim_level = function(level) - if level > max_fold_level then - return max_fold_level - end - return level - end - - local parser = parsers.get_parser(bufnr) - - if not parser then - return {} - end - - local matches = query.get_capture_matches_recursively(bufnr, function(lang) - if query.has_folds(lang) then - return "@fold", "folds" - elseif query.has_locals(lang) then - return "@scope", "locals" - end - end) - - -- start..stop is an inclusive range - - ---@type table - local start_counts = {} - ---@type table - local stop_counts = {} - - local prev_start = -1 - local prev_stop = -1 - - local min_fold_lines = api.nvim_win_get_option(0, "foldminlines") - - for _, match in ipairs(matches) do - local start, stop, stop_col ---@type integer, integer, integer - if match.metadata and match.metadata.range then - start, _, stop, stop_col = unpack(match.metadata.range) ---@type integer, integer, integer, integer - else - start, _, stop, stop_col = match.node:range() ---@type integer, integer, integer, integer - end - - if stop_col == 0 then - stop = stop - 1 - end - - local fold_length = stop - start + 1 - local should_fold = fold_length > min_fold_lines - - -- Fold only multiline nodes that are not exactly the same as previously met folds - -- Checking against just the previously found fold is sufficient if nodes - -- are returned in preorder or postorder when traversing tree - if should_fold and not (start == prev_start and stop == prev_stop) then - start_counts[start] = (start_counts[start] or 0) + 1 - stop_counts[stop] = (stop_counts[stop] or 0) + 1 - prev_start = start - prev_stop = stop - end - end - - ---@type string[] - local levels = {} - local current_level = 0 - - -- We now have the list of fold opening and closing, fill the gaps and mark where fold start - for lnum = 0, api.nvim_buf_line_count(bufnr) do - local prefix = "" - - local last_trimmed_level = trim_level(current_level) - current_level = current_level + (start_counts[lnum] or 0) - local trimmed_level = trim_level(current_level) - current_level = current_level - (stop_counts[lnum] or 0) - local next_trimmed_level = trim_level(current_level) - - -- Determine if it's the start/end of a fold - -- NB: vim's fold-expr interface does not have a mechanism to indicate that - -- two (or more) folds start at this line, so it cannot distinguish between - -- ( \n ( \n )) \n (( \n ) \n ) - -- versus - -- ( \n ( \n ) \n ( \n ) \n ) - -- If it did have such a mechanism, (trimmed_level - last_trimmed_level) - -- would be the correct number of starts to pass on. - if trimmed_level - last_trimmed_level > 0 then - prefix = ">" - elseif trimmed_level - next_trimmed_level > 0 then - -- Ending marks tend to confuse vim more than it helps, particularly when - -- the fold level changes by at least 2; we can uncomment this if - -- vim's behavior gets fixed. - -- prefix = "<" - prefix = "" - end - - levels[lnum + 1] = prefix .. tostring(trimmed_level) - end - - return levels -end) - ----@param lnum integer ----@return string -function M.get_fold_indic(lnum) - if not parsers.has_parser() or not lnum then - return "0" - end - - local buf = api.nvim_get_current_buf() - - local levels = folds_levels(buf) or {} - - return levels[lnum] or "0" -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/health.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/health.lua deleted file mode 100644 index 32741b1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/health.lua +++ /dev/null @@ -1,176 +0,0 @@ -local api = vim.api -local fn = vim.fn - -local queries = require "nvim-treesitter.query" -local info = require "nvim-treesitter.info" -local shell = require "nvim-treesitter.shell_command_selectors" -local install = require "nvim-treesitter.install" -local utils = require "nvim-treesitter.utils" -local ts = require "nvim-treesitter.compat" - -local health = vim.health or require "health" - --- "report_" prefix has been deprecated, use the recommended replacements if they exist. -local _start = health.start or health.report_start -local _ok = health.ok or health.report_ok -local _warn = health.warn or health.report_warn -local _error = health.error or health.report_error - -local M = {} - -local NVIM_TREESITTER_MINIMUM_ABI = 13 - -local function install_health() - _start "Installation" - - if fn.has "nvim-0.10" ~= 1 then - _error "Nvim-treesitter requires Nvim 0.10 or newer" - end - - if fn.executable "tree-sitter" == 0 then - _warn( - "`tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar," - .. " not required for :TSInstall)" - ) - else - _ok( - "`tree-sitter` found " - .. (utils.ts_cli_version() or "(unknown version)") - .. " (parser generator, only needed for :TSInstallFromGrammar)" - ) - end - - if fn.executable "node" == 0 then - _warn("`node` executable not found (only needed for :TSInstallFromGrammar," .. " not required for :TSInstall)") - else - local handle = io.popen "node --version" - local result = handle:read "*a" - handle:close() - local version = vim.split(result, "\n")[1] - _ok("`node` found " .. version .. " (only needed for :TSInstallFromGrammar)") - end - - if fn.executable "git" == 0 then - _error("`git` executable not found.", { - "Install it with your package manager.", - "Check that your `$PATH` is set correctly.", - }) - else - _ok "`git` executable found." - end - - local cc = shell.select_executable(install.compilers) - if not cc then - _error("`cc` executable not found.", { - "Check that any of " - .. vim.inspect(install.compilers) - .. " is in your $PATH" - .. ' or set the environment variable CC or `require"nvim-treesitter.install".compilers` explicitly!', - }) - else - local version = vim.fn.systemlist(cc .. (cc == "cl" and "" or " --version"))[1] - _ok( - "`" - .. cc - .. "` executable found. Selected from " - .. vim.inspect(install.compilers) - .. (version and ("\nVersion: " .. version) or "") - ) - end - if vim.treesitter.language_version then - if vim.treesitter.language_version >= NVIM_TREESITTER_MINIMUM_ABI then - _ok( - "Neovim was compiled with tree-sitter runtime ABI version " - .. vim.treesitter.language_version - .. " (required >=" - .. NVIM_TREESITTER_MINIMUM_ABI - .. "). Parsers must be compatible with runtime ABI." - ) - else - _error( - "Neovim was compiled with tree-sitter runtime ABI version " - .. vim.treesitter.language_version - .. ".\n" - .. "nvim-treesitter expects at least ABI version " - .. NVIM_TREESITTER_MINIMUM_ABI - .. "\n" - .. "Please make sure that Neovim is linked against are recent tree-sitter runtime when building" - .. " or raise an issue at your Neovim packager. Parsers must be compatible with runtime ABI." - ) - end - end - - _start("OS Info:\n" .. vim.inspect(vim.loop.os_uname())) -end - -local function query_status(lang, query_group) - local ok, err = pcall(queries.get_query, lang, query_group) - if not ok then - return "x", err - elseif not err then - return "." - else - return "✓" - end -end - -function M.check() - local error_collection = {} - -- Installation dependency checks - install_health() - queries.invalidate_query_cache() - -- Parser installation checks - local parser_installation = { "Parser/Features" .. string.rep(" ", 9) .. "H L F I J" } - for _, parser_name in pairs(info.installed_parsers()) do - local installed = #api.nvim_get_runtime_file("parser/" .. parser_name .. ".so", false) - - -- Only append information about installed parsers - if installed >= 1 then - local multiple_parsers = installed > 1 and "+" or "" - local out = " - " .. parser_name .. multiple_parsers .. string.rep(" ", 20 - (#parser_name + #multiple_parsers)) - for _, query_group in pairs(queries.built_in_query_groups) do - local status, err = query_status(parser_name, query_group) - out = out .. status .. " " - if err then - table.insert(error_collection, { parser_name, query_group, err }) - end - end - table.insert(parser_installation, vim.fn.trim(out, " ", 2)) - end - end - local legend = [[ - - Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections - +) multiple parsers found, only one will be used - x) errors found in the query, try to run :TSUpdate {lang}]] - table.insert(parser_installation, legend) - -- Finally call the report function - _start(table.concat(parser_installation, "\n")) - if #error_collection > 0 then - _start "The following errors have been detected:" - for _, p in ipairs(error_collection) do - local lang, type, err = unpack(p) - local lines = {} - table.insert(lines, lang .. "(" .. type .. "): " .. err) - local files = ts.get_query_files(lang, type) - if #files > 0 then - table.insert(lines, lang .. "(" .. type .. ") is concatenated from the following files:") - for _, file in ipairs(files) do - local fd = io.open(file, "r") - if fd then - local ok, file_err = pcall(ts.parse_query, lang, fd:read "*a") - if ok then - table.insert(lines, '| [OK]:"' .. file .. '"') - else - table.insert(lines, '| [ERROR]:"' .. file .. '", failed to load: ' .. file_err) - end - fd:close() - end - end - end - _error(table.concat(lines, "\n")) - end - end -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/highlight.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/highlight.lua deleted file mode 100644 index 5a3cc2e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/highlight.lua +++ /dev/null @@ -1,49 +0,0 @@ -local configs = require "nvim-treesitter.configs" - -local M = {} - ----@param config TSModule ----@param lang string ----@return boolean -local function should_enable_vim_regex(config, lang) - local additional_hl = config.additional_vim_regex_highlighting - local is_table = type(additional_hl) == "table" - - ---@diagnostic disable-next-line: param-type-mismatch - return additional_hl and (not is_table or vim.tbl_contains(additional_hl, lang)) -end - ----@param bufnr integer ----@param lang string -function M.attach(bufnr, lang) - local config = configs.get_module "highlight" - vim.treesitter.start(bufnr, lang) - if config and should_enable_vim_regex(config, lang) then - vim.bo[bufnr].syntax = "ON" - end -end - ----@param bufnr integer -function M.detach(bufnr) - vim.treesitter.stop(bufnr) -end - ----@deprecated -function M.start(...) - vim.notify( - "`nvim-treesitter.highlight.start` is deprecated: use `nvim-treesitter.highlight.attach` or `vim.treesitter.start`", - vim.log.levels.WARN - ) - M.attach(...) -end - ----@deprecated -function M.stop(...) - vim.notify( - "`nvim-treesitter.highlight.stop` is deprecated: use `nvim-treesitter.highlight.detach` or `vim.treesitter.stop`", - vim.log.levels.WARN - ) - M.detach(...) -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/incremental_selection.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/incremental_selection.lua deleted file mode 100644 index 570f9ee..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/incremental_selection.lua +++ /dev/null @@ -1,176 +0,0 @@ -local api = vim.api - -local configs = require "nvim-treesitter.configs" -local ts_utils = require "nvim-treesitter.ts_utils" -local locals = require "nvim-treesitter.locals" -local parsers = require "nvim-treesitter.parsers" -local queries = require "nvim-treesitter.query" -local utils = require "nvim-treesitter.utils" - -local M = {} - ----@type table> -local selections = {} - -function M.init_selection() - local buf = api.nvim_get_current_buf() - parsers.get_parser():parse { vim.fn.line "w0" - 1, vim.fn.line "w$" } - local node = ts_utils.get_node_at_cursor() - selections[buf] = { [1] = node } - ts_utils.update_selection(buf, node) -end - --- Get the range of the current visual selection. --- --- The range starts with 1 and the ending is inclusive. ----@return integer, integer, integer, integer -local function visual_selection_range() - local _, csrow, cscol, _ = unpack(vim.fn.getpos "v") ---@type integer, integer, integer, integer - local _, cerow, cecol, _ = unpack(vim.fn.getpos ".") ---@type integer, integer, integer, integer - - local start_row, start_col, end_row, end_col ---@type integer, integer, integer, integer - - if csrow < cerow or (csrow == cerow and cscol <= cecol) then - start_row = csrow - start_col = cscol - end_row = cerow - end_col = cecol - else - start_row = cerow - start_col = cecol - end_row = csrow - end_col = cscol - end - - return start_row, start_col, end_row, end_col -end - ----@param node TSNode ----@return boolean -local function range_matches(node) - local csrow, cscol, cerow, cecol = visual_selection_range() - local srow, scol, erow, ecol = ts_utils.get_vim_range { node:range() } - return srow == csrow and scol == cscol and erow == cerow and ecol == cecol -end - ----@param get_parent fun(node: TSNode): TSNode|nil ----@return fun():nil -local function select_incremental(get_parent) - return function() - local buf = api.nvim_get_current_buf() - local nodes = selections[buf] - - local csrow, cscol, cerow, cecol = visual_selection_range() - -- Initialize incremental selection with current selection - if not nodes or #nodes == 0 or not range_matches(nodes[#nodes]) then - local parser = parsers.get_parser() - parser:parse { vim.fn.line "w0" - 1, vim.fn.line "w$" } - local node = parser:named_node_for_range( - { csrow - 1, cscol - 1, cerow - 1, cecol }, - { ignore_injections = false } - ) - ts_utils.update_selection(buf, node) - if nodes and #nodes > 0 then - table.insert(selections[buf], node) - else - selections[buf] = { [1] = node } - end - return - end - - -- Find a node that changes the current selection. - local node = nodes[#nodes] ---@type TSNode - while true do - local parent = get_parent(node) - if not parent or parent == node then - -- Keep searching in the parent tree - local root_parser = parsers.get_parser() - root_parser:parse { vim.fn.line "w0" - 1, vim.fn.line "w$" } - local current_parser = root_parser:language_for_range { csrow - 1, cscol - 1, cerow - 1, cecol } - if root_parser == current_parser then - node = root_parser:named_node_for_range { csrow - 1, cscol - 1, cerow - 1, cecol } - ts_utils.update_selection(buf, node) - return - end - -- NOTE: parent() method is private - local parent_parser = current_parser:parent() - parent = parent_parser:named_node_for_range { csrow - 1, cscol - 1, cerow - 1, cecol } - end - node = parent - local srow, scol, erow, ecol = ts_utils.get_vim_range { node:range() } - local same_range = (srow == csrow and scol == cscol and erow == cerow and ecol == cecol) - if not same_range then - table.insert(selections[buf], node) - if node ~= nodes[#nodes] then - table.insert(nodes, node) - end - ts_utils.update_selection(buf, node) - return - end - end - end -end - -M.node_incremental = select_incremental(function(node) - return node:parent() or node -end) - -M.scope_incremental = select_incremental(function(node) - local lang = parsers.get_buf_lang() - if queries.has_locals(lang) then - return locals.containing_scope(node:parent() or node) - else - return node - end -end) - -function M.node_decremental() - local buf = api.nvim_get_current_buf() - local nodes = selections[buf] - if not nodes or #nodes < 2 then - return - end - - table.remove(selections[buf]) - local node = nodes[#nodes] ---@type TSNode - ts_utils.update_selection(buf, node) -end - -local FUNCTION_DESCRIPTIONS = { - init_selection = "Start selecting nodes with nvim-treesitter", - node_incremental = "Increment selection to named node", - scope_incremental = "Increment selection to surrounding scope", - node_decremental = "Shrink selection to previous named node", -} - ----@param bufnr integer -function M.attach(bufnr) - local config = configs.get_module "incremental_selection" - for funcname, mapping in pairs(config.keymaps) do - if mapping then - local mode = funcname == "init_selection" and "n" or "x" - local rhs = M[funcname] ---@type function - - if not rhs then - utils.notify("Unknown keybinding: " .. funcname .. debug.traceback(), vim.log.levels.ERROR) - else - vim.keymap.set(mode, mapping, rhs, { buffer = bufnr, silent = true, desc = FUNCTION_DESCRIPTIONS[funcname] }) - end - end - end -end - -function M.detach(bufnr) - local config = configs.get_module "incremental_selection" - for f, mapping in pairs(config.keymaps) do - if mapping then - local mode = f == "init_selection" and "n" or "x" - local ok, err = pcall(vim.keymap.del, mode, mapping, { buffer = bufnr }) - if not ok then - utils.notify(string.format('%s "%s" for mode %s', err, mapping, mode), vim.log.levels.ERROR) - end - end - end -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/indent.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/indent.lua deleted file mode 100644 index 19e7ef1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/indent.lua +++ /dev/null @@ -1,366 +0,0 @@ -local ts = vim.treesitter -local parsers = require "nvim-treesitter.parsers" - -local M = {} - -M.avoid_force_reparsing = { - yaml = true, -} - -M.comment_parsers = { - comment = true, - jsdoc = true, - phpdoc = true, -} - -local function getline(lnum) - return vim.api.nvim_buf_get_lines(0, lnum - 1, lnum, false)[1] or "" -end - ----@param lnum integer ----@return integer -local function get_indentcols_at_line(lnum) - local _, indentcols = getline(lnum):find "^%s*" - return indentcols or 0 -end - ----@param root TSNode ----@param lnum integer ----@param col? integer ----@return TSNode -local function get_first_node_at_line(root, lnum, col) - col = col or get_indentcols_at_line(lnum) - return root:descendant_for_range(lnum - 1, col, lnum - 1, col + 1) -end - ----@param root TSNode ----@param lnum integer ----@param col? integer ----@return TSNode -local function get_last_node_at_line(root, lnum, col) - col = col or (#getline(lnum) - 1) - return root:descendant_for_range(lnum - 1, col, lnum - 1, col + 1) -end - ----@param node TSNode ----@return number -local function node_length(node) - local _, _, start_byte = node:start() - local _, _, end_byte = node:end_() - return end_byte - start_byte -end - ----@param bufnr integer ----@param node TSNode ----@param delimiter string ----@return TSNode|nil child ----@return boolean|nil is_end -local function find_delimiter(bufnr, node, delimiter) - for child, _ in node:iter_children() do - if child:type() == delimiter then - local linenr = child:start() - local line = vim.api.nvim_buf_get_lines(bufnr, linenr, linenr + 1, false)[1] - local end_char = { child:end_() } - local trimmed_after_delim - local escaped_delimiter = delimiter:gsub("[%-%.%+%[%]%(%)%$%^%%%?%*]", "%%%1") - trimmed_after_delim, _ = line:sub(end_char[2] + 1):gsub("[%s" .. escaped_delimiter .. "]*", "") - return child, #trimmed_after_delim == 0 - end - end -end - ----Memoize a function using hash_fn to hash the arguments. ----@generic F: function ----@param fn F ----@param hash_fn fun(...): any ----@return F -local function memoize(fn, hash_fn) - local cache = setmetatable({}, { __mode = "kv" }) ---@type table - - return function(...) - local key = hash_fn(...) - if cache[key] == nil then - local v = fn(...) ---@type any - cache[key] = v ~= nil and v or vim.NIL - end - - local v = cache[key] - return v ~= vim.NIL and v or nil - end -end - -local get_indents = memoize(function(bufnr, root, lang) - local map = { - ["indent.auto"] = {}, - ["indent.begin"] = {}, - ["indent.end"] = {}, - ["indent.dedent"] = {}, - ["indent.branch"] = {}, - ["indent.ignore"] = {}, - ["indent.align"] = {}, - ["indent.zero"] = {}, - } - - --TODO(clason): remove when dropping Nvim 0.8 compat - local query = (ts.query.get or ts.get_query)(lang, "indents") - if not query then - return map - end - for id, node, metadata in query:iter_captures(root, bufnr) do - if query.captures[id]:sub(1, 1) ~= "_" then - map[query.captures[id]][node:id()] = metadata or {} - end - end - - return map -end, function(bufnr, root, lang) - return tostring(bufnr) .. root:id() .. "_" .. lang -end) - ----@param lnum number (1-indexed) -function M.get_indent(lnum) - local bufnr = vim.api.nvim_get_current_buf() - local parser = parsers.get_parser(bufnr) - if not parser or not lnum then - return -1 - end - - --TODO(clason): replace when dropping Nvim 0.8 compat - local root_lang = parsers.get_buf_lang(bufnr) - - -- some languages like Python will actually have worse results when re-parsing at opened new line - if not M.avoid_force_reparsing[root_lang] then - -- Reparse in case we got triggered by ":h indentkeys" - parser:parse { vim.fn.line "w0" - 1, vim.fn.line "w$" } - end - - -- Get language tree with smallest range around node that's not a comment parser - local root, lang_tree ---@type TSNode, LanguageTree - parser:for_each_tree(function(tstree, tree) - if not tstree or M.comment_parsers[tree:lang()] then - return - end - local local_root = tstree:root() - if ts.is_in_node_range(local_root, lnum - 1, 0) then - if not root or node_length(root) >= node_length(local_root) then - root = local_root - lang_tree = tree - end - end - end) - - -- Not likely, but just in case... - if not root then - return 0 - end - - local q = get_indents(vim.api.nvim_get_current_buf(), root, lang_tree:lang()) - local is_empty_line = string.match(getline(lnum), "^%s*$") ~= nil - local node ---@type TSNode - if is_empty_line then - local prevlnum = vim.fn.prevnonblank(lnum) - local indentcols = get_indentcols_at_line(prevlnum) - local prevline = vim.trim(getline(prevlnum)) - -- The final position can be trailing spaces, which should not affect indentation - node = get_last_node_at_line(root, prevlnum, indentcols + #prevline - 1) - if node:type():match "comment" then - -- The final node we capture of the previous line can be a comment node, which should also be ignored - -- Unless the last line is an entire line of comment, ignore the comment range and find the last node again - local first_node = get_first_node_at_line(root, prevlnum, indentcols) - local _, scol, _, _ = node:range() - if first_node:id() ~= node:id() then - -- In case the last captured node is a trailing comment node, re-trim the string - prevline = vim.trim(prevline:sub(1, scol - indentcols)) - -- Add back indent as indent of prevline was trimmed away - local col = indentcols + #prevline - 1 - node = get_last_node_at_line(root, prevlnum, col) - end - end - if q["indent.end"][node:id()] then - node = get_first_node_at_line(root, lnum) - end - else - node = get_first_node_at_line(root, lnum) - end - - local indent_size = vim.fn.shiftwidth() - local indent = 0 - local _, _, root_start = root:start() - if root_start ~= 0 then - -- injected tree - indent = vim.fn.indent(root:start() + 1) - end - - -- tracks to ensure multiple indent levels are not applied for same line - local is_processed_by_row = {} - - if q["indent.zero"][node:id()] then - return 0 - end - - while node do - -- do 'autoindent' if not marked as @indent - if - not q["indent.begin"][node:id()] - and not q["indent.align"][node:id()] - and q["indent.auto"][node:id()] - and node:start() < lnum - 1 - and lnum - 1 <= node:end_() - then - return -1 - end - - -- Do not indent if we are inside an @ignore block. - -- If a node spans from L1,C1 to L2,C2, we know that lines where L1 < line <= L2 would - -- have their indentations contained by the node. - if - not q["indent.begin"][node:id()] - and q["indent.ignore"][node:id()] - and node:start() < lnum - 1 - and lnum - 1 <= node:end_() - then - return 0 - end - - local srow, _, erow = node:range() - - local is_processed = false - - if - not is_processed_by_row[srow] - and ((q["indent.branch"][node:id()] and srow == lnum - 1) or (q["indent.dedent"][node:id()] and srow ~= lnum - 1)) - then - indent = indent - indent_size - is_processed = true - end - - -- do not indent for nodes that starts-and-ends on same line and starts on target line (lnum) - local should_process = not is_processed_by_row[srow] - local is_in_err = false - if should_process then - local parent = node:parent() - is_in_err = parent and parent:has_error() - end - if - should_process - and ( - q["indent.begin"][node:id()] - and (srow ~= erow or is_in_err or q["indent.begin"][node:id()]["indent.immediate"]) - and (srow ~= lnum - 1 or q["indent.begin"][node:id()]["indent.start_at_same_line"]) - ) - then - indent = indent + indent_size - is_processed = true - end - - if is_in_err and not q["indent.align"][node:id()] then - -- only when the node is in error, promote the - -- first child's aligned indent to the error node - -- to work around ((ERROR "X" . (_)) @aligned_indent (#set! "delimiter" "AB")) - -- matching for all X, instead set do - -- (ERROR "X" @aligned_indent (#set! "delimiter" "AB") . (_)) - -- and we will fish it out here. - for c in node:iter_children() do - if q["indent.align"][c:id()] then - q["indent.align"][node:id()] = q["indent.align"][c:id()] - break - end - end - end - -- do not indent for nodes that starts-and-ends on same line and starts on target line (lnum) - if should_process and q["indent.align"][node:id()] and (srow ~= erow or is_in_err) and (srow ~= lnum - 1) then - local metadata = q["indent.align"][node:id()] - local o_delim_node, o_is_last_in_line ---@type TSNode|nil, boolean|nil - local c_delim_node, c_is_last_in_line ---@type TSNode|nil, boolean|nil, boolean|nil - local indent_is_absolute = false - if metadata["indent.open_delimiter"] then - o_delim_node, o_is_last_in_line = find_delimiter(bufnr, node, metadata["indent.open_delimiter"]) - else - o_delim_node = node - end - if metadata["indent.close_delimiter"] then - c_delim_node, c_is_last_in_line = find_delimiter(bufnr, node, metadata["indent.close_delimiter"]) - else - c_delim_node = node - end - - if o_delim_node then - local o_srow, o_scol = o_delim_node:start() - local c_srow = nil - if c_delim_node then - c_srow, _ = c_delim_node:start() - end - if o_is_last_in_line then - -- hanging indent (previous line ended with starting delimiter) - -- should be processed like indent - if should_process then - indent = indent + indent_size * 1 - if c_is_last_in_line then - -- If current line is outside the range of a node marked with `@aligned_indent` - -- Then its indent level shouldn't be affected by `@aligned_indent` node - if c_srow and c_srow < lnum - 1 then - indent = math.max(indent - indent_size, 0) - end - end - end - else - -- aligned indent - if c_is_last_in_line and c_srow and o_srow ~= c_srow and c_srow < lnum - 1 then - -- If current line is outside the range of a node marked with `@aligned_indent` - -- Then its indent level shouldn't be affected by `@aligned_indent` node - indent = math.max(indent - indent_size, 0) - else - indent = o_scol + (metadata["indent.increment"] or 1) - indent_is_absolute = true - end - end - -- deal with the final line - local avoid_last_matching_next = false - if c_srow and c_srow ~= o_srow and c_srow == lnum - 1 then - -- delims end on current line, and are not open and closed same line. - -- then this last line may need additional indent to avoid clashes - -- with the next. `indent.avoid_last_matching_next` controls this behavior, - -- for example this is needed for function parameters. - avoid_last_matching_next = metadata["indent.avoid_last_matching_next"] or false - end - if avoid_last_matching_next then - -- last line must be indented more in cases where - -- it would be same indent as next line (we determine this as one - -- width more than the open indent to avoid confusing with any - -- hanging indents) - if indent <= vim.fn.indent(o_srow + 1) + indent_size then - indent = indent + indent_size * 1 - else - indent = indent - end - end - is_processed = true - if indent_is_absolute then - -- don't allow further indenting by parent nodes, this is an absolute position - return indent - end - end - end - - is_processed_by_row[srow] = is_processed_by_row[srow] or is_processed - - node = node:parent() - end - - return indent -end - ----@type table -local indent_funcs = {} - ----@param bufnr integer -function M.attach(bufnr) - indent_funcs[bufnr] = vim.bo.indentexpr - vim.bo.indentexpr = "nvim_treesitter#indent()" -end - -function M.detach(bufnr) - vim.bo.indentexpr = indent_funcs[bufnr] -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/info.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/info.lua deleted file mode 100644 index 6e94b35..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/info.lua +++ /dev/null @@ -1,190 +0,0 @@ -local api = vim.api -local configs = require "nvim-treesitter.configs" -local parsers = require "nvim-treesitter.parsers" - -local M = {} - -local function install_info() - local max_len = 0 - for _, ft in pairs(parsers.available_parsers()) do - if #ft > max_len then - max_len = #ft - end - end - - local parser_list = parsers.available_parsers() - table.sort(parser_list) - for _, lang in pairs(parser_list) do - local is_installed = #api.nvim_get_runtime_file("parser/" .. lang .. ".so", false) > 0 - api.nvim_out_write(lang .. string.rep(" ", max_len - #lang + 1)) - if is_installed then - api.nvim_out_write "[✓] installed\n" - elseif pcall(vim.treesitter.inspect_lang, lang) then - api.nvim_out_write "[✗] not installed (but still loaded. Restart Neovim!)\n" - else - api.nvim_out_write "[✗] not installed\n" - end - end -end - --- Sort a list of modules into namespaces. --- {'mod1', 'mod2.sub1', 'mod2.sub2', 'mod3'} --- -> --- { default = {'mod1', 'mod3'}, mod2 = {'sub1', 'sub2'}} ----@param modulelist string[] ----@return table -local function namespace_modules(modulelist) - local modules = {} - for _, module in ipairs(modulelist) do - if module:find "%." then - local namespace, submodule = module:match "^(.*)%.(.*)$" - if not modules[namespace] then - modules[namespace] = {} - end - table.insert(modules[namespace], submodule) - else - if not modules.default then - modules.default = {} - end - table.insert(modules.default, module) - end - end - return modules -end - ----@param list string[] ----@return integer length -local function longest_string_length(list) - local length = 0 - for _, value in ipairs(list) do - if #value > length then - length = #value - end - end - return length -end - ----@param curbuf integer ----@param origbuf integer ----@param parserlist string[] ----@param namespace string ----@param modulelist string[] -local function append_module_table(curbuf, origbuf, parserlist, namespace, modulelist) - local maxlen_parser = longest_string_length(parserlist) - table.sort(modulelist) - - -- header - local header = ">> " .. namespace .. string.rep(" ", maxlen_parser - #namespace - 1) - for _, module in pairs(modulelist) do - header = header .. module .. " " - end - api.nvim_buf_set_lines(curbuf, -1, -1, true, { header }) - - -- actual table - for _, parser in ipairs(parserlist) do - local padding = string.rep(" ", maxlen_parser - #parser + 2) - local line = parser .. padding - local namespace_prefix = (namespace == "default") and "" or namespace .. "." - for _, module in pairs(modulelist) do - local modlen = #module - module = namespace_prefix .. module - if configs.is_enabled(module, parser, origbuf) then - line = line .. "✓" - else - line = line .. "✗" - end - line = line .. string.rep(" ", modlen + 1) - end - api.nvim_buf_set_lines(curbuf, -1, -1, true, { line }) - end - - api.nvim_buf_set_lines(curbuf, -1, -1, true, { "" }) -end - -local function print_info_modules(parserlist, module) - local origbuf = api.nvim_get_current_buf() - api.nvim_command "enew" - local curbuf = api.nvim_get_current_buf() - - local modules - if module then - modules = namespace_modules { module } - else - modules = namespace_modules(configs.available_modules()) - end - - ---@type string[] - local namespaces = {} - for k, _ in pairs(modules) do - table.insert(namespaces, k) - end - table.sort(namespaces) - - table.sort(parserlist) - for _, namespace in ipairs(namespaces) do - append_module_table(curbuf, origbuf, parserlist, namespace, modules[namespace]) - end - - api.nvim_buf_set_option(curbuf, "modified", false) - api.nvim_buf_set_option(curbuf, "buftype", "nofile") - vim.cmd [[ - syntax match TSModuleInfoGood /✓/ - syntax match TSModuleInfoBad /✗/ - syntax match TSModuleInfoHeader /^>>.*$/ contains=TSModuleInfoNamespace - syntax match TSModuleInfoNamespace /^>> \w*/ contained - syntax match TSModuleInfoParser /^[^> ]*\ze / - ]] - - local highlights = { - TSModuleInfoGood = { fg = "LightGreen", bold = true, default = true }, - TSModuleInfoBad = { fg = "Crimson", default = true }, - TSModuleInfoHeader = { link = "Type", default = true }, - TSModuleInfoNamespace = { link = "Statement", default = true }, - TSModuleInfoParser = { link = "Identifier", default = true }, - } - for k, v in pairs(highlights) do - api.nvim_set_hl(0, k, v) - end -end - -local function module_info(module) - if module and not configs.get_module(module) then - return - end - - local parserlist = parsers.available_parsers() - if module then - print_info_modules(parserlist, module) - else - print_info_modules(parserlist) - end -end - ----@return string[] -function M.installed_parsers() - local installed = {} - for _, p in pairs(parsers.available_parsers()) do - if parsers.has_parser(p) then - table.insert(installed, p) - end - end - return installed -end - -M.commands = { - TSInstallInfo = { - run = install_info, - args = { - "-nargs=0", - }, - }, - TSModuleInfo = { - run = module_info, - args = { - "-nargs=?", - "-complete=custom,nvim_treesitter#available_modules", - }, - }, -} - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/install.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/install.lua deleted file mode 100644 index cd12dbb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/install.lua +++ /dev/null @@ -1,781 +0,0 @@ -local api = vim.api -local fn = vim.fn -local luv = vim.loop - -local utils = require "nvim-treesitter.utils" -local parsers = require "nvim-treesitter.parsers" -local info = require "nvim-treesitter.info" -local configs = require "nvim-treesitter.configs" -local shell = require "nvim-treesitter.shell_command_selectors" -local compat = require "nvim-treesitter.compat" - -local M = {} - ----@class LockfileInfo ----@field revision string - ----@type table -local lockfile = {} - -M.compilers = { vim.fn.getenv "CC", "cc", "gcc", "clang", "cl", "zig" } -M.prefer_git = fn.has "win32" == 1 -M.command_extra_args = {} -M.ts_generate_args = nil - -local started_commands = 0 -local finished_commands = 0 -local failed_commands = 0 -local complete_std_output = {} -local complete_error_output = {} - -local function reset_progress_counter() - if started_commands ~= finished_commands then - return - end - started_commands = 0 - finished_commands = 0 - failed_commands = 0 - complete_std_output = {} - complete_error_output = {} -end - -local function get_job_status() - return "[nvim-treesitter] [" - .. finished_commands - .. "/" - .. started_commands - .. (failed_commands > 0 and ", failed: " .. failed_commands or "") - .. "]" -end - ----@param lang string ----@return function -local function reattach_if_possible_fn(lang, error_on_fail) - return function() - for _, buf in ipairs(vim.api.nvim_list_bufs()) do - if parsers.get_buf_lang(buf) == lang then - vim._ts_remove_language(lang) - local ok, err - if vim.treesitter.language.add then - local ft = vim.bo[buf].filetype - ok, err = pcall(vim.treesitter.language.add, lang, { filetype = ft }) - else - ok, err = pcall(compat.require_language, lang) - end - if not ok and error_on_fail then - vim.notify("Could not load parser for " .. lang .. ": " .. vim.inspect(err)) - end - for _, mod in ipairs(require("nvim-treesitter.configs").available_modules()) do - if ok then - require("nvim-treesitter.configs").reattach_module(mod, buf, lang) - else - require("nvim-treesitter.configs").detach_module(mod, buf) - end - end - end - end - end -end - ----@param lang string ----@param validate boolean|nil ----@return InstallInfo -local function get_parser_install_info(lang, validate) - local parser_config = parsers.get_parser_configs()[lang] - - if not parser_config then - error('Parser not available for language "' .. lang .. '"') - end - - local install_info = parser_config.install_info - - if validate then - vim.validate { - url = { install_info.url, "string" }, - files = { install_info.files, "table" }, - } - end - - return install_info -end - -local function load_lockfile() - local filename = utils.join_path(utils.get_package_path(), "lockfile.json") - lockfile = vim.fn.filereadable(filename) == 1 and vim.fn.json_decode(vim.fn.readfile(filename)) or {} -end - -local function is_ignored_parser(lang) - return vim.tbl_contains(configs.get_ignored_parser_installs(), lang) -end - ----@param lang string ----@return string|nil -local function get_revision(lang) - if #lockfile == 0 then - load_lockfile() - end - - local install_info = get_parser_install_info(lang) - if install_info.revision then - return install_info.revision - end - - if lockfile[lang] then - return lockfile[lang].revision - end -end - ----@param lang string ----@return string|nil -local function get_installed_revision(lang) - local lang_file = utils.join_path(configs.get_parser_info_dir(), lang .. ".revision") - if vim.fn.filereadable(lang_file) == 1 then - return vim.fn.readfile(lang_file)[1] - end -end - --- Clean path for use in a prefix comparison ----@param input string ----@return string -local function clean_path(input) - local pth = vim.fn.fnamemodify(input, ":p") - if fn.has "win32" == 1 then - pth = pth:gsub("/", "\\") - end - return pth -end - --- Checks if parser is installed with nvim-treesitter ----@param lang string ----@return boolean -local function is_installed(lang) - local matched_parsers = vim.api.nvim_get_runtime_file("parser/" .. lang .. ".so", true) or {} - local install_dir = configs.get_parser_install_dir() - if not install_dir then - return false - end - install_dir = clean_path(install_dir) - for _, path in ipairs(matched_parsers) do - local abspath = clean_path(path) - if vim.startswith(abspath, install_dir) then - return true - end - end - return false -end - ----@param lang string ----@return boolean -local function needs_update(lang) - local revision = get_revision(lang) - return not revision or revision ~= get_installed_revision(lang) -end - ----@return string[] -local function outdated_parsers() - return vim.tbl_filter(function(lang) ---@param lang string - return is_installed(lang) and needs_update(lang) - end, info.installed_parsers()) -end - ----@param handle userdata ----@param is_stderr boolean -local function onread(handle, is_stderr) - return function(_, data) - if data then - if is_stderr then - complete_error_output[handle] = (complete_error_output[handle] or "") .. data - else - complete_std_output[handle] = (complete_std_output[handle] or "") .. data - end - end - end -end - -function M.iter_cmd(cmd_list, i, lang, success_message) - if i == 1 then - started_commands = started_commands + 1 - end - if i == #cmd_list + 1 then - finished_commands = finished_commands + 1 - return print(get_job_status() .. " " .. success_message) - end - - local attr = cmd_list[i] - if attr.info then - print(get_job_status() .. " " .. attr.info) - end - - if attr.opts and attr.opts.args and M.command_extra_args[attr.cmd] then - vim.list_extend(attr.opts.args, M.command_extra_args[attr.cmd]) - end - - if type(attr.cmd) == "function" then - local ok, err = pcall(attr.cmd) - if ok then - M.iter_cmd(cmd_list, i + 1, lang, success_message) - else - failed_commands = failed_commands + 1 - finished_commands = finished_commands + 1 - return api.nvim_err_writeln( - (attr.err or ("Failed to execute the following command:\n" .. vim.inspect(attr))) .. "\n" .. vim.inspect(err) - ) - end - else - local handle - local stdout = luv.new_pipe(false) - local stderr = luv.new_pipe(false) - attr.opts.stdio = { nil, stdout, stderr } - ---@type userdata - handle = luv.spawn( - attr.cmd, - attr.opts, - vim.schedule_wrap(function(code) - if code ~= 0 then - stdout:read_stop() - stderr:read_stop() - end - stdout:close() - stderr:close() - handle:close() - if code ~= 0 then - failed_commands = failed_commands + 1 - finished_commands = finished_commands + 1 - if complete_std_output[handle] and complete_std_output[handle] ~= "" then - print(complete_std_output[handle]) - end - - local err_msg = complete_error_output[handle] or "" - api.nvim_err_writeln( - "nvim-treesitter[" - .. lang - .. "]: " - .. (attr.err or ("Failed to execute the following command:\n" .. vim.inspect(attr))) - .. "\n" - .. err_msg - ) - return - end - M.iter_cmd(cmd_list, i + 1, lang, success_message) - end) - ) - luv.read_start(stdout, onread(handle, false)) - luv.read_start(stderr, onread(handle, true)) - end -end - ----@param cmd Command ----@return string command -local function get_command(cmd) - local options = "" - if cmd.opts and cmd.opts.args then - if M.command_extra_args[cmd.cmd] then - vim.list_extend(cmd.opts.args, M.command_extra_args[cmd.cmd]) - end - for _, opt in ipairs(cmd.opts.args) do - options = string.format("%s %s", options, opt) - end - end - - local command = string.format("%s %s", cmd.cmd, options) - if cmd.opts and cmd.opts.cwd then - command = shell.make_directory_change_for_command(cmd.opts.cwd, command) - end - return command -end - ----@param cmd_list Command[] ----@return boolean -local function iter_cmd_sync(cmd_list) - for _, cmd in ipairs(cmd_list) do - if cmd.info then - print(cmd.info) - end - - if type(cmd.cmd) == "function" then - cmd.cmd() - else - local ret = vim.fn.system(get_command(cmd)) - if vim.v.shell_error ~= 0 then - print(ret) - api.nvim_err_writeln( - (cmd.err and cmd.err .. "\n" or "") .. "Failed to execute the following command:\n" .. vim.inspect(cmd) - ) - return false - end - end - end - - return true -end - ----@param cache_folder string ----@param install_folder string ----@param lang string ----@param repo InstallInfo ----@param with_sync boolean ----@param generate_from_grammar boolean -local function run_install(cache_folder, install_folder, lang, repo, with_sync, generate_from_grammar) - parsers.reset_cache() - - local path_sep = utils.get_path_sep() - - local project_name = "tree-sitter-" .. lang - local maybe_local_path = vim.fn.expand(repo.url) - local from_local_path = vim.fn.isdirectory(maybe_local_path) == 1 - if from_local_path then - repo.url = maybe_local_path - end - - ---@type string compile_location only needed for typescript installs. - local compile_location - if from_local_path then - compile_location = repo.url - if repo.location then - compile_location = utils.join_path(compile_location, repo.location) - end - else - local repo_location = project_name - if repo.location then - repo_location = repo_location .. "/" .. repo.location - end - repo_location = repo_location:gsub("/", path_sep) - compile_location = utils.join_path(cache_folder, repo_location) - end - local parser_lib_name = utils.join_path(install_folder, lang) .. ".so" - - generate_from_grammar = repo.requires_generate_from_grammar or generate_from_grammar - - if generate_from_grammar and vim.fn.executable "tree-sitter" ~= 1 then - api.nvim_err_writeln "tree-sitter CLI not found: `tree-sitter` is not executable!" - if repo.requires_generate_from_grammar then - api.nvim_err_writeln( - "tree-sitter CLI is needed because `" - .. lang - .. "` is marked that it needs " - .. "to be generated from the grammar definitions to be compatible with nvim!" - ) - end - return - else - if not M.ts_generate_args then - local ts_cli_version = utils.ts_cli_version() - if ts_cli_version and vim.split(ts_cli_version, " ")[1] > "0.20.2" then - M.ts_generate_args = { "generate", "--no-bindings", "--abi", vim.treesitter.language_version } - else - M.ts_generate_args = { "generate", "--no-bindings" } - end - end - end - if generate_from_grammar and vim.fn.executable "node" ~= 1 then - api.nvim_err_writeln "Node JS not found: `node` is not executable!" - return - end - local cc = shell.select_executable(M.compilers) - if not cc then - api.nvim_err_writeln('No C compiler found! "' .. table.concat( - vim.tbl_filter(function(c) ---@param c string - return type(c) == "string" - end, M.compilers), - '", "' - ) .. '" are not executable.') - return - end - - local revision = repo.revision - if not revision then - revision = get_revision(lang) - end - - ---@class Command - ---@field cmd string - ---@field info string - ---@field err string - ---@field opts CmdOpts - - ---@class CmdOpts - ---@field args string[] - ---@field cwd string - - ---@type Command[] - local command_list = {} - if not from_local_path then - vim.list_extend(command_list, { shell.select_install_rm_cmd(cache_folder, project_name) }) - vim.list_extend( - command_list, - shell.select_download_commands(repo, project_name, cache_folder, revision, M.prefer_git) - ) - end - if generate_from_grammar then - if repo.generate_requires_npm then - if vim.fn.executable "npm" ~= 1 then - api.nvim_err_writeln("`" .. lang .. "` requires NPM to be installed from grammar.js") - return - end - vim.list_extend(command_list, { - { - cmd = "npm", - info = "Installing NPM dependencies of " .. lang .. " parser", - err = "Error during `npm install` (required for parser generation of " .. lang .. " with npm dependencies)", - opts = { - args = { "install" }, - cwd = compile_location, - }, - }, - }) - end - vim.list_extend(command_list, { - { - cmd = vim.fn.exepath "tree-sitter", - info = "Generating source files from grammar.js...", - err = 'Error during "tree-sitter generate"', - opts = { - args = M.ts_generate_args, - cwd = compile_location, - }, - }, - }) - end - vim.list_extend(command_list, { - shell.select_compile_command(repo, cc, compile_location), - shell.select_mv_cmd("parser.so", parser_lib_name, compile_location), - { - cmd = function() - vim.fn.writefile({ revision or "" }, utils.join_path(configs.get_parser_info_dir() or "", lang .. ".revision")) - end, - }, - { -- auto-attach modules after installation - cmd = reattach_if_possible_fn(lang, true), - }, - }) - if not from_local_path then - vim.list_extend(command_list, { shell.select_install_rm_cmd(cache_folder, project_name) }) - end - - if with_sync then - if iter_cmd_sync(command_list) == true then - print("Treesitter parser for " .. lang .. " has been installed") - end - else - M.iter_cmd(command_list, 1, lang, "Treesitter parser for " .. lang .. " has been installed") - end -end - ----@param lang string ----@param ask_reinstall boolean|string ----@param cache_folder string ----@param install_folder string ----@param with_sync boolean ----@param generate_from_grammar boolean -local function install_lang(lang, ask_reinstall, cache_folder, install_folder, with_sync, generate_from_grammar) - if is_installed(lang) and ask_reinstall ~= "force" then - if not ask_reinstall then - return - end - - local yesno = fn.input(lang .. " parser already available: would you like to reinstall ? y/n: ") - print "\n " - if not string.match(yesno, "^y.*") then - return - end - end - - local ok, install_info = pcall(get_parser_install_info, lang, true) - if not ok then - vim.notify("Installation not possible: " .. install_info, vim.log.levels.ERROR) - if not parsers.get_parser_configs()[lang] then - vim.notify( - "See https://github.com/nvim-treesitter/nvim-treesitter/#adding-parsers on how to add a new parser!", - vim.log.levels.INFO - ) - end - return - end - - run_install(cache_folder, install_folder, lang, install_info, with_sync, generate_from_grammar) -end - ----@class InstallOptions ----@field with_sync boolean ----@field ask_reinstall boolean|string ----@field generate_from_grammar boolean ----@field exclude_configured_parsers boolean - --- Install a parser ----@param options? InstallOptions ----@return function -local function install(options) - options = options or {} - local with_sync = options.with_sync - local ask_reinstall = options.ask_reinstall - local generate_from_grammar = options.generate_from_grammar - local exclude_configured_parsers = options.exclude_configured_parsers - - return function(...) - if fn.executable "git" == 0 then - return api.nvim_err_writeln "Git is required on your system to run this command" - end - - local cache_folder, err = utils.get_cache_dir() - if err then - return api.nvim_err_writeln(err) - end - assert(cache_folder) - - local install_folder - install_folder, err = configs.get_parser_install_dir() - if err then - return api.nvim_err_writeln(err) - end - install_folder = install_folder and clean_path(install_folder) - assert(install_folder) - - local languages ---@type string[] - local ask ---@type boolean|string - if ... == "all" then - languages = parsers.available_parsers() - ask = false - else - languages = compat.flatten { ... } - ask = ask_reinstall - end - - if exclude_configured_parsers then - languages = utils.difference(languages, configs.get_ignored_parser_installs()) - end - - if #languages > 1 then - reset_progress_counter() - end - - for _, lang in ipairs(languages) do - install_lang(lang, ask, cache_folder, install_folder, with_sync, generate_from_grammar) - end - end -end - -function M.setup_auto_install() - local function try_install_curr_lang() - local lang = parsers.get_buf_lang() - if parsers.get_parser_configs()[lang] and not is_installed(lang) and not is_ignored_parser(lang) then - install() { lang } - end - end - - try_install_curr_lang() - - vim.api.nvim_create_autocmd("FileType", { - pattern = { "*" }, - group = vim.api.nvim_create_augroup("NvimTreesitter-auto_install", { clear = true }), - callback = try_install_curr_lang, - }) -end - -function M.update(options) - options = options or {} - return function(...) - M.lockfile = {} - reset_progress_counter() - if ... and ... ~= "all" then - ---@type string[] - local languages = compat.flatten { ... } - local installed = 0 - for _, lang in ipairs(languages) do - if (not is_installed(lang)) or (needs_update(lang)) then - installed = installed + 1 - install { - ask_reinstall = "force", - with_sync = options.with_sync, - }(lang) - end - end - if installed == 0 then - utils.notify "Parsers are up-to-date!" - end - else - local parsers_to_update = outdated_parsers() or info.installed_parsers() - if #parsers_to_update == 0 then - utils.notify "All parsers are up-to-date!" - end - for _, lang in pairs(parsers_to_update) do - install { - ask_reinstall = "force", - exclude_configured_parsers = true, - with_sync = options.with_sync, - }(lang) - end - end - end -end - -function M.uninstall(...) - if vim.tbl_contains({ "all" }, ...) then - reset_progress_counter() - local installed = info.installed_parsers() - M.uninstall(installed) - elseif ... then - local ensure_installed_parsers = configs.get_ensure_installed_parsers() - if ensure_installed_parsers == "all" then - ensure_installed_parsers = parsers.available_parsers() - end - ensure_installed_parsers = utils.difference(ensure_installed_parsers, configs.get_ignored_parser_installs()) - - ---@type string[] - local languages = compat.flatten { ... } - for _, lang in ipairs(languages) do - local install_dir, err = configs.get_parser_install_dir() - if err then - return api.nvim_err_writeln(err) - end - install_dir = install_dir and clean_path(install_dir) - - if vim.tbl_contains(ensure_installed_parsers, lang) then - vim.notify( - "Uninstalling " - .. lang - .. '. But the parser is still configured in "ensure_installed" setting of nvim-treesitter.' - .. " Please consider updating your config!", - vim.log.levels.ERROR - ) - end - - local parser_lib = utils.join_path(install_dir, lang) .. ".so" - local all_parsers = vim.api.nvim_get_runtime_file("parser/" .. lang .. ".so", true) - if vim.fn.filereadable(parser_lib) == 1 then - local command_list = { - shell.select_rm_file_cmd(parser_lib, "Uninstalling parser for " .. lang), - { - cmd = function() - local all_parsers_after_deletion = vim.api.nvim_get_runtime_file("parser/" .. lang .. ".so", true) - if #all_parsers_after_deletion > 0 then - vim.notify( - "Tried to uninstall parser for " - .. lang - .. "! But the parser is still installed (not by nvim-treesitter):" - .. table.concat(all_parsers_after_deletion, ", "), - vim.log.levels.ERROR - ) - end - end, - }, - { -- auto-reattach or detach modules after uninstallation - cmd = reattach_if_possible_fn(lang, false), - }, - } - M.iter_cmd(command_list, 1, lang, "Treesitter parser for " .. lang .. " has been uninstalled") - elseif #all_parsers > 0 then - vim.notify( - "Parser for " - .. lang - .. " is installed! But not by nvim-treesitter! Please manually remove the following files: " - .. table.concat(all_parsers, ", "), - vim.log.levels.ERROR - ) - end - end - end -end - -function M.write_lockfile(verbose, skip_langs) - local sorted_parsers = {} ---@type Parser[] - -- Load previous lockfile - load_lockfile() - skip_langs = skip_langs or {} - - for k, v in pairs(parsers.get_parser_configs()) do - table.insert(sorted_parsers, { name = k, parser = v }) - end - - ---@param a Parser - ---@param b Parser - table.sort(sorted_parsers, function(a, b) - return a.name < b.name - end) - - for _, v in ipairs(sorted_parsers) do - if not vim.tbl_contains(skip_langs, v.name) then - -- I'm sure this can be done in aync way with iter_cmd - local sha ---@type string - if v.parser.install_info.branch then - sha = vim.split( - vim.fn.systemlist( - "git ls-remote " .. v.parser.install_info.url .. " | grep refs/heads/" .. v.parser.install_info.branch - )[1], - "\t" - )[1] - else - sha = vim.split(vim.fn.systemlist("git ls-remote " .. v.parser.install_info.url)[1], "\t")[1] - end - lockfile[v.name] = { revision = sha } - if verbose then - print(v.name .. ": " .. sha) - end - else - print("Skipping " .. v.name) - end - end - - if verbose then - print(vim.inspect(lockfile)) - end - vim.fn.writefile( - vim.fn.split(vim.fn.json_encode(lockfile), "\n"), - utils.join_path(utils.get_package_path(), "lockfile.json") - ) -end - -M.ensure_installed = install { exclude_configured_parsers = true } -M.ensure_installed_sync = install { with_sync = true, exclude_configured_parsers = true } - -M.commands = { - TSInstall = { - run = install { ask_reinstall = true }, - ["run!"] = install { ask_reinstall = "force" }, - args = { - "-nargs=+", - "-bang", - "-complete=custom,nvim_treesitter#installable_parsers", - }, - }, - TSInstallFromGrammar = { - run = install { generate_from_grammar = true, ask_reinstall = true }, - ["run!"] = install { generate_from_grammar = true, ask_reinstall = "force" }, - args = { - "-nargs=+", - "-bang", - "-complete=custom,nvim_treesitter#installable_parsers", - }, - }, - TSInstallSync = { - run = install { with_sync = true, ask_reinstall = true }, - ["run!"] = install { with_sync = true, ask_reinstall = "force" }, - args = { - "-nargs=+", - "-bang", - "-complete=custom,nvim_treesitter#installable_parsers", - }, - }, - TSUpdate = { - run = M.update {}, - args = { - "-nargs=*", - "-complete=custom,nvim_treesitter#installed_parsers", - }, - }, - TSUpdateSync = { - run = M.update { with_sync = true }, - args = { - "-nargs=*", - "-complete=custom,nvim_treesitter#installed_parsers", - }, - }, - TSUninstall = { - run = M.uninstall, - args = { - "-nargs=+", - "-complete=custom,nvim_treesitter#installed_parsers", - }, - }, -} - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/locals.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/locals.lua deleted file mode 100644 index fed835b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/locals.lua +++ /dev/null @@ -1,365 +0,0 @@ --- Functions to handle locals --- Locals are a generalization of definition and scopes --- its the way nvim-treesitter uses to "understand" the code - -local queries = require "nvim-treesitter.query" -local ts_utils = require "nvim-treesitter.ts_utils" -local ts = vim.treesitter -local api = vim.api - -local M = {} - -function M.collect_locals(bufnr) - return queries.collect_group_results(bufnr, "locals") -end - --- Iterates matches from a locals query file. --- @param bufnr the buffer --- @param root the root node -function M.iter_locals(bufnr, root) - return queries.iter_group_results(bufnr, "locals", root) -end - ----@param bufnr integer ----@return any -function M.get_locals(bufnr) - return queries.get_matches(bufnr, "locals") -end - --- Creates unique id for a node based on text and range ----@param scope TSNode: the scope node of the definition ----@param node_text string: the node text to use ----@return string: a string id -function M.get_definition_id(scope, node_text) - -- Add a valid starting character in case node text doesn't start with a valid one. - return table.concat({ "k", node_text or "", scope:range() }, "_") -end - -function M.get_definitions(bufnr) - local locals = M.get_locals(bufnr) - - local defs = {} - - for _, loc in ipairs(locals) do - if loc["local"]["definition"] then - table.insert(defs, loc["local"]["definition"]) - end - end - - return defs -end - -function M.get_scopes(bufnr) - local locals = M.get_locals(bufnr) - - local scopes = {} - - for _, loc in ipairs(locals) do - if loc["local"]["scope"] and loc["local"]["scope"].node then - table.insert(scopes, loc["local"]["scope"].node) - end - end - - return scopes -end - -function M.get_references(bufnr) - local locals = M.get_locals(bufnr) - - local refs = {} - - for _, loc in ipairs(locals) do - if loc["local"]["reference"] and loc["local"]["reference"].node then - table.insert(refs, loc["local"]["reference"].node) - end - end - - return refs -end - --- Gets a table with all the scopes containing a node --- The order is from most specific to least (bottom up) ----@param node TSNode ----@param bufnr integer ----@return TSNode[] -function M.get_scope_tree(node, bufnr) - local scopes = {} ---@type TSNode[] - - for scope in M.iter_scope_tree(node, bufnr) do - table.insert(scopes, scope) - end - - return scopes -end - --- Iterates over a nodes scopes moving from the bottom up ----@param node TSNode ----@param bufnr integer ----@return fun(): TSNode|nil -function M.iter_scope_tree(node, bufnr) - local last_node = node - return function() - if not last_node then - return - end - - local scope = M.containing_scope(last_node, bufnr, false) or ts_utils.get_root_for_node(node) - - last_node = scope:parent() - - return scope - end -end - --- Gets a table of all nodes and their 'kinds' from a locals list ----@param local_def any: the local list result ----@return table: a list of node entries -function M.get_local_nodes(local_def) - local result = {} - - M.recurse_local_nodes(local_def, function(def, _node, kind) - table.insert(result, vim.tbl_extend("keep", { kind = kind }, def)) - end) - - return result -end - --- Recurse locals results until a node is found. --- The accumulator function is given --- * The table of the node --- * The node --- * The full definition match `@definition.var.something` -> 'var.something' --- * The last definition match `@definition.var.something` -> 'something' ----@param local_def any The locals result ----@param accumulator function The accumulator function ----@param full_match? string The full match path to append to ----@param last_match? string The last match -function M.recurse_local_nodes(local_def, accumulator, full_match, last_match) - if type(local_def) ~= "table" then - return - end - - if local_def.node then - accumulator(local_def, local_def.node, full_match, last_match) - else - for match_key, def in pairs(local_def) do - M.recurse_local_nodes(def, accumulator, full_match and (full_match .. "." .. match_key) or match_key, match_key) - end - end -end - --- Get a single dimension table to look definition nodes. --- Keys are generated by using the range of the containing scope and the text of the definition node. --- This makes looking up a definition for a given scope a simple key lookup. --- --- This is memoized by buffer tick. If the function is called in succession --- without the buffer tick changing, then the previous result will be used --- since the syntax tree hasn't changed. --- --- Usage lookups require finding the definition of the node, so `find_definition` --- is called very frequently, which is why this lookup must be fast as possible. --- ----@param bufnr integer: the buffer ----@return table result: a table for looking up definitions -M.get_definitions_lookup_table = ts_utils.memoize_by_buf_tick(function(bufnr) - local definitions = M.get_definitions(bufnr) - local result = {} - - for _, definition in ipairs(definitions) do - for _, node_entry in ipairs(M.get_local_nodes(definition)) do - local scopes = M.get_definition_scopes(node_entry.node, bufnr, node_entry.scope) - -- Always use the highest valid scope - local scope = scopes[#scopes] - local node_text = ts.get_node_text(node_entry.node, bufnr) - local id = M.get_definition_id(scope, node_text) - - result[id] = node_entry - end - end - - return result -end) - --- Gets all the scopes of a definition based on the scope type --- Scope types can be --- --- "parent": Uses the parent of the containing scope, basically, skipping a scope --- "global": Uses the top most scope --- "local": Uses the containing scope of the definition. This is the default --- ----@param node TSNode: the definition node ----@param bufnr integer: the buffer ----@param scope_type string: the scope type -function M.get_definition_scopes(node, bufnr, scope_type) - local scopes = {} - local scope_count = 1 ---@type integer|nil - - -- Definition is valid for the containing scope - -- and the containing scope of that scope - if scope_type == "parent" then - scope_count = 2 - -- Definition is valid in all parent scopes - elseif scope_type == "global" then - scope_count = nil - end - - local i = 0 - for scope in M.iter_scope_tree(node, bufnr) do - table.insert(scopes, scope) - i = i + 1 - - if scope_count and i >= scope_count then - break - end - end - - return scopes -end - ----@param node TSNode ----@param bufnr integer ----@return TSNode node ----@return TSNode scope ----@return string|nil kind -function M.find_definition(node, bufnr) - local def_lookup = M.get_definitions_lookup_table(bufnr) - local node_text = ts.get_node_text(node, bufnr) - - for scope in M.iter_scope_tree(node, bufnr) do - local id = M.get_definition_id(scope, node_text) - - if def_lookup[id] then - local entry = def_lookup[id] - - return entry.node, scope, entry.kind - end - end - - return node, ts_utils.get_root_for_node(node), nil -end - --- Finds usages of a node in a given scope. ----@param node TSNode the node to find usages for ----@param scope_node TSNode the node to look within ----@return TSNode[]: a list of nodes -function M.find_usages(node, scope_node, bufnr) - bufnr = bufnr or api.nvim_get_current_buf() - local node_text = ts.get_node_text(node, bufnr) - - if not node_text or #node_text < 1 then - return {} - end - - local scope_node = scope_node or ts_utils.get_root_for_node(node) - local usages = {} - - for match in M.iter_locals(bufnr, scope_node) do - match = match["local"] - if match.reference and match.reference.node and ts.get_node_text(match.reference.node, bufnr) == node_text then - local def_node, _, kind = M.find_definition(match.reference.node, bufnr) - - if kind == nil or def_node == node then - table.insert(usages, match.reference.node) - end - end - end - - return usages -end - ----@param node TSNode ----@param bufnr? integer ----@param allow_scope? boolean ----@return TSNode|nil -function M.containing_scope(node, bufnr, allow_scope) - local bufnr = bufnr or api.nvim_get_current_buf() - local allow_scope = allow_scope == nil or allow_scope == true - - local scopes = M.get_scopes(bufnr) - if not node or not scopes then - return - end - - local iter_node = node - - while iter_node ~= nil and not vim.tbl_contains(scopes, iter_node) do - iter_node = iter_node:parent() - end - - return iter_node or (allow_scope and node or nil) -end - -function M.nested_scope(node, cursor_pos) - local bufnr = api.nvim_get_current_buf() - - local scopes = M.get_scopes(bufnr) - if not node or not scopes then - return - end - - local row = cursor_pos.row ---@type integer - local col = cursor_pos.col ---@type integer - local scope = M.containing_scope(node) - - for _, child in ipairs(ts_utils.get_named_children(scope)) do - local row_, col_ = child:start() - if vim.tbl_contains(scopes, child) and ((row_ + 1 == row and col_ > col) or row_ + 1 > row) then - return child - end - end -end - -function M.next_scope(node) - local bufnr = api.nvim_get_current_buf() - - local scopes = M.get_scopes(bufnr) - if not node or not scopes then - return - end - - local scope = M.containing_scope(node) - - local parent = scope:parent() - if not parent then - return - end - - local is_prev = true - for _, child in ipairs(ts_utils.get_named_children(parent)) do - if child == scope then - is_prev = false - elseif not is_prev and vim.tbl_contains(scopes, child) then - return child - end - end -end - ----@param node TSNode ----@return TSNode|nil -function M.previous_scope(node) - local bufnr = api.nvim_get_current_buf() - - local scopes = M.get_scopes(bufnr) - if not node or not scopes then - return - end - - local scope = M.containing_scope(node) - - local parent = scope:parent() - if not parent then - return - end - - local is_prev = true - local children = ts_utils.get_named_children(parent) - for i = #children, 1, -1 do - if children[i] == scope then - is_prev = false - elseif not is_prev and vim.tbl_contains(scopes, children[i]) then - return children[i] - end - end -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/parsers.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/parsers.lua deleted file mode 100644 index 31b6912..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/parsers.lua +++ /dev/null @@ -1,2844 +0,0 @@ -local api = vim.api -local ts = vim.treesitter - -for ft, lang in pairs { - automake = "make", - javascriptreact = "javascript", - ecma = "javascript", - jsx = "javascript", - gyp = "python", - html_tags = "html", - ["typescript.tsx"] = "tsx", - ["terraform-vars"] = "terraform", - ["html.handlebars"] = "glimmer", - systemverilog = "verilog", - dosini = "ini", - confini = "ini", - svg = "xml", - xsd = "xml", - xslt = "xml", - expect = "tcl", - mysql = "sql", - sbt = "scala", - neomuttrc = "muttrc", - clientscript = "runescript", - --- short-hand list from https://github.com/helix-editor/helix/blob/master/languages.toml - rs = "rust", - ex = "elixir", - js = "javascript", - ts = "typescript", - ["c-sharp"] = "csharp", - hs = "haskell", - py = "python", - erl = "erlang", - typ = "typst", - pl = "perl", - uxn = "uxntal", -} do - ts.language.register(lang, ft) -end - ----@class InstallInfo ----@field url string ----@field branch string|nil ----@field revision string|nil ----@field files string[] ----@field generate_requires_npm boolean|nil ----@field requires_generate_from_grammar boolean|nil ----@field location string|nil ----@field use_makefile boolean|nil ----@field cxx_standard string|nil - ----@class ParserInfo ----@field install_info InstallInfo ----@field filetype string ----@field maintainers string[] ----@field experimental boolean|nil ----@field readme_name string|nil - ----@type ParserInfo[] -local list = setmetatable({}, { - __newindex = function(table, parsername, parserconfig) - rawset(table, parsername, parserconfig) - if parserconfig.filetype or vim.fn.has "nvim-0.11" == 0 then - ts.language.register(parsername, parserconfig.filetype or parsername) - end - end, -}) - -list.ada = { - install_info = { - url = "https://github.com/briot/tree-sitter-ada", - files = { "src/parser.c" }, - }, - maintainers = { "@briot" }, -} - -list.agda = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-agda", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@Decodetalkers" }, -} - -list.angular = { - install_info = { - url = "https://github.com/dlvandenberg/tree-sitter-angular", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - filetype = "htmlangular", - maintainers = { "@dlvandenberg" }, - experimental = true, -} - -list.apex = { - install_info = { - url = "https://github.com/aheber/tree-sitter-sfapex", - files = { "src/parser.c" }, - location = "apex", - }, - maintainers = { "@aheber", "@xixiaofinland" }, -} - -list.arduino = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-arduino", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.asm = { - install_info = { - url = "https://github.com/RubixDev/tree-sitter-asm", - files = { "src/parser.c" }, - }, - maintainers = { "@RubixDev" }, -} - -list.astro = { - install_info = { - url = "https://github.com/virchau13/tree-sitter-astro", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@virchau13" }, -} - -list.authzed = { - install_info = { - url = "https://github.com/mleonidas/tree-sitter-authzed", - files = { "src/parser.c" }, - }, - maintainers = { "@mattpolzin" }, -} - -list.awk = { - install_info = { - url = "https://github.com/Beaglefoot/tree-sitter-awk", - files = { "src/parser.c", "src/scanner.c" }, - }, -} - -list.bash = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-bash", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "sh", - maintainers = { "@TravonteD" }, -} - -list.bass = { - install_info = { - url = "https://github.com/vito/tree-sitter-bass", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.beancount = { - install_info = { - url = "https://github.com/polarmutex/tree-sitter-beancount", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@polarmutex" }, -} - -list.bibtex = { - install_info = { - url = "https://github.com/latex-lsp/tree-sitter-bibtex", - files = { "src/parser.c" }, - }, - filetype = "bib", - maintainers = { "@theHamsta", "@clason" }, -} - -list.bicep = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-bicep", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.bitbake = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-bitbake", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.blade = { - install_info = { - url = "https://github.com/EmranMR/tree-sitter-blade", - files = { "src/parser.c" }, - }, - maintainers = { "@calebdw" }, -} - -list.blueprint = { - install_info = { - url = "https://gitlab.com/gabmus/tree-sitter-blueprint.git", - files = { "src/parser.c" }, - }, - maintainers = { "@gabmus" }, - experimental = true, -} - -list.bp = { - install_info = { - url = "https://github.com/ambroisie/tree-sitter-bp", - files = { "src/parser.c" }, - }, - maintainers = { "@ambroisie" }, -} - -list.brightscript = { - install_info = { - url = "https://github.com/ajdelcimmuto/tree-sitter-brightscript", - files = { "src/parser.c" }, - }, - maintainers = { "@ajdelcimmuto" }, -} - -list.c = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-c", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.c_sharp = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-c-sharp", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "cs", - maintainers = { "@amaanq" }, -} - -list.caddy = { - install_info = { - url = "https://github.com/opa-oz/tree-sitter-caddy", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@opa-oz" }, -} - -list.cairo = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-cairo", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.capnp = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-capnp", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.chatito = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-chatito", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.circom = { - install_info = { - url = "https://github.com/Decurity/tree-sitter-circom", - files = { "src/parser.c" }, - }, - maintainers = { "@alexandr-martirosyan" }, -} - -list.clojure = { - install_info = { - url = "https://github.com/sogaiu/tree-sitter-clojure", - files = { "src/parser.c" }, - }, - maintainers = { "@NoahTheDuke" }, -} - -list.cmake = { - install_info = { - url = "https://github.com/uyha/tree-sitter-cmake", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@uyha" }, -} - -list.comment = { - install_info = { - url = "https://github.com/stsewd/tree-sitter-comment", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@stsewd" }, -} - -list.commonlisp = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-commonlisp", - files = { "src/parser.c" }, - generate_requires_npm = true, - }, - filetype = "lisp", - maintainers = { "@theHamsta" }, -} - -list.cooklang = { - install_info = { - url = "https://github.com/addcninblue/tree-sitter-cooklang", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@addcninblue" }, - filetype = "cook", -} - -list.corn = { - install_info = { - url = "https://github.com/jakestanger/tree-sitter-corn", - files = { "src/parser.c" }, - }, - maintainers = { "@jakestanger" }, -} - -list.cpon = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-cpon", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.cpp = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-cpp", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@theHamsta" }, -} - -list.css = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-css", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@TravonteD" }, -} - -list.csv = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-csv", - files = { "src/parser.c" }, - location = "csv", - }, - maintainers = { "@amaanq" }, -} - -list.cuda = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-cuda", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@theHamsta" }, -} - -list.cue = { - install_info = { - url = "https://github.com/eonpatapon/tree-sitter-cue", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.cylc = { - install_info = { - url = "https://github.com/elliotfontaine/tree-sitter-cylc", - files = { "src/parser.c" }, - }, - maintainers = { "@elliotfontaine" }, -} - -list.d = { - install_info = { - url = "https://github.com/gdamore/tree-sitter-d", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.dart = { - install_info = { - url = "https://github.com/UserNobody14/tree-sitter-dart", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@akinsho" }, -} - -list.desktop = { - install_info = { - url = "https://github.com/ValdezFOmar/tree-sitter-desktop", - files = { "src/parser.c" }, - }, - maintainers = { "@ValdezFOmar" }, -} - -list.devicetree = { - install_info = { - url = "https://github.com/joelspadin/tree-sitter-devicetree", - files = { "src/parser.c" }, - }, - filetype = "dts", - maintainers = { "@jedrzejboczar" }, -} - -list.dhall = { - install_info = { - url = "https://github.com/jbellerb/tree-sitter-dhall", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.diff = { - install_info = { - url = "https://github.com/the-mikedavis/tree-sitter-diff", - files = { "src/parser.c" }, - }, - filetype = "gitdiff", - maintainers = { "@gbprod" }, -} - -list.disassembly = { - install_info = { - url = "https://github.com/ColinKennedy/tree-sitter-disassembly", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ColinKennedy" }, -} - -list.djot = { - install_info = { - url = "https://github.com/treeman/tree-sitter-djot", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@NoahTheDuke" }, -} - -list.dockerfile = { - install_info = { - url = "https://github.com/camdencheek/tree-sitter-dockerfile", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@camdencheek" }, -} - -list.dot = { - install_info = { - url = "https://github.com/rydesun/tree-sitter-dot", - files = { "src/parser.c" }, - }, - maintainers = { "@rydesun" }, -} - -list.doxygen = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-doxygen", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.dtd = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-xml", - files = { "src/parser.c", "src/scanner.c" }, - location = "dtd", - }, - maintainers = { "@ObserverOfTime" }, -} - -list.earthfile = { - install_info = { - url = "https://github.com/glehmann/tree-sitter-earthfile", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@glehmann" }, -} - -list.ebnf = { - install_info = { - url = "https://github.com/RubixDev/ebnf", - files = { "src/parser.c" }, - location = "crates/tree-sitter-ebnf", - }, - maintainers = { "@RubixDev" }, - experimental = true, -} - -list.editorconfig = { - install_info = { - url = "https://github.com/ValdezFOmar/tree-sitter-editorconfig", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ValdezFOmar" }, -} - -list.eds = { - install_info = { - url = "https://github.com/uyha/tree-sitter-eds", - files = { "src/parser.c" }, - }, - maintainers = { "@uyha" }, -} - -list.eex = { - install_info = { - url = "https://github.com/connorlay/tree-sitter-eex", - files = { "src/parser.c" }, - }, - filetype = "eelixir", - maintainers = { "@connorlay" }, -} - -list.elixir = { - install_info = { - url = "https://github.com/elixir-lang/tree-sitter-elixir", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@connorlay" }, -} - -list.elm = { - install_info = { - url = "https://github.com/elm-tooling/tree-sitter-elm", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@zweimach" }, -} - -list.elsa = { - install_info = { - url = "https://github.com/glapa-grossklag/tree-sitter-elsa", - files = { "src/parser.c" }, - }, - maintainers = { "@glapa-grossklag", "@amaanq" }, -} - -list.elvish = { - install_info = { - url = "https://github.com/elves/tree-sitter-elvish", - files = { "src/parser.c" }, - }, - maintainers = { "@elves" }, -} - -list.embedded_template = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-embedded-template", - files = { "src/parser.c" }, - }, - filetype = "eruby", -} - -list.enforce = { - install_info = { - url = "https://github.com/simonvic/tree-sitter-enforce", - files = { "src/parser.c" }, - }, - maintainers = { "@simonvic" }, -} - -list.erlang = { - install_info = { - url = "https://github.com/WhatsApp/tree-sitter-erlang", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@filmor" }, -} - -list.facility = { - install_info = { - url = "https://github.com/FacilityApi/tree-sitter-facility", - files = { "src/parser.c" }, - }, - filetype = "fsd", - maintainers = { "@bryankenote" }, -} - -list.faust = { - install_info = { - url = "https://github.com/khiner/tree-sitter-faust", - files = { "src/parser.c" }, - }, - filetype = "dsp", - maintainers = { "@khiner" }, -} - -list.fennel = { - install_info = { - url = "https://github.com/alexmozaidze/tree-sitter-fennel", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@alexmozaidze" }, -} - -list.fidl = { - install_info = { - url = "https://github.com/google/tree-sitter-fidl", - files = { "src/parser.c" }, - }, - maintainers = { "@chaopeng" }, -} - -list.firrtl = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-firrtl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.fish = { - install_info = { - url = "https://github.com/ram02z/tree-sitter-fish", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ram02z" }, -} - -list.foam = { - install_info = { - url = "https://github.com/FoamScience/tree-sitter-foam", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@FoamScience" }, - -- Queries might change over time on the grammar's side - -- Otherwise everything runs fine - experimental = true, -} - -list.forth = { - install_info = { - url = "https://github.com/AlexanderBrevig/tree-sitter-forth", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.fortran = { - install_info = { - url = "https://github.com/stadelmanma/tree-sitter-fortran", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.fsh = { - install_info = { - url = "https://github.com/mgramigna/tree-sitter-fsh", - files = { "src/parser.c" }, - }, - maintainers = { "@mgramigna" }, -} - -list.fsharp = { - install_info = { - url = "https://github.com/ionide/tree-sitter-fsharp", - files = { "src/parser.c", "src/scanner.c" }, - location = "fsharp", - }, - maintainers = { "@nsidorenco" }, -} - -list.func = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-func", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.fusion = { - install_info = { - url = "https://gitlab.com/jirgn/tree-sitter-fusion.git", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@jirgn" }, -} - -list.gap = { - install_info = { - url = "https://github.com/gap-system/tree-sitter-gap", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@reiniscirpons" }, - readme_name = "GAP system", -} - -list.gaptst = { - install_info = { - url = "https://github.com/gap-system/tree-sitter-gaptst", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@reiniscirpons" }, - readme_name = "GAP system test files", -} - -list.gdscript = { - install_info = { - url = "https://github.com/PrestonKnopp/tree-sitter-gdscript", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@PrestonKnopp" }, - readme_name = "Godot (gdscript)", -} - -list.gdshader = { - install_info = { - url = "https://github.com/GodOfAvacyn/tree-sitter-gdshader", - files = { "src/parser.c" }, - }, - filetype = "gdshaderinc", - maintainers = { "@godofavacyn" }, -} - -list.git_rebase = { - install_info = { - url = "https://github.com/the-mikedavis/tree-sitter-git-rebase", - files = { "src/parser.c" }, - }, - filetype = "gitrebase", - maintainers = { "@gbprod" }, -} - -list.gitattributes = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-gitattributes", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.gitcommit = { - install_info = { - url = "https://github.com/gbprod/tree-sitter-gitcommit", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@gbprod" }, -} - -list.git_config = { - install_info = { - url = "https://github.com/the-mikedavis/tree-sitter-git-config", - files = { "src/parser.c" }, - }, - filetype = "gitconfig", - maintainers = { "@amaanq" }, - readme_name = "git_config", -} - -list.gitignore = { - install_info = { - url = "https://github.com/shunsambongi/tree-sitter-gitignore", - files = { "src/parser.c" }, - }, - maintainers = { "@theHamsta" }, -} - -list.gleam = { - install_info = { - url = "https://github.com/gleam-lang/tree-sitter-gleam", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.glimmer = { - install_info = { - url = "https://github.com/ember-tooling/tree-sitter-glimmer", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "handlebars", - maintainers = { "@NullVoxPopuli" }, - readme_name = "Glimmer and Ember", -} - -list.glimmer_javascript = { - install_info = { - url = "https://github.com/NullVoxPopuli/tree-sitter-glimmer-javascript", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - filetype = "javascript.glimmer", - maintainers = { "@NullVoxPopuli" }, -} - -list.glimmer_typescript = { - install_info = { - url = "https://github.com/NullVoxPopuli/tree-sitter-glimmer-typescript", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - filetype = "typescript.glimmer", - maintainers = { "@NullVoxPopuli" }, -} - -list.glsl = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-glsl", - files = { "src/parser.c" }, - generate_requires_npm = true, - }, - maintainers = { "@theHamsta" }, -} - -list.gn = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-gn", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, - readme_name = "GN (Generate Ninja)", -} - -list.gnuplot = { - install_info = { - url = "https://github.com/dpezto/tree-sitter-gnuplot", - files = { "src/parser.c" }, - }, - maintainers = { "@dpezto" }, -} - -list.go = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-go", - files = { "src/parser.c" }, - }, - maintainers = { "@theHamsta", "@WinWisely268" }, -} - -list.goctl = { - install_info = { - url = "https://github.com/chaozwn/tree-sitter-goctl", - files = { "src/parser.c" }, - }, - maintainers = { "@chaozwn" }, -} - -list.godot_resource = { - install_info = { - url = "https://github.com/PrestonKnopp/tree-sitter-godot-resource", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "gdresource", - maintainers = { "@pierpo" }, - readme_name = "Godot Resources (gdresource)", -} - -list.gomod = { - install_info = { - url = "https://github.com/camdencheek/tree-sitter-go-mod", - files = { "src/parser.c" }, - }, - maintainers = { "@camdencheek" }, -} - -list.gosum = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-go-sum", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.gowork = { - install_info = { - url = "https://github.com/omertuc/tree-sitter-go-work", - files = { "src/parser.c" }, - }, - maintainers = { "@omertuc" }, -} - -list.gotmpl = { - install_info = { - url = "https://github.com/ngalaiko/tree-sitter-go-template", - files = { "src/parser.c" }, - }, - maintainers = { "@qvalentin" }, -} - -list.gpg = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-gpg-config", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.gren = { - install_info = { - files = { "src/parser.c", "src/scanner.c" }, - url = "https://github.com/MaeBrooks/tree-sitter-gren", - }, - maintainers = { "@MaeBrooks" }, -} - -list.groovy = { - install_info = { - url = "https://github.com/murtaza64/tree-sitter-groovy", - files = { "src/parser.c" }, - }, - maintainers = { "@murtaza64" }, -} - -list.graphql = { - install_info = { - url = "https://github.com/bkegley/tree-sitter-graphql", - files = { "src/parser.c" }, - }, - maintainers = { "@bkegley" }, -} - -list.gstlaunch = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-gstlaunch", - files = { "src/parser.c" }, - }, - maintainers = { "@theHamsta" }, -} - -list.hack = { - install_info = { - url = "https://github.com/slackhq/tree-sitter-hack", - files = { "src/parser.c", "src/scanner.c" }, - }, -} - -list.hare = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-hare", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.haskell = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-haskell", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@mrcjkb" }, -} - -list.haskell_persistent = { - install_info = { - url = "https://github.com/MercuryTechnologies/tree-sitter-haskell-persistent", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "haskellpersistent", - maintainers = { "@lykahb" }, -} - -list.hcl = { - install_info = { - url = "https://github.com/MichaHoffmann/tree-sitter-hcl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@MichaHoffmann" }, -} - -list.heex = { - install_info = { - url = "https://github.com/connorlay/tree-sitter-heex", - files = { "src/parser.c" }, - }, - maintainers = { "@connorlay" }, -} - -list.helm = { - install_info = { - url = "https://github.com/ngalaiko/tree-sitter-go-template", - location = "dialects/helm", - files = { "src/parser.c" }, - }, - maintainers = { "@qvalentin" }, -} - -list.hjson = { - install_info = { - url = "https://github.com/winston0410/tree-sitter-hjson", - files = { "src/parser.c" }, - generate_requires_npm = true, - }, - maintainers = { "@winston0410" }, -} - -list.hlsl = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-hlsl", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@theHamsta" }, -} - -list.hocon = { - install_info = { - url = "https://github.com/antosha417/tree-sitter-hocon", - files = { "src/parser.c" }, - generate_requires_npm = true, - }, - maintainers = { "@antosha417" }, -} - -list.hoon = { - install_info = { - url = "https://github.com/urbit-pilled/tree-sitter-hoon", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@urbit-pilled" }, - experimental = true, -} - -list.html = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-html", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@TravonteD" }, -} - -list.htmldjango = { - install_info = { - url = "https://github.com/interdependence/tree-sitter-htmldjango", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, - experimental = true, -} - -list.http = { - install_info = { - url = "https://github.com/rest-nvim/tree-sitter-http", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq", "@NTBBloodbath" }, -} - -list.hurl = { - install_info = { - url = "https://github.com/pfeiferj/tree-sitter-hurl", - files = { "src/parser.c" }, - }, - maintainers = { "@pfeiferj" }, -} - -list.hyprlang = { - install_info = { - url = "https://github.com/luckasRanarison/tree-sitter-hyprlang", - files = { "src/parser.c" }, - }, - maintainers = { "@luckasRanarison" }, -} - -list.idl = { - install_info = { - url = "https://github.com/cathaysia/tree-sitter-idl", - files = { "src/parser.c" }, - }, - maintainers = { "@cathaysia" }, -} - -list.idris = { - install_info = { - url = "https://github.com/kayhide/tree-sitter-idris", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "idris2", - maintainers = { "@srghma" }, -} - -list.ini = { - install_info = { - url = "https://github.com/justinmk/tree-sitter-ini", - files = { "src/parser.c" }, - }, - maintainers = { "@theHamsta" }, - experimental = true, -} - -list.inko = { - install_info = { - url = "https://github.com/inko-lang/tree-sitter-inko", - files = { "src/parser.c" }, - }, - maintainers = { "@yorickpeterse" }, -} - -list.ipkg = { - install_info = { - url = "https://github.com/srghma/tree-sitter-ipkg", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@srghma" }, -} - -list.ispc = { - install_info = { - url = "https://github.com/fab4100/tree-sitter-ispc", - files = { "src/parser.c" }, - generate_requires_npm = true, - }, - maintainers = { "@fab4100" }, -} - -list.janet_simple = { - install_info = { - url = "https://github.com/sogaiu/tree-sitter-janet-simple", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "janet", - maintainers = { "@sogaiu" }, -} - -list.java = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-java", - files = { "src/parser.c" }, - }, - maintainers = { "@p00f" }, -} - -list.javadoc = { - install_info = { - url = "https://github.com/rmuir/tree-sitter-javadoc", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@rmuir" }, -} - -list.javascript = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-javascript", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@steelsojka" }, -} - -list.jinja = { - install_info = { - url = "https://github.com/cathaysia/tree-sitter-jinja", - location = "tree-sitter-jinja", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@cathaysia" }, -} - -list.jinja_inline = { - install_info = { - url = "https://github.com/cathaysia/tree-sitter-jinja", - location = "tree-sitter-jinja_inline", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@cathaysia" }, -} - -list.jq = { - install_info = { - url = "https://github.com/flurie/tree-sitter-jq", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.jsdoc = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-jsdoc", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@steelsojka" }, -} - -list.json = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-json", - files = { "src/parser.c" }, - }, - maintainers = { "@steelsojka" }, -} - -list.json5 = { - install_info = { - url = "https://github.com/Joakker/tree-sitter-json5", - files = { "src/parser.c" }, - }, - maintainers = { "@Joakker" }, -} - -list.jsonc = { - install_info = { - url = "https://gitlab.com/WhyNotHugo/tree-sitter-jsonc.git", - files = { "src/parser.c" }, - generate_requires_npm = true, - }, - maintainers = { "@WhyNotHugo" }, - readme_name = "JSON with comments", -} - -list.jsonnet = { - install_info = { - url = "https://github.com/sourcegraph/tree-sitter-jsonnet", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@nawordar" }, -} - -list.julia = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-julia", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@fredrikekre" }, -} - -list.just = { - install_info = { - url = "https://github.com/IndianBoy42/tree-sitter-just", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@Hubro" }, -} - -list.kcl = { - install_info = { - url = "https://github.com/kcl-lang/tree-sitter-kcl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@bertbaron" }, -} - -list.kconfig = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-kconfig", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.kdl = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-kdl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.kotlin = { - install_info = { - url = "https://github.com/fwcd/tree-sitter-kotlin", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@SalBakraa" }, -} - -list.koto = { - install_info = { - url = "https://github.com/koto-lang/tree-sitter-koto", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@irh" }, -} - -list.kusto = { - install_info = { - url = "https://github.com/Willem-J-an/tree-sitter-kusto", - files = { "src/parser.c" }, - }, - maintainers = { "@Willem-J-an" }, -} - -list.lalrpop = { - install_info = { - url = "https://github.com/traxys/tree-sitter-lalrpop", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@traxys" }, -} - -list.latex = { - install_info = { - url = "https://github.com/latex-lsp/tree-sitter-latex", - files = { "src/parser.c", "src/scanner.c" }, - requires_generate_from_grammar = true, - }, - filetype = "tex", - maintainers = { "@theHamsta", "@clason" }, -} - -list.ledger = { - install_info = { - url = "https://github.com/cbarrete/tree-sitter-ledger", - files = { "src/parser.c" }, - }, - maintainers = { "@cbarrete" }, -} - -list.leo = { - install_info = { - url = "https://github.com/r001/tree-sitter-leo", - files = { "src/parser.c" }, - }, - maintainers = { "@r001" }, -} - -list.llvm = { - install_info = { - url = "https://github.com/benwilliamgraham/tree-sitter-llvm", - files = { "src/parser.c" }, - }, - maintainers = { "@benwilliamgraham" }, -} - -list.linkerscript = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-linkerscript", - files = { "src/parser.c" }, - }, - filetype = "ld", - maintainers = { "@amaanq" }, -} - -list.liquid = { - install_info = { - url = "https://github.com/hankthetank27/tree-sitter-liquid", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@hankthetank27" }, -} - -list.liquidsoap = { - install_info = { - url = "https://github.com/savonet/tree-sitter-liquidsoap", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@toots" }, -} - -list.lua = { - install_info = { - url = "https://github.com/MunifTanjim/tree-sitter-lua", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@muniftanjim" }, -} - -list.luadoc = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-luadoc", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.luap = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-luap", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, - readme_name = "lua patterns", -} - -list.luau = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-luau", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.hlsplaylist = { - install_info = { - url = "https://github.com/Freed-Wu/tree-sitter-hlsplaylist", - files = { "src/parser.c" }, - }, - maintainers = { "@Freed-Wu" }, -} - -list.m68k = { - install_info = { - url = "https://github.com/grahambates/tree-sitter-m68k", - files = { "src/parser.c" }, - }, - filetype = "asm68k", - maintainers = { "@grahambates" }, -} - -list.make = { - install_info = { - url = "https://github.com/alemuller/tree-sitter-make", - files = { "src/parser.c" }, - }, - maintainers = { "@lewis6991" }, -} - -list.markdown = { - install_info = { - url = "https://github.com/MDeiml/tree-sitter-markdown", - location = "tree-sitter-markdown", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@MDeiml" }, - readme_name = "markdown (basic highlighting)", - experimental = true, -} - -list.markdown_inline = { - install_info = { - url = "https://github.com/MDeiml/tree-sitter-markdown", - location = "tree-sitter-markdown-inline", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@MDeiml" }, - readme_name = "markdown_inline (needed for full highlighting)", - experimental = true, -} - -list.matlab = { - install_info = { - url = "https://github.com/acristoffers/tree-sitter-matlab", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@acristoffers" }, -} - -list.menhir = { - install_info = { - url = "https://github.com/Kerl13/tree-sitter-menhir", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@Kerl13" }, -} - -list.mermaid = { - install_info = { - url = "https://github.com/monaqa/tree-sitter-mermaid", - files = { "src/parser.c" }, - }, - experimental = true, -} - -list.meson = { - install_info = { - url = "https://github.com/Decodetalkers/tree-sitter-meson", - files = { "src/parser.c" }, - }, - maintainers = { "@Decodetalkers" }, -} - -list.mlir = { - install_info = { - url = "https://github.com/artagnon/tree-sitter-mlir", - files = { "src/parser.c" }, - requires_generate_from_grammar = true, - }, - experimental = true, - maintainers = { "@artagnon" }, -} - -list.muttrc = { - install_info = { - url = "https://github.com/neomutt/tree-sitter-muttrc", - files = { "src/parser.c" }, - }, - maintainers = { "@Freed-Wu" }, -} - -list.nasm = { - install_info = { - url = "https://github.com/naclsn/tree-sitter-nasm", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.nginx = { - install_info = { - url = "https://github.com/opa-oz/tree-sitter-nginx", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@opa-oz" }, -} - -list.nickel = { - install_info = { - url = "https://github.com/nickel-lang/tree-sitter-nickel", - files = { "src/parser.c", "src/scanner.c" }, - }, -} - -list.nim = { - install_info = { - url = "https://github.com/alaviss/tree-sitter-nim", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@aMOPel" }, -} - -list.nim_format_string = { - install_info = { - url = "https://github.com/aMOPel/tree-sitter-nim-format-string", - files = { "src/parser.c" }, - }, - maintainers = { "@aMOPel" }, -} - -list.ninja = { - install_info = { - url = "https://github.com/alemuller/tree-sitter-ninja", - files = { "src/parser.c" }, - }, - maintainers = { "@alemuller" }, -} - -list.nix = { - install_info = { - url = "https://github.com/cstrahan/tree-sitter-nix", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@leo60228" }, -} - -list.norg = { - install_info = { - url = "https://github.com/nvim-neorg/tree-sitter-norg", - files = { "src/parser.c", "src/scanner.cc" }, - cxx_standard = "c++14", - use_makefile = true, - }, - maintainers = { "@JoeyGrajciar", "@vhyrro" }, -} - -list.nqc = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-nqc", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.nu = { - install_info = { - url = "https://github.com/nushell/tree-sitter-nu", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@abhisheksingh0x558" }, -} - -list.objc = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-objc", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.objdump = { - install_info = { - url = "https://github.com/ColinKennedy/tree-sitter-objdump", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ColinKennedy" }, -} - -list.ocaml = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-ocaml", - files = { "src/parser.c", "src/scanner.c" }, - location = "grammars/ocaml", - }, - maintainers = { "@undu" }, -} - -list.ocaml_interface = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-ocaml", - files = { "src/parser.c", "src/scanner.c" }, - location = "grammars/interface", - }, - filetype = "ocamlinterface", - maintainers = { "@undu" }, -} - -list.ocamllex = { - install_info = { - url = "https://github.com/atom-ocaml/tree-sitter-ocamllex", - files = { "src/parser.c", "src/scanner.c" }, - requires_generate_from_grammar = true, - }, - maintainers = { "@undu" }, -} - -list.odin = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-odin", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.pascal = { - install_info = { - url = "https://github.com/Isopod/tree-sitter-pascal", - files = { "src/parser.c" }, - }, - maintainers = { "@Isopod" }, -} - -list.passwd = { - install_info = { - url = "https://github.com/ath3/tree-sitter-passwd", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.pem = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-pem", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.perl = { - install_info = { - url = "https://github.com/tree-sitter-perl/tree-sitter-perl", - files = { "src/parser.c", "src/scanner.c" }, - branch = "release", - }, - maintainers = { "@RabbiVeesh", "@LeoNerd" }, -} - -list.php = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-php", - location = "php", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@tk-shirasaka", "@calebdw" }, -} - -list.php_only = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-php", - location = "php_only", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@tk-shirasaka", "@calebdw" }, -} - --- Parsers for injections -list.phpdoc = { - install_info = { - url = "https://github.com/claytonrcarter/tree-sitter-phpdoc", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@mikehaertl" }, - experimental = true, -} - -list.pioasm = { - install_info = { - url = "https://github.com/leo60228/tree-sitter-pioasm", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@leo60228" }, -} - -list.po = { - install_info = { - url = "https://github.com/erasin/tree-sitter-po", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.pod = { - install_info = { - url = "https://github.com/tree-sitter-perl/tree-sitter-pod", - files = { "src/parser.c", "src/scanner.c" }, - branch = "release", - }, - maintainers = { "@RabbiVeesh", "@LeoNerd" }, -} - -list.poe_filter = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-poe-filter", - files = { "src/parser.c" }, - }, - filetype = "poefilter", - maintainers = { "@ObserverOfTime" }, - readme_name = "Path of Exile item filter", - experimental = true, -} - -list.pony = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-pony", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq", "@mfelsche" }, -} - -list.powershell = { - install_info = { - url = "https://github.com/airbus-cert/tree-sitter-powershell", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "ps1", - maintainers = { "@L2jLiga" }, -} - -list.printf = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-printf", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.prisma = { - install_info = { - url = "https://github.com/victorhqc/tree-sitter-prisma", - files = { "src/parser.c" }, - }, - maintainers = { "@elianiva" }, -} - -list.problog = { - install_info = { - url = "https://github.com/foxyseta/tree-sitter-prolog", - files = { "src/parser.c" }, - location = "grammars/problog", - }, - maintainers = { "@foxyseta" }, -} - -list.prolog = { - install_info = { - url = "https://github.com/foxyseta/tree-sitter-prolog", - files = { "src/parser.c" }, - location = "grammars/prolog", - }, - maintainers = { "@foxyseta" }, -} - -list.promql = { - install_info = { - url = "https://github.com/MichaHoffmann/tree-sitter-promql", - files = { "src/parser.c" }, - experimental = true, - }, - maintainers = { "@MichaHoffmann" }, -} - -list.properties = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-properties", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "jproperties", - maintainers = { "@ObserverOfTime" }, -} - -list.proto = { - install_info = { - url = "https://github.com/treywood/tree-sitter-proto", - files = { "src/parser.c" }, - }, - maintainers = { "@treywood" }, -} - -list.prql = { - install_info = { - url = "https://github.com/PRQL/tree-sitter-prql", - files = { "src/parser.c" }, - }, - maintainers = { "@matthias-Q" }, -} - -list.psv = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-csv", - files = { "src/parser.c" }, - location = "psv", - }, - maintainers = { "@amaanq" }, -} - -list.pug = { - install_info = { - url = "https://github.com/zealot128/tree-sitter-pug", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@zealot128" }, - experimental = true, -} - -list.puppet = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-puppet", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.purescript = { - install_info = { - url = "https://github.com/postsolar/tree-sitter-purescript", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@postsolar" }, -} - -list.pymanifest = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-pymanifest", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, - readme_name = "PyPA manifest", -} - -list.python = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-python", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@stsewd", "@theHamsta" }, -} - -list.ql = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-ql", - files = { "src/parser.c" }, - }, - maintainers = { "@pwntester" }, -} - -list.qmldir = { - install_info = { - url = "https://github.com/Decodetalkers/tree-sitter-qmldir", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.qmljs = { - install_info = { - url = "https://github.com/yuja/tree-sitter-qmljs", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "qml", - maintainers = { "@Decodetalkers" }, -} - -list.query = { - install_info = { - url = "https://github.com/nvim-treesitter/tree-sitter-query", - files = { "src/parser.c" }, - }, - maintainers = { "@steelsojka" }, - readme_name = "Tree-Sitter query language", -} - -list.r = { - install_info = { - url = "https://github.com/r-lib/tree-sitter-r", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ribru17" }, -} - -list.racket = { - install_info = { - url = "https://github.com/6cdh/tree-sitter-racket", - files = { "src/parser.c", "src/scanner.c" }, - }, -} - -list.ralph = { - install_info = { - url = "https://github.com/alephium/tree-sitter-ralph", - files = { "src/parser.c" }, - }, - maintainers = { "@tdroxler" }, -} - -list.rasi = { - install_info = { - url = "https://github.com/Fymyte/tree-sitter-rasi", - files = { "src/parser.c" }, - }, - maintainers = { "@Fymyte" }, -} - -list.razor = { - install_info = { - url = "https://github.com/tris203/tree-sitter-razor", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@tris203" }, -} - -list.rbs = { - install_info = { - url = "https://github.com/joker1007/tree-sitter-rbs", - files = { "src/parser.c" }, - }, - maintainers = { "@joker1007" }, -} - -list.re2c = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-re2c", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.readline = { - install_info = { - url = "https://github.com/ribru17/tree-sitter-readline", - files = { "src/parser.c" }, - }, - maintainers = { "@ribru17" }, -} - -list.regex = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-regex", - files = { "src/parser.c" }, - }, - maintainers = { "@theHamsta" }, -} - -list.rego = { - install_info = { - url = "https://github.com/FallenAngel97/tree-sitter-rego", - files = { "src/parser.c" }, - }, - maintainers = { "@FallenAngel97" }, -} - -list.requirements = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-requirements", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, - readme_name = "pip requirements", -} - -list.rescript = { - install_info = { - url = "https://github.com/rescript-lang/tree-sitter-rescript", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ribru17" }, -} - -list.rnoweb = { - install_info = { - url = "https://github.com/bamonroe/tree-sitter-rnoweb", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@bamonroe" }, -} - -list.robot = { - install_info = { - url = "https://github.com/Hubro/tree-sitter-robot", - files = { "src/parser.c" }, - }, - maintainers = { "@Hubro" }, -} - -list.robots = { - install_info = { - url = "https://github.com/opa-oz/tree-sitter-robots-txt", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@opa-oz" }, -} - -list.roc = { - install_info = { - url = "https://github.com/faldor20/tree-sitter-roc", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@nat-418" }, -} - -list.ron = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-ron", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.rst = { - install_info = { - url = "https://github.com/stsewd/tree-sitter-rst", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@stsewd" }, -} - -list.ruby = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-ruby", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@TravonteD" }, -} - -list.runescript = { - install_info = { - url = "https://github.com/2004Scape/tree-sitter-runescript", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@2004Scape" }, -} - -list.rust = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-rust", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.scala = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-scala", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@stevanmilic" }, -} - -list.scfg = { - install_info = { - url = "https://github.com/rockorager/tree-sitter-scfg", - files = { "src/parser.c" }, - requires_generate_from_grammar = true, - }, - maintainers = { "@WhyNotHugo" }, -} - -list.scheme = { - install_info = { - url = "https://github.com/6cdh/tree-sitter-scheme", - files = { "src/parser.c" }, - }, -} - -list.scss = { - install_info = { - url = "https://github.com/serenadeai/tree-sitter-scss", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@elianiva" }, -} - -list.sflog = { - install_info = { - url = "https://github.com/aheber/tree-sitter-sfapex", - files = { "src/parser.c" }, - location = "sflog", - }, - maintainers = { "@aheber", "@xixiaofinland" }, -} - -list.slang = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-slang", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - filetype = "shaderslang", - maintainers = { "@theHamsta" }, - experimental = true, -} - -list.slim = { - install_info = { - url = "https://github.com/theoo/tree-sitter-slim", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@theoo" }, -} - -list.slint = { - install_info = { - url = "https://github.com/slint-ui/tree-sitter-slint", - files = { "src/parser.c" }, - }, - maintainers = { "@hunger" }, -} - -list.smali = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-smali", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.snakemake = { - install_info = { - url = "https://github.com/osthomas/tree-sitter-snakemake", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainer = { "@osthomas" }, - experimental = true, -} - -list.smithy = { - install_info = { - url = "https://github.com/indoorvivants/tree-sitter-smithy", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq", "@keynmol" }, -} - -list.solidity = { - install_info = { - url = "https://github.com/JoranHonig/tree-sitter-solidity", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.soql = { - install_info = { - url = "https://github.com/aheber/tree-sitter-sfapex", - files = { "src/parser.c" }, - location = "soql", - }, - maintainers = { "@aheber", "@xixiaofinland" }, -} - -list.sosl = { - install_info = { - url = "https://github.com/aheber/tree-sitter-sfapex", - files = { "src/parser.c" }, - location = "sosl", - }, - maintainers = { "@aheber", "@xixiaofinland" }, -} - -list.sourcepawn = { - install_info = { - url = "https://github.com/nilshelmig/tree-sitter-sourcepawn", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@Sarrus1" }, - tier = 3, -} - -list.sparql = { - install_info = { - url = "https://github.com/GordianDziwis/tree-sitter-sparql", - files = { "src/parser.c" }, - }, - maintainers = { "@GordianDziwis" }, -} - -list.sql = { - install_info = { - url = "https://github.com/derekstride/tree-sitter-sql", - files = { "src/parser.c", "src/scanner.c" }, - branch = "gh-pages", - }, - maintainers = { "@derekstride" }, -} - -list.squirrel = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-squirrel", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.ssh_config = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-ssh-config", - files = { "src/parser.c" }, - }, - filetype = "sshconfig", - maintainers = { "@ObserverOfTime" }, -} - -list.starlark = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-starlark", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "bzl", - maintainers = { "@amaanq" }, -} - -list.strace = { - install_info = { - url = "https://github.com/sigmaSd/tree-sitter-strace", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.styled = { - install_info = { - url = "https://github.com/mskelton/tree-sitter-styled", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@mskelton" }, -} - -list.supercollider = { - install_info = { - url = "https://github.com/madskjeldgaard/tree-sitter-supercollider", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@madskjeldgaard" }, -} - -list.superhtml = { - install_info = { - url = "https://github.com/kristoff-it/superhtml", - files = { - "src/parser.c", - "src/scanner.c", - }, - location = "tree-sitter-superhtml", - }, - maintainers = { "@rockorager" }, -} - -list.surface = { - install_info = { - url = "https://github.com/connorlay/tree-sitter-surface", - files = { "src/parser.c" }, - }, - filetype = "sface", - maintainers = { "@connorlay" }, -} - -list.svelte = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-svelte", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.sway = { - install_info = { - url = "https://github.com/FuelLabs/tree-sitter-sway.git", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ribru17" }, -} - -list.swift = { - install_info = { - url = "https://github.com/alex-pinkus/tree-sitter-swift", - files = { "src/parser.c", "src/scanner.c" }, - requires_generate_from_grammar = true, - }, - maintainers = { "@alex-pinkus" }, -} - -list.sxhkdrc = { - install_info = { - url = "https://github.com/RaafatTurki/tree-sitter-sxhkdrc", - files = { "src/parser.c" }, - }, - maintainers = { "@RaafatTurki" }, -} - -list.systemtap = { - install_info = { - url = "https://github.com/ok-ryoko/tree-sitter-systemtap", - files = { "src/parser.c" }, - }, - maintainers = { "@ok-ryoko" }, -} - -list.t32 = { - install_info = { - url = "https://gitlab.com/xasc/tree-sitter-t32.git", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "trace32", - maintainers = { "@xasc" }, -} - -list.tablegen = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-tablegen", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.tact = { - install_info = { - url = "https://github.com/tact-lang/tree-sitter-tact", - files = { "src/parser.c" }, - }, - maintainers = { "@novusnota" }, -} - -list.teal = { - install_info = { - url = "https://github.com/euclidianAce/tree-sitter-teal", - files = { "src/parser.c", "src/scanner.c" }, - requires_generate_from_grammar = true, - }, - maintainers = { "@euclidianAce" }, -} - -list.tcl = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-tcl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@lewis6991" }, -} - -list.tera = { - install_info = { - url = "https://github.com/uncenter/tree-sitter-tera", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@uncenter" }, -} - -list.terraform = { - install_info = { - url = "https://github.com/MichaHoffmann/tree-sitter-hcl", - files = { "src/parser.c", "src/scanner.c" }, - location = "dialects/terraform", - }, - maintainers = { "@MichaHoffmann" }, -} - -list.textproto = { - install_info = { - url = "https://github.com/PorterAtGoogle/tree-sitter-textproto", - files = { "src/parser.c" }, - }, - filetype = "pbtxt", - maintainers = { "@Porter" }, -} - -list.thrift = { - install_info = { - url = "https://github.com/duskmoon314/tree-sitter-thrift", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq", "@duskmoon314" }, -} - -list.tiger = { - install_info = { - url = "https://github.com/ambroisie/tree-sitter-tiger", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@ambroisie" }, -} - -list.tlaplus = { - install_info = { - url = "https://github.com/tlaplus-community/tree-sitter-tlaplus", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "tla", - maintainers = { "@ahelwer", "@susliko" }, -} - -list.tmux = { - install_info = { - url = "https://github.com/Freed-Wu/tree-sitter-tmux", - files = { "src/parser.c" }, - }, - maintainers = { "@Freed-Wu" }, -} - -list.todotxt = { - install_info = { - url = "https://github.com/arnarg/tree-sitter-todotxt", - files = { "src/parser.c" }, - }, - maintainers = { "@arnarg" }, - experimental = true, -} - -list.toml = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-toml", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@tk-shirasaka" }, -} - -list.tsv = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-csv", - files = { "src/parser.c" }, - location = "tsv", - }, - maintainers = { "@amaanq" }, -} - -list.tsx = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-typescript", - files = { "src/parser.c", "src/scanner.c" }, - location = "tsx", - generate_requires_npm = true, - }, - filetype = "typescriptreact", - maintainers = { "@steelsojka" }, -} - -list.turtle = { - install_info = { - url = "https://github.com/GordianDziwis/tree-sitter-turtle", - files = { "src/parser.c" }, - }, - maintainers = { "@GordianDziwis" }, -} - -list.twig = { - install_info = { - url = "https://github.com/gbprod/tree-sitter-twig", - files = { "src/parser.c" }, - }, - maintainers = { "@gbprod" }, -} - -list.typescript = { - install_info = { - url = "https://github.com/tree-sitter/tree-sitter-typescript", - files = { "src/parser.c", "src/scanner.c" }, - location = "typescript", - generate_requires_npm = true, - }, - maintainers = { "@steelsojka" }, -} - -list.typespec = { - install_info = { - url = "https://github.com/happenslol/tree-sitter-typespec", - files = { "src/parser.c" }, - }, - maintainers = { "@happenslol" }, -} - -list.typoscript = { - install_info = { - url = "https://github.com/Teddytrombone/tree-sitter-typoscript", - files = { "src/parser.c" }, - }, - maintainers = { "@Teddytrombone" }, -} - -list.typst = { - install_info = { - url = "https://github.com/uben0/tree-sitter-typst", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@uben0", "@RaafatTurki" }, -} - -list.udev = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-udev", - files = { "src/parser.c" }, - }, - filetype = "udevrules", - maintainers = { "@ObserverOfTime" }, -} - -list.ungrammar = { - install_info = { - url = "https://github.com/Philipp-M/tree-sitter-ungrammar", - files = { "src/parser.c" }, - }, - maintainers = { "@Philipp-M", "@amaanq" }, -} - -list.unison = { - install_info = { - url = "https://github.com/kylegoetz/tree-sitter-unison", - files = { "src/parser.c", "src/scanner.c" }, - requires_generate_from_grammar = true, - }, - maintainers = { "@tapegram" }, -} - -list.usd = { - install_info = { - url = "https://github.com/ColinKennedy/tree-sitter-usd", - files = { "src/parser.c" }, - }, - maintainers = { "@ColinKennedy" }, -} - -list.uxntal = { - install_info = { - url = "https://github.com/amaanq/tree-sitter-uxntal", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "tal", - maintainers = { "@amaanq" }, - readme_name = "uxn tal", -} - -list.v = { - install_info = { - url = "https://github.com/vlang/v-analyzer", - files = { "src/parser.c" }, - location = "tree_sitter_v", - }, - filetype = "vlang", - maintainers = { "@kkharji", "@amaanq" }, -} - -list.vala = { - install_info = { - url = "https://github.com/vala-lang/tree-sitter-vala", - files = { "src/parser.c" }, - }, - maintainers = { "@Prince781" }, -} - -list.vento = { - install_info = { - url = "https://github.com/ventojs/tree-sitter-vento", - files = { "src/parser.c", "src/scanner.c" }, - }, - filetype = "vto", - maintainers = { "@wrapperup", "@oscarotero" }, -} - -list.verilog = { - install_info = { - url = "https://github.com/gmlarumbe/tree-sitter-systemverilog", - files = { "src/parser.c" }, - }, - maintainers = { "@zhangwwpeng" }, -} - -list.vhdl = { - install_info = { - url = "https://github.com/jpt13653903/tree-sitter-vhdl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@jpt13653903" }, -} - -list.vhs = { - install_info = { - url = "https://github.com/charmbracelet/tree-sitter-vhs", - files = { "src/parser.c" }, - }, - filetype = "tape", - maintainers = { "@caarlos0" }, -} - -list.vim = { - install_info = { - url = "https://github.com/neovim/tree-sitter-vim", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@clason" }, -} - -list.vimdoc = { - install_info = { - url = "https://github.com/neovim/tree-sitter-vimdoc", - files = { "src/parser.c" }, - }, - filetype = "help", - maintainers = { "@clason" }, -} - -list.vrl = { - install_info = { - url = "https://github.com/belltoy/tree-sitter-vrl", - files = { "src/parser.c" }, - }, - maintainers = { "@belltoy" }, -} - -list.vue = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-vue", - files = { "src/parser.c", "src/scanner.c" }, - branch = "main", - }, - maintainers = { "@WhyNotHugo", "@lucario387" }, -} - -list.wgsl = { - install_info = { - url = "https://github.com/szebniok/tree-sitter-wgsl", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@szebniok" }, -} - -list.wgsl_bevy = { - install_info = { - url = "https://github.com/theHamsta/tree-sitter-wgsl-bevy", - files = { "src/parser.c", "src/scanner.c" }, - generate_requires_npm = true, - }, - maintainers = { "@theHamsta" }, -} - -list.wing = { - install_info = { - url = "https://github.com/winglang/tree-sitter-wing", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@gshpychka", "@MarkMcCulloh" }, -} - -list.wit = { - install_info = { - url = "https://github.com/liamwh/tree-sitter-wit", - files = { "src/parser.c" }, - }, - maintainers = { "@liamwh" }, -} - -list.xcompose = { - install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-xcompose", - files = { "src/parser.c" }, - }, - maintainers = { "@ObserverOfTime" }, -} - -list.xml = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-xml", - files = { "src/parser.c", "src/scanner.c" }, - location = "xml", - }, - maintainers = { "@ObserverOfTime" }, -} - -list.xresources = { - install_info = { - url = "https://github.com/ValdezFOmar/tree-sitter-xresources", - files = { "src/parser.c" }, - }, - filetype = "xdefaults", - maintainers = { "@ValdezFOmar" }, -} - -list.yaml = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-yaml", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.yang = { - install_info = { - url = "https://github.com/Hubro/tree-sitter-yang", - files = { "src/parser.c" }, - }, - maintainers = { "@Hubro" }, -} - -list.yuck = { - install_info = { - url = "https://github.com/Philipp-M/tree-sitter-yuck", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@Philipp-M", "@amaanq" }, -} - -list.zathurarc = { - install_info = { - url = "https://github.com/Freed-Wu/tree-sitter-zathurarc", - files = { "src/parser.c" }, - }, - maintainers = { "@Freed-Wu" }, -} - -list.zig = { - install_info = { - url = "https://github.com/tree-sitter-grammars/tree-sitter-zig", - files = { "src/parser.c" }, - }, - maintainers = { "@amaanq" }, -} - -list.ziggy = { - install_info = { - url = "https://github.com/kristoff-it/ziggy", - files = { "src/parser.c" }, - location = "tree-sitter-ziggy", - }, - maintainers = { "@rockorager" }, -} - -list.ziggy_schema = { - install_info = { - url = "https://github.com/kristoff-it/ziggy", - files = { "src/parser.c" }, - location = "tree-sitter-ziggy-schema", - }, - maintainers = { "@rockorager" }, -} - -list.templ = { - install_info = { - url = "https://github.com/vrischmann/tree-sitter-templ", - files = { "src/parser.c", "src/scanner.c" }, - }, - maintainers = { "@vrischmann" }, -} - -local M = { - list = list, -} - -function M.ft_to_lang(ft) - local result = ts.language.get_lang(ft) - if result then - return result - else - ft = vim.split(ft, ".", { plain = true })[1] - return ts.language.get_lang(ft) or ft - end -end - --- Get a list of all available parsers ----@return string[] -function M.available_parsers() - local parsers = vim.tbl_keys(M.list) - table.sort(parsers) - if vim.fn.executable "tree-sitter" == 1 and vim.fn.executable "node" == 1 then - return parsers - else - return vim.tbl_filter(function(p) ---@param p string - return not M.list[p].install_info.requires_generate_from_grammar - end, parsers) - end -end - -function M.get_parser_configs() - return M.list -end - -local parser_files - -function M.reset_cache() - parser_files = setmetatable({}, { - __index = function(tbl, key) - rawset(tbl, key, api.nvim_get_runtime_file("parser/" .. key .. ".*", false)) - return rawget(tbl, key) - end, - }) -end - -M.reset_cache() - -function M.has_parser(lang) - lang = lang or M.get_buf_lang(api.nvim_get_current_buf()) - - if not lang or #lang == 0 then - return false - end - -- HACK: nvim internal API - if vim._ts_has_language(lang) then - return true - end - return #parser_files[lang] > 0 -end - -function M.get_parser(bufnr, lang) - bufnr = bufnr or api.nvim_get_current_buf() - lang = lang or M.get_buf_lang(bufnr) - - if M.has_parser(lang) then - return ts.get_parser(bufnr, lang) - end -end - --- @deprecated This is only kept for legacy purposes. --- All root nodes should be accounted for. -function M.get_tree_root(bufnr) - bufnr = bufnr or api.nvim_get_current_buf() - return M.get_parser(bufnr):parse()[1]:root() -end - --- Gets the language of a given buffer ----@param bufnr number? or current buffer ----@return string -function M.get_buf_lang(bufnr) - bufnr = bufnr or api.nvim_get_current_buf() - return M.ft_to_lang(api.nvim_buf_get_option(bufnr, "ft")) -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/query.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/query.lua deleted file mode 100644 index 4aba9f2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/query.lua +++ /dev/null @@ -1,453 +0,0 @@ -local api = vim.api -local ts = require "nvim-treesitter.compat" -local tsrange = require "nvim-treesitter.tsrange" -local utils = require "nvim-treesitter.utils" -local parsers = require "nvim-treesitter.parsers" -local caching = require "nvim-treesitter.caching" - -local M = {} - -local EMPTY_ITER = function() end - -M.built_in_query_groups = { "highlights", "locals", "folds", "indents", "injections" } - --- Creates a function that checks whether a given query exists --- for a specific language. ----@param query string ----@return fun(string): boolean -local function get_query_guard(query) - return function(lang) - return M.has_query_files(lang, query) - end -end - -for _, query in ipairs(M.built_in_query_groups) do - M["has_" .. query] = get_query_guard(query) -end - ----@return string[] -function M.available_query_groups() - local query_files = api.nvim_get_runtime_file("queries/*/*.scm", true) - local groups = {} - for _, f in ipairs(query_files) do - groups[vim.fn.fnamemodify(f, ":t:r")] = true - end - local list = {} - for k, _ in pairs(groups) do - table.insert(list, k) - end - return list -end - -do - local query_cache = caching.create_buffer_cache() - - local function update_cached_matches(bufnr, changed_tick, query_group) - query_cache.set(query_group, bufnr, { - tick = changed_tick, - cache = M.collect_group_results(bufnr, query_group) or {}, - }) - end - - ---@param bufnr integer - ---@param query_group string - ---@return any - function M.get_matches(bufnr, query_group) - bufnr = bufnr or api.nvim_get_current_buf() - local cached_local = query_cache.get(query_group, bufnr) - if not cached_local or api.nvim_buf_get_changedtick(bufnr) > cached_local.tick then - update_cached_matches(bufnr, api.nvim_buf_get_changedtick(bufnr), query_group) - end - - return query_cache.get(query_group, bufnr).cache - end -end - ----@param lang string ----@param query_name string ----@return string[] -local function runtime_queries(lang, query_name) - return api.nvim_get_runtime_file(string.format("queries/%s/%s.scm", lang, query_name), true) or {} -end - ----@type table> -local query_files_cache = {} - ----@param lang string ----@param query_name string ----@return boolean -function M.has_query_files(lang, query_name) - if not query_files_cache[lang] then - query_files_cache[lang] = {} - end - if query_files_cache[lang][query_name] == nil then - local files = runtime_queries(lang, query_name) - query_files_cache[lang][query_name] = files and #files > 0 - end - return query_files_cache[lang][query_name] -end - -do - local mt = {} - mt.__index = function(tbl, key) - if rawget(tbl, key) == nil then - rawset(tbl, key, {}) - end - return rawget(tbl, key) - end - - -- cache will auto set the table for each lang if it is nil - ---@type table> - local cache = setmetatable({}, mt) - - -- Same as `vim.treesitter.query` except will return cached values - ---@param lang string - ---@param query_name string - function M.get_query(lang, query_name) - if cache[lang][query_name] == nil then - cache[lang][query_name] = ts.get_query(lang, query_name) - end - - return cache[lang][query_name] - end - - -- Invalidates the query file cache. - -- - -- If lang and query_name is both present, will reload for only the lang and query_name. - -- If only lang is present, will reload all query_names for that lang - -- If none are present, will reload everything - ---@param lang? string - ---@param query_name? string - function M.invalidate_query_cache(lang, query_name) - if lang and query_name then - cache[lang][query_name] = nil - if query_files_cache[lang] then - query_files_cache[lang][query_name] = nil - end - elseif lang and not query_name then - query_files_cache[lang] = nil - for query_name0, _ in pairs(cache[lang]) do - M.invalidate_query_cache(lang, query_name0) - end - elseif not lang and not query_name then - query_files_cache = {} - for lang0, _ in pairs(cache) do - for query_name0, _ in pairs(cache[lang0]) do - M.invalidate_query_cache(lang0, query_name0) - end - end - else - error "Cannot have query_name by itself!" - end - end -end - --- This function is meant for an autocommand and not to be used. Only use if file is a query file. ----@param fname string -function M.invalidate_query_file(fname) - local fnamemodify = vim.fn.fnamemodify - M.invalidate_query_cache(fnamemodify(fname, ":p:h:t"), fnamemodify(fname, ":t:r")) -end - ----@class QueryInfo ----@field root TSNode ----@field source integer ----@field start integer ----@field stop integer - ----@param bufnr integer ----@param query_name string ----@param root TSNode ----@param root_lang string|nil ----@return Query|nil, QueryInfo|nil -local function prepare_query(bufnr, query_name, root, root_lang) - local buf_lang = parsers.get_buf_lang(bufnr) - - if not buf_lang then - return - end - - local parser = parsers.get_parser(bufnr, buf_lang) - if not parser then - return - end - - if not root then - local first_tree = parser:trees()[1] - - if first_tree then - root = first_tree:root() - end - end - - if not root then - return - end - - local range = { root:range() } - - if not root_lang then - local lang_tree = parser:language_for_range(range) - - if lang_tree then - root_lang = lang_tree:lang() - end - end - - if not root_lang then - return - end - - local query = M.get_query(root_lang, query_name) - if not query then - return - end - - return query, - { - root = root, - source = bufnr, - start = range[1], - -- The end row is exclusive so we need to add 1 to it. - stop = range[3] + 1, - } -end - --- Given a path (i.e. a List(String)) this functions inserts value at path ----@param object any ----@param path string[] ----@param value any -function M.insert_to_path(object, path, value) - local curr_obj = object - - for index = 1, (#path - 1) do - if curr_obj[path[index]] == nil then - curr_obj[path[index]] = {} - end - - curr_obj = curr_obj[path[index]] - end - - curr_obj[path[#path]] = value -end - ----@param query Query ----@param bufnr integer ----@param start_row integer ----@param end_row integer -function M.iter_prepared_matches(query, qnode, bufnr, start_row, end_row) - -- A function that splits a string on '.' - ---@param to_split string - ---@return string[] - local function split(to_split) - local t = {} - for str in string.gmatch(to_split, "([^.]+)") do - table.insert(t, str) - end - - return t - end - - local matches = query:iter_matches(qnode, bufnr, start_row, end_row, { all = false }) - - local function iterator() - local pattern, match, metadata = matches() - if pattern ~= nil then - local prepared_match = {} - - -- Extract capture names from each match - for id, node in pairs(match) do - local name = query.captures[id] -- name of the capture in the query - if name ~= nil then - local path = split(name .. ".node") - M.insert_to_path(prepared_match, path, node) - local metadata_path = split(name .. ".metadata") - M.insert_to_path(prepared_match, metadata_path, metadata[id]) - end - end - - -- Add some predicates for testing - ---@type string[][] ( TODO: make pred type so this can be pred[]) - local preds = query.info.patterns[pattern] - if preds then - for _, pred in pairs(preds) do - -- functions - if pred[1] == "set!" and type(pred[2]) == "string" then - M.insert_to_path(prepared_match, split(pred[2]), pred[3]) - end - if pred[1] == "make-range!" and type(pred[2]) == "string" and #pred == 4 then - M.insert_to_path( - prepared_match, - split(pred[2] .. ".node"), - tsrange.TSRange.from_nodes(bufnr, match[pred[3]], match[pred[4]]) - ) - end - end - end - - return prepared_match - end - end - return iterator -end - --- Return all nodes corresponding to a specific capture path (like @definition.var, @reference.type) --- Works like M.get_references or M.get_scopes except you can choose the capture --- Can also be a nested capture like @definition.function to get all nodes defining a function. --- ----@param bufnr integer the buffer ----@param captures string|string[] ----@param query_group string the name of query group (highlights or injections for example) ----@param root TSNode|nil node from where to start the search ----@param lang string|nil the language from where to get the captures. ---- Root nodes can have several languages. ----@return table|nil -function M.get_capture_matches(bufnr, captures, query_group, root, lang) - if type(captures) == "string" then - captures = { captures } - end - local strip_captures = {} ---@type string[] - for i, capture in ipairs(captures) do - if capture:sub(1, 1) ~= "@" then - error 'Captures must start with "@"' - return - end - -- Remove leading "@". - strip_captures[i] = capture:sub(2) - end - - local matches = {} - for match in M.iter_group_results(bufnr, query_group, root, lang) do - for _, capture in ipairs(strip_captures) do - local insert = utils.get_at_path(match, capture) - if insert then - table.insert(matches, insert) - end - end - end - return matches -end - -function M.iter_captures(bufnr, query_name, root, lang) - local query, params = prepare_query(bufnr, query_name, root, lang) - if not query then - return EMPTY_ITER - end - assert(params) - - local iter = query:iter_captures(params.root, params.source, params.start, params.stop) - - local function wrapped_iter() - local id, node, metadata = iter() - if not id then - return - end - - local name = query.captures[id] - if string.sub(name, 1, 1) == "_" then - return wrapped_iter() - end - - return name, node, metadata - end - - return wrapped_iter -end - ----@param bufnr integer ----@param capture_string string ----@param query_group string ----@param filter_predicate fun(match: table): boolean ----@param scoring_function fun(match: table): number ----@param root TSNode ----@return table|unknown -function M.find_best_match(bufnr, capture_string, query_group, filter_predicate, scoring_function, root) - if string.sub(capture_string, 1, 1) == "@" then - --remove leading "@" - capture_string = string.sub(capture_string, 2) - end - - local best ---@type table|nil - local best_score ---@type number - - for maybe_match in M.iter_group_results(bufnr, query_group, root) do - local match = utils.get_at_path(maybe_match, capture_string) - - if match and filter_predicate(match) then - local current_score = scoring_function(match) - if not best then - best = match - best_score = current_score - end - if current_score > best_score then - best = match - best_score = current_score - end - end - end - return best -end - ----Iterates matches from a query file. ----@param bufnr integer the buffer ----@param query_group string the query file to use ----@param root TSNode the root node ----@param root_lang? string the root node lang, if known -function M.iter_group_results(bufnr, query_group, root, root_lang) - local query, params = prepare_query(bufnr, query_group, root, root_lang) - if not query then - return EMPTY_ITER - end - assert(params) - - return M.iter_prepared_matches(query, params.root, params.source, params.start, params.stop) -end - -function M.collect_group_results(bufnr, query_group, root, lang) - local matches = {} - - for prepared_match in M.iter_group_results(bufnr, query_group, root, lang) do - table.insert(matches, prepared_match) - end - - return matches -end - ----@alias CaptureResFn function(string, LanguageTree, LanguageTree): string, string - --- Same as get_capture_matches except this will recursively get matches for every language in the tree. ----@param bufnr integer The buffer ----@param capture_or_fn string|CaptureResFn The capture to get. If a function is provided then that ---- function will be used to resolve both the capture and query argument. ---- The function can return `nil` to ignore that tree. ----@param query_type string? The query to get the capture from. This is ignored if a function is provided ---- for the capture argument. ----@return table[] -function M.get_capture_matches_recursively(bufnr, capture_or_fn, query_type) - ---@type CaptureResFn - local type_fn - if type(capture_or_fn) == "function" then - type_fn = capture_or_fn - else - type_fn = function(_, _, _) - return capture_or_fn, query_type - end - end - local parser = parsers.get_parser(bufnr) - local matches = {} - - if parser then - parser:for_each_tree(function(tree, lang_tree) - local lang = lang_tree:lang() - local capture, type_ = type_fn(lang, tree, lang_tree) - - if capture then - vim.list_extend(matches, M.get_capture_matches(bufnr, capture, type_, tree:root(), lang) or {}) - end - end) - end - - return matches -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/query_predicates.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/query_predicates.lua deleted file mode 100644 index f39d1b9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/query_predicates.lua +++ /dev/null @@ -1,191 +0,0 @@ -local query = require "vim.treesitter.query" - -local html_script_type_languages = { - ["importmap"] = "json", - ["module"] = "javascript", - ["application/ecmascript"] = "javascript", - ["text/ecmascript"] = "javascript", -} - -local non_filetype_match_injection_language_aliases = { - ex = "elixir", - pl = "perl", - sh = "bash", - uxn = "uxntal", - ts = "typescript", -} - --- compatibility shim for breaking change on nightly/0.11 -local opts = vim.fn.has "nvim-0.10" == 1 and { force = true, all = false } or true - -local function get_parser_from_markdown_info_string(injection_alias) - local match = vim.filetype.match { filename = "a." .. injection_alias } - return match or non_filetype_match_injection_language_aliases[injection_alias] or injection_alias -end - -local function error(str) - vim.api.nvim_err_writeln(str) -end - -local function valid_args(name, pred, count, strict_count) - local arg_count = #pred - 1 - - if strict_count then - if arg_count ~= count then - error(string.format("%s must have exactly %d arguments", name, count)) - return false - end - elseif arg_count < count then - error(string.format("%s must have at least %d arguments", name, count)) - return false - end - - return true -end - ----@param match (TSNode|nil)[] ----@param _pattern string ----@param _bufnr integer ----@param pred string[] ----@return boolean|nil -query.add_predicate("nth?", function(match, _pattern, _bufnr, pred) - if not valid_args("nth?", pred, 2, true) then - return - end - - local node = match[pred[2]] ---@type TSNode - local n = tonumber(pred[3]) - if node and node:parent() and node:parent():named_child_count() > n then - return node:parent():named_child(n) == node - end - - return false -end, opts) - ----@param match (TSNode|nil)[] ----@param _pattern string ----@param bufnr integer ----@param pred string[] ----@return boolean|nil -query.add_predicate("is?", function(match, _pattern, bufnr, pred) - if not valid_args("is?", pred, 2) then - return - end - - -- Avoid circular dependencies - local locals = require "nvim-treesitter.locals" - local node = match[pred[2]] - local types = { unpack(pred, 3) } - - if not node then - return true - end - - local _, _, kind = locals.find_definition(node, bufnr) - - return vim.tbl_contains(types, kind) -end, opts) - ----@param match (TSNode|nil)[] ----@param _pattern string ----@param _bufnr integer ----@param pred string[] ----@return boolean|nil -query.add_predicate("kind-eq?", function(match, _pattern, _bufnr, pred) - if not valid_args(pred[1], pred, 2) then - return - end - - local node = match[pred[2]] - local types = { unpack(pred, 3) } - - if not node then - return true - end - - return vim.tbl_contains(types, node:type()) -end, opts) - ----@param match (TSNode|nil)[] ----@param _ string ----@param bufnr integer ----@param pred string[] ----@return boolean|nil -query.add_directive("set-lang-from-mimetype!", function(match, _, bufnr, pred, metadata) - local capture_id = pred[2] - local node = match[capture_id] - if not node then - return - end - local type_attr_value = vim.treesitter.get_node_text(node, bufnr) - local configured = html_script_type_languages[type_attr_value] - if configured then - metadata["injection.language"] = configured - else - local parts = vim.split(type_attr_value, "/", {}) - metadata["injection.language"] = parts[#parts] - end -end, opts) - ----@param val any ----@param indentation integer? ----@return string -local function pretty_str(val, indentation) - indentation = indentation or 0 - local t = type(val) - if t == "string" then - return "("..t..")"..'"'..val..'"' - end - if t == "table" then - ---@type string[] - local builder = {"{\n"} - for key, value in pairs(val) do - table.insert(builder, "("..type(key)..")"..pretty_str(key, indentation+1)) - table.insert(builder, ": ") - table.insert(builder, "("..type(value)..")"..pretty_str(value)) - table.insert(builder, ",\n") - end - return table.concat(builder, "") - end - - return tostring(val) -end - ----@param match (TSNode|nil)[] ----@param _ string ----@param bufnr integer ----@param pred string[] ----@return boolean|nil -query.add_directive("set-lang-from-info-string!", function(match, _, bufnr, pred, metadata) - local capture_id = pred[2] - local node = match[capture_id] - if not node then - return - end - local injection_alias = vim.treesitter.get_node_text(node, bufnr, {metadata=metadata}):lower() - metadata["injection.language"] = get_parser_from_markdown_info_string(injection_alias) -end, opts) - --- Just avoid some annoying warnings for this directive -query.add_directive("make-range!", function() end, opts) - ---- transform node text to lower case (e.g., to make @injection.language case insensitive) ---- ----@param match (TSNode|nil)[] ----@param _ string ----@param bufnr integer ----@param pred string[] ----@return boolean|nil -query.add_directive("downcase!", function(match, _, bufnr, pred, metadata) - local id = pred[2] - local node = match[id] - if not node then - return - end - - local text = vim.treesitter.get_node_text(node, bufnr, { metadata = metadata[id] }) or "" - if not metadata[id] then - metadata[id] = {} - end - metadata[id].text = string.lower(text) -end, opts) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/shell_command_selectors.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/shell_command_selectors.lua deleted file mode 100644 index ee1d647..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/shell_command_selectors.lua +++ /dev/null @@ -1,368 +0,0 @@ -local fn = vim.fn -local utils = require "nvim-treesitter.utils" -local uv = vim.uv or vim.loop - --- Convert path for cmd.exe on Windows. --- This is needed when vim.opt.shellslash is in use. ----@param p string ----@return string -local function cmdpath(p) - if vim.opt.shellslash:get() then - local r = p:gsub("/", "\\") - return r - else - return p - end -end - -local M = {} - --- Returns the mkdir command based on the OS ----@param directory string ----@param cwd string ----@param info_msg string ----@return table -function M.select_mkdir_cmd(directory, cwd, info_msg) - if fn.has "win32" == 1 then - return { - cmd = "cmd", - opts = { - args = { "/C", "mkdir", cmdpath(directory) }, - cwd = cwd, - }, - info = info_msg, - err = "Could not create " .. directory, - } - else - return { - cmd = "mkdir", - opts = { - args = { directory }, - cwd = cwd, - }, - info = info_msg, - err = "Could not create " .. directory, - } - end -end - --- Returns the remove command based on the OS ----@param file string ----@param info_msg string ----@return table -function M.select_rm_file_cmd(file, info_msg) - if fn.has "win32" == 1 then - return { - cmd = "cmd", - opts = { - args = { "/C", "if", "exist", cmdpath(file), "del", cmdpath(file) }, - }, - info = info_msg, - err = "Could not delete " .. file, - } - else - return { - cmd = "rm", - opts = { - args = { file }, - }, - info = info_msg, - err = "Could not delete " .. file, - } - end -end - ----@param executables string[] ----@return string|nil -function M.select_executable(executables) - return vim.tbl_filter(function(c) ---@param c string - return c ~= vim.NIL and fn.executable(c) == 1 - end, executables)[1] -end - --- Returns the compiler arguments based on the compiler and OS ----@param repo InstallInfo ----@param compiler string ----@return string[] -function M.select_compiler_args(repo, compiler) - if string.match(compiler, "cl$") or string.match(compiler, "cl.exe$") then - return { - "/Fe:", - "parser.so", - "/Isrc", - repo.files, - "-Os", - "/std:c11", - "/utf-8", - "/LD", - } - elseif string.match(compiler, "zig$") or string.match(compiler, "zig.exe$") then - return { - "c++", - "-o", - "parser.so", - repo.files, - "-lc", - "-Isrc", - "-shared", - "-Os", - "-std=c11", - } - else - local args = { - "-o", - "parser.so", - "-I./src", - repo.files, - "-Os", - "-std=c11", - } - if fn.has "mac" == 1 then - table.insert(args, "-bundle") - else - table.insert(args, "-shared") - end - if - #vim.tbl_filter(function(file) ---@param file string - local ext = vim.fn.fnamemodify(file, ":e") - return ext == "cc" or ext == "cpp" or ext == "cxx" - end, repo.files) > 0 - then - table.insert(args, "-lstdc++") - end - if fn.has "win32" == 0 then - table.insert(args, "-fPIC") - end - return args - end -end - --- Returns the compile command based on the OS and user options ----@param repo InstallInfo ----@param cc string ----@param compile_location string ----@return Command -function M.select_compile_command(repo, cc, compile_location) - local make = M.select_executable { "gmake", "make" } - if - string.match(cc, "cl$") - or string.match(cc, "cl.exe$") - or not repo.use_makefile - or fn.has "win32" == 1 - or not make - then - return { - cmd = cc, - info = "Compiling...", - err = "Error during compilation", - opts = { - args = require("nvim-treesitter.compat").flatten(M.select_compiler_args(repo, cc)), - cwd = compile_location, - }, - } - else - return { - cmd = make, - info = "Compiling...", - err = "Error during compilation", - opts = { - args = { - "--makefile=" .. utils.join_path(utils.get_package_path(), "scripts", "compile_parsers.makefile"), - "CC=" .. cc, - "CXX_STANDARD=" .. (repo.cxx_standard or "c++14"), - }, - cwd = compile_location, - }, - } - end -end - --- Returns the remove command based on the OS ----@param cache_folder string ----@param project_name string ----@return Command -function M.select_install_rm_cmd(cache_folder, project_name) - if fn.has "win32" == 1 then - local dir = cache_folder .. "\\" .. project_name - return { - cmd = "cmd", - opts = { - args = { "/C", "if", "exist", cmdpath(dir), "rmdir", "/s", "/q", cmdpath(dir) }, - }, - } - else - return { - cmd = "rm", - opts = { - args = { "-rf", cache_folder .. "/" .. project_name }, - }, - } - end -end - --- Returns the move command based on the OS ----@param from string ----@param to string ----@param cwd string ----@return Command -function M.select_mv_cmd(from, to, cwd) - if fn.has "win32" == 1 then - return { - cmd = "cmd", - opts = { - args = { "/C", "move", "/Y", cmdpath(from), cmdpath(to) }, - cwd = cwd, - }, - } - else - return { - cmd = "mv", - opts = { - args = { "-f", from, to }, - cwd = cwd, - }, - } - end -end - ----@param repo InstallInfo ----@param project_name string ----@param cache_folder string ----@param revision string|nil ----@param prefer_git boolean ----@return table -function M.select_download_commands(repo, project_name, cache_folder, revision, prefer_git) - local can_use_tar = vim.fn.executable "tar" == 1 and vim.fn.executable "curl" == 1 - local is_github = repo.url:find("github.com", 1, true) - local is_gitlab = repo.url:find("gitlab.com", 1, true) - - revision = revision or repo.branch or "master" - - if can_use_tar and (is_github or is_gitlab) and not prefer_git then - local path_sep = utils.get_path_sep() - local url = repo.url:gsub(".git$", "") - - local folder_rev = revision - if is_github and revision:match "^v%d" then - folder_rev = revision:sub(2) - end - - return { - M.select_install_rm_cmd(cache_folder, project_name .. "-tmp"), - { - cmd = "curl", - info = "Downloading " .. project_name .. "...", - err = "Error during download, please verify your internet connection", - opts = { - args = { - "--silent", - "--show-error", - "-L", -- follow redirects - is_github and url .. "/archive/" .. revision .. ".tar.gz" - or url .. "/-/archive/" .. revision .. "/" .. project_name .. "-" .. revision .. ".tar.gz", - "--output", - project_name .. ".tar.gz", - }, - cwd = cache_folder, - }, - }, - M.select_mkdir_cmd(project_name .. "-tmp", cache_folder, "Creating temporary directory"), - { - cmd = "tar", - info = "Extracting " .. project_name .. "...", - err = "Error during tarball extraction.", - opts = { - args = { - "-xvzf", - project_name .. ".tar.gz", - "-C", - project_name .. "-tmp", - }, - cwd = cache_folder, - }, - }, - M.select_rm_file_cmd(cache_folder .. path_sep .. project_name .. ".tar.gz"), - M.select_mv_cmd( - utils.join_path(project_name .. "-tmp", url:match "[^/]-$" .. "-" .. folder_rev), - project_name, - cache_folder - ), - M.select_install_rm_cmd(cache_folder, project_name .. "-tmp"), - } - else - local git_folder = utils.join_path(cache_folder, project_name) - local clone_error = "Error during download, please verify your internet connection" - - -- Running `git clone` or `git checkout` while running under Git (such as - -- editing a `git commit` message) will likely fail to install parsers - -- (such as 'gitcommit') and can also corrupt the index file of the current - -- Git repository. Check for typical git environment variables and abort if found. - for _, k in pairs { - "GIT_ALTERNATE_OBJECT_DIRECTORIES", - "GIT_CEILING_DIRECTORIES", - "GIT_DIR", - "GIT_INDEX", - "GIT_INDEX_FILE", - "GIT_OBJECT_DIRECTORY", - "GIT_PREFIX", - "GIT_WORK_TREE", - } do - if uv.os_getenv(k) then - vim.api.nvim_err_writeln( - string.format( - "Cannot install %s with git in an active git session. Exit the session and run ':TSInstall %s' manually", - project_name, - project_name - ) - ) - return {} - end - end - - return { - { - cmd = "git", - info = "Downloading " .. project_name .. "...", - err = clone_error, - opts = { - args = { - "clone", - repo.url, - project_name, - "--filter=blob:none", - }, - cwd = cache_folder, - }, - }, - { - cmd = "git", - info = "Checking out locked revision", - err = "Error while checking out revision", - opts = { - args = { - "checkout", - revision, - }, - cwd = git_folder, - }, - }, - } - end -end - ----@param dir string ----@param command string ----@return string command -function M.make_directory_change_for_command(dir, command) - if fn.has "win32" == 1 then - if string.find(vim.o.shell, "cmd") ~= nil then - return string.format("pushd %s & %s", cmdpath(dir), command) - else - return string.format("pushd %s ; %s", cmdpath(dir), command) - end - else - return string.format("cd %s;\n%s", dir, command) - end -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/statusline.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/statusline.lua deleted file mode 100644 index 68ba41a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/statusline.lua +++ /dev/null @@ -1,53 +0,0 @@ -local parsers = require "nvim-treesitter.parsers" -local ts_utils = require "nvim-treesitter.ts_utils" - -local M = {} - --- Trim spaces and opening brackets from end -local transform_line = function(line) - return line:gsub("%s*[%[%(%{]*%s*$", "") -end - -function M.statusline(opts) - if not parsers.has_parser() then - return - end - local options = opts or {} - if type(opts) == "number" then - options = { indicator_size = opts } - end - local bufnr = options.bufnr or 0 - local indicator_size = options.indicator_size or 100 - local type_patterns = options.type_patterns or { "class", "function", "method" } - local transform_fn = options.transform_fn or transform_line - local separator = options.separator or " -> " - local allow_duplicates = options.allow_duplicates or false - - local current_node = ts_utils.get_node_at_cursor() - if not current_node then - return "" - end - - local lines = {} - local expr = current_node - - while expr do - local line = ts_utils._get_line_for_node(expr, type_patterns, transform_fn, bufnr) - if line ~= "" then - if allow_duplicates or not vim.tbl_contains(lines, line) then - table.insert(lines, 1, line) - end - end - expr = expr:parent() - end - - local text = table.concat(lines, separator) - local text_len = #text - if text_len > indicator_size then - return "..." .. text:sub(text_len - indicator_size, text_len) - end - - return text -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/ts_utils.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/ts_utils.lua deleted file mode 100644 index ce10379..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/ts_utils.lua +++ /dev/null @@ -1,482 +0,0 @@ -local api = vim.api - -local parsers = require "nvim-treesitter.parsers" -local utils = require "nvim-treesitter.utils" -local ts = vim.treesitter - -local M = {} - -local function get_node_text(node, bufnr) - bufnr = bufnr or api.nvim_get_current_buf() - if not node then - return {} - end - - -- We have to remember that end_col is end-exclusive - local start_row, start_col, end_row, end_col = ts.get_node_range(node) - - if start_row ~= end_row then - local lines = api.nvim_buf_get_lines(bufnr, start_row, end_row + 1, false) - if next(lines) == nil then - return {} - end - lines[1] = string.sub(lines[1], start_col + 1) - -- end_row might be just after the last line. In this case the last line is not truncated. - if #lines == end_row - start_row + 1 then - lines[#lines] = string.sub(lines[#lines], 1, end_col) - end - return lines - else - local line = api.nvim_buf_get_lines(bufnr, start_row, start_row + 1, false)[1] - -- If line is nil then the line is empty - return line and { string.sub(line, start_col + 1, end_col) } or {} - end -end - ----@private ----@param node TSNode ----@param type_patterns string[] ----@param transform_fn fun(line: string): string ----@param bufnr integer ----@return string -function M._get_line_for_node(node, type_patterns, transform_fn, bufnr) - local node_type = node:type() - local is_valid = false - for _, rgx in ipairs(type_patterns) do - if node_type:find(rgx) then - is_valid = true - break - end - end - if not is_valid then - return "" - end - local line = transform_fn(vim.trim(get_node_text(node, bufnr)[1] or ""), node) - -- Escape % to avoid statusline to evaluate content as expression - return line:gsub("%%", "%%%%") -end - --- Gets the actual text content of a node --- @deprecated Use vim.treesitter.get_node_text --- @param node the node to get the text from --- @param bufnr the buffer containing the node --- @return list of lines of text of the node -function M.get_node_text(node, bufnr) - vim.notify_once( - "nvim-treesitter.ts_utils.get_node_text is deprecated: use vim.treesitter.get_node_text", - vim.log.levels.WARN - ) - return get_node_text(node, bufnr) -end - --- Determines whether a node is the parent of another --- @param dest the possible parent --- @param source the possible child node -function M.is_parent(dest, source) - if not (dest and source) then - return false - end - - local current = source - while current ~= nil do - if current == dest then - return true - end - - current = current:parent() - end - - return false -end - --- Get next node with same parent ----@param node TSNode ----@param allow_switch_parents? boolean allow switching parents if last node ----@param allow_next_parent? boolean allow next parent if last node and next parent without children -function M.get_next_node(node, allow_switch_parents, allow_next_parent) - local destination_node ---@type TSNode - local parent = node:parent() - - if not parent then - return - end - local found_pos = 0 - for i = 0, parent:named_child_count() - 1, 1 do - if parent:named_child(i) == node then - found_pos = i - break - end - end - if parent:named_child_count() > found_pos + 1 then - destination_node = parent:named_child(found_pos + 1) - elseif allow_switch_parents then - local next_node = M.get_next_node(node:parent()) - if next_node and next_node:named_child_count() > 0 then - destination_node = next_node:named_child(0) - elseif next_node and allow_next_parent then - destination_node = next_node - end - end - - return destination_node -end - --- Get previous node with same parent ----@param node TSNode ----@param allow_switch_parents? boolean allow switching parents if first node ----@param allow_previous_parent? boolean allow previous parent if first node and previous parent without children -function M.get_previous_node(node, allow_switch_parents, allow_previous_parent) - local destination_node ---@type TSNode - local parent = node:parent() - if not parent then - return - end - - local found_pos = 0 - for i = 0, parent:named_child_count() - 1, 1 do - if parent:named_child(i) == node then - found_pos = i - break - end - end - if 0 < found_pos then - destination_node = parent:named_child(found_pos - 1) - elseif allow_switch_parents then - local previous_node = M.get_previous_node(node:parent()) - if previous_node and previous_node:named_child_count() > 0 then - destination_node = previous_node:named_child(previous_node:named_child_count() - 1) - elseif previous_node and allow_previous_parent then - destination_node = previous_node - end - end - return destination_node -end - -function M.get_named_children(node) - local nodes = {} ---@type TSNode[] - for i = 0, node:named_child_count() - 1, 1 do - nodes[i + 1] = node:named_child(i) - end - return nodes -end - -function M.get_node_at_cursor(winnr, ignore_injected_langs) - winnr = winnr or 0 - local cursor = api.nvim_win_get_cursor(winnr) - local cursor_range = { cursor[1] - 1, cursor[2] } - - local buf = vim.api.nvim_win_get_buf(winnr) - local root_lang_tree = parsers.get_parser(buf) - if not root_lang_tree then - return - end - - local root ---@type TSNode|nil - if ignore_injected_langs then - for _, tree in pairs(root_lang_tree:trees()) do - local tree_root = tree:root() - if tree_root and ts.is_in_node_range(tree_root, cursor_range[1], cursor_range[2]) then - root = tree_root - break - end - end - else - root = M.get_root_for_position(cursor_range[1], cursor_range[2], root_lang_tree) - end - - if not root then - return - end - - return root:named_descendant_for_range(cursor_range[1], cursor_range[2], cursor_range[1], cursor_range[2]) -end - -function M.get_root_for_position(line, col, root_lang_tree) - if not root_lang_tree then - if not parsers.has_parser() then - return - end - - root_lang_tree = parsers.get_parser() - end - - local lang_tree = root_lang_tree:language_for_range { line, col, line, col } - - while true do - for _, tree in pairs(lang_tree:trees()) do - local root = tree:root() - - if root and ts.is_in_node_range(root, line, col) then - return root, tree, lang_tree - end - end - - if lang_tree == root_lang_tree then - break - end - - -- This case can happen when the cursor is at the start of a line that ends a injected region, - -- e.g., the first `]` in the following lua code: - -- ``` - -- vim.cmd[[ - -- ]] - -- ``` - lang_tree = lang_tree:parent() -- NOTE: parent() method is private - end - - -- This isn't a likely scenario, since the position must belong to a tree somewhere. - return nil, nil, lang_tree -end - ----comment ----@param node TSNode ----@return TSNode result -function M.get_root_for_node(node) - local parent = node - local result = node - - while parent ~= nil do - result = parent - parent = result:parent() - end - - return result -end - -function M.highlight_node(node, buf, hl_namespace, hl_group) - if not node then - return - end - M.highlight_range({ node:range() }, buf, hl_namespace, hl_group) -end - --- Get a compatible vim range (1 index based) from a TS node range. --- --- TS nodes start with 0 and the end col is ending exclusive. --- They also treat a EOF/EOL char as a char ending in the first --- col of the next row. ----comment ----@param range integer[] ----@param buf integer|nil ----@return integer, integer, integer, integer -function M.get_vim_range(range, buf) - ---@type integer, integer, integer, integer - local srow, scol, erow, ecol = unpack(range) - srow = srow + 1 - scol = scol + 1 - erow = erow + 1 - - if ecol == 0 then - -- Use the value of the last col of the previous row instead. - erow = erow - 1 - if not buf or buf == 0 then - ecol = vim.fn.col { erow, "$" } - 1 - else - ecol = #api.nvim_buf_get_lines(buf, erow - 1, erow, false)[1] - end - ecol = math.max(ecol, 1) - end - return srow, scol, erow, ecol -end - -function M.highlight_range(range, buf, hl_namespace, hl_group) - ---@type integer, integer, integer, integer - local start_row, start_col, end_row, end_col = unpack(range) - ---@diagnostic disable-next-line: missing-parameter - vim.highlight.range(buf, hl_namespace, hl_group, { start_row, start_col }, { end_row, end_col }) -end - --- Set visual selection to node --- @param selection_mode One of "charwise" (default) or "v", "linewise" or "V", --- "blockwise" or "" (as a string with 5 characters or a single character) -function M.update_selection(buf, node, selection_mode) - local start_row, start_col, end_row, end_col = M.get_vim_range({ ts.get_node_range(node) }, buf) - - local v_table = { charwise = "v", linewise = "V", blockwise = "" } - selection_mode = selection_mode or "charwise" - - -- Normalise selection_mode - if vim.tbl_contains(vim.tbl_keys(v_table), selection_mode) then - selection_mode = v_table[selection_mode] - end - - -- enter visual mode if normal or operator-pending (no) mode - -- Why? According to https://learnvimscriptthehardway.stevelosh.com/chapters/15.html - -- If your operator-pending mapping ends with some text visually selected, Vim will operate on that text. - -- Otherwise, Vim will operate on the text between the original cursor position and the new position. - local mode = api.nvim_get_mode() - if mode.mode ~= selection_mode then - -- Call to `nvim_replace_termcodes()` is needed for sending appropriate command to enter blockwise mode - selection_mode = vim.api.nvim_replace_termcodes(selection_mode, true, true, true) - api.nvim_cmd({ cmd = "normal", bang = true, args = { selection_mode } }, {}) - end - - api.nvim_win_set_cursor(0, { start_row, start_col - 1 }) - vim.cmd "normal! o" - api.nvim_win_set_cursor(0, { end_row, end_col - 1 }) -end - --- Byte length of node range ----@param node TSNode ----@return number -function M.node_length(node) - local _, _, start_byte = node:start() - local _, _, end_byte = node:end_() - return end_byte - start_byte -end - ----@deprecated Use `vim.treesitter.is_in_node_range()` instead -function M.is_in_node_range(node, line, col) - vim.notify_once( - "nvim-treesitter.ts_utils.is_in_node_range is deprecated: use vim.treesitter.is_in_node_range", - vim.log.levels.WARN - ) - return ts.is_in_node_range(node, line, col) -end - ----@deprecated Use `vim.treesitter.get_node_range()` instead -function M.get_node_range(node_or_range) - vim.notify_once( - "nvim-treesitter.ts_utils.get_node_range is deprecated: use vim.treesitter.get_node_range", - vim.log.levels.WARN - ) - return ts.get_node_range(node_or_range) -end - ----@param node TSNode ----@return table -function M.node_to_lsp_range(node) - local start_line, start_col, end_line, end_col = ts.get_node_range(node) - local rtn = {} - rtn.start = { line = start_line, character = start_col } - rtn["end"] = { line = end_line, character = end_col } - return rtn -end - --- Memoizes a function based on the buffer tick of the provided bufnr. --- The cache entry is cleared when the buffer is detached to avoid memory leaks. --- The options argument is a table with two optional values: --- - bufnr: extracts a bufnr from the given arguments. --- - key: extracts the cache key from the given arguments. ----@param fn function the fn to memoize, taking the buffer as first argument ----@param options? {bufnr: integer?, key: string|fun(...): string?} the memoization options ----@return function: a memoized function -function M.memoize_by_buf_tick(fn, options) - options = options or {} - - ---@type table - local cache = setmetatable({}, { __mode = "kv" }) - local bufnr_fn = utils.to_func(options.bufnr or utils.identity) - local key_fn = utils.to_func(options.key or utils.identity) - - return function(...) - local bufnr = bufnr_fn(...) - local key = key_fn(...) - local tick = api.nvim_buf_get_changedtick(bufnr) - - if cache[key] then - if cache[key].last_tick == tick then - return cache[key].result - end - else - local function detach_handler() - cache[key] = nil - end - - -- Clean up logic only! - api.nvim_buf_attach(bufnr, false, { - on_detach = detach_handler, - on_reload = detach_handler, - }) - end - - cache[key] = { - result = fn(...), - last_tick = tick, - } - - return cache[key].result - end -end - -function M.swap_nodes(node_or_range1, node_or_range2, bufnr, cursor_to_second) - if not node_or_range1 or not node_or_range2 then - return - end - local range1 = M.node_to_lsp_range(node_or_range1) - local range2 = M.node_to_lsp_range(node_or_range2) - - local text1 = get_node_text(node_or_range1, bufnr) - local text2 = get_node_text(node_or_range2, bufnr) - - local edit1 = { range = range1, newText = table.concat(text2, "\n") } - local edit2 = { range = range2, newText = table.concat(text1, "\n") } - bufnr = bufnr == 0 and vim.api.nvim_get_current_buf() or bufnr - vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr, "utf-8") - - if cursor_to_second then - utils.set_jump() - - local char_delta = 0 - local line_delta = 0 - if - range1["end"].line < range2.start.line - or (range1["end"].line == range2.start.line and range1["end"].character <= range2.start.character) - then - line_delta = #text2 - #text1 - end - - if range1["end"].line == range2.start.line and range1["end"].character <= range2.start.character then - if line_delta ~= 0 then - --- why? - --correction_after_line_change = -range2.start.character - --text_now_before_range2 = #(text2[#text2]) - --space_between_ranges = range2.start.character - range1["end"].character - --char_delta = correction_after_line_change + text_now_before_range2 + space_between_ranges - --- Equivalent to: - char_delta = #text2[#text2] - range1["end"].character - - -- add range1.start.character if last line of range1 (now text2) does not start at 0 - if range1.start.line == range2.start.line + line_delta then - char_delta = char_delta + range1.start.character - end - else - char_delta = #text2[#text2] - #text1[#text1] - end - end - - api.nvim_win_set_cursor( - api.nvim_get_current_win(), - { range2.start.line + 1 + line_delta, range2.start.character + char_delta } - ) - end -end - -function M.goto_node(node, goto_end, avoid_set_jump) - if not node then - return - end - if not avoid_set_jump then - utils.set_jump() - end - local range = { M.get_vim_range { node:range() } } - ---@type table - local position - if not goto_end then - position = { range[1], range[2] } - else - position = { range[3], range[4] } - end - - -- Enter visual mode if we are in operator pending mode - -- If we don't do this, it will miss the last character. - local mode = vim.api.nvim_get_mode() - if mode.mode == "no" then - vim.cmd "normal! v" - end - - -- Position is 1, 0 indexed. - api.nvim_win_set_cursor(0, { position[1], position[2] - 1 }) -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/tsrange.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/tsrange.lua deleted file mode 100644 index d41585c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/tsrange.lua +++ /dev/null @@ -1,154 +0,0 @@ -local M = {} -local TSRange = {} -TSRange.__index = TSRange - -local api = vim.api -local ts_utils = require "nvim-treesitter.ts_utils" -local parsers = require "nvim-treesitter.parsers" - -local function get_byte_offset(buf, row, col) - return api.nvim_buf_get_offset(buf, row) + vim.fn.byteidx(api.nvim_buf_get_lines(buf, row, row + 1, false)[1], col) -end - -function TSRange.new(buf, start_row, start_col, end_row, end_col) - return setmetatable({ - start_pos = { start_row, start_col, get_byte_offset(buf, start_row, start_col) }, - end_pos = { end_row, end_col, get_byte_offset(buf, end_row, end_col) }, - buf = buf, - [1] = start_row, - [2] = start_col, - [3] = end_row, - [4] = end_col, - }, TSRange) -end - -function TSRange.from_nodes(buf, start_node, end_node) - TSRange.__index = TSRange - local start_pos = start_node and { start_node:start() } or { end_node:start() } - local end_pos = end_node and { end_node:end_() } or { start_node:end_() } - return setmetatable({ - start_pos = { start_pos[1], start_pos[2], start_pos[3] }, - end_pos = { end_pos[1], end_pos[2], end_pos[3] }, - buf = buf, - [1] = start_pos[1], - [2] = start_pos[2], - [3] = end_pos[1], - [4] = end_pos[2], - }, TSRange) -end - -function TSRange.from_table(buf, range) - return setmetatable({ - start_pos = { range[1], range[2], get_byte_offset(buf, range[1], range[2]) }, - end_pos = { range[3], range[4], get_byte_offset(buf, range[3], range[4]) }, - buf = buf, - [1] = range[1], - [2] = range[2], - [3] = range[3], - [4] = range[4], - }, TSRange) -end - -function TSRange:parent() - local root_lang_tree = parsers.get_parser(self.buf) - local root = ts_utils.get_root_for_position(self[1], self[2], root_lang_tree) - - return root - and root:named_descendant_for_range(self.start_pos[1], self.start_pos[2], self.end_pos[1], self.end_pos[2]) - or nil -end - -function TSRange:field() end - -function TSRange:child_count() - return #self:collect_children() -end - -function TSRange:named_child_count() - return #self:collect_children(function(c) - return c:named() - end) -end - -function TSRange:iter_children() - local raw_iterator = self:parent().iter_children() - return function() - while true do - local node = raw_iterator() - if not node then - return - end - local _, _, start_byte = node:start() - local _, _, end_byte = node:end_() - if start_byte >= self.start_pos[3] and end_byte <= self.end_pos[3] then - return node - end - end - end -end - -function TSRange:collect_children(filter_fun) - local children = {} - for _, c in self:iter_children() do - if not filter_fun or filter_fun(c) then - table.insert(children, c) - end - end - return children -end - -function TSRange:child(index) - return self:collect_children()[index + 1] -end - -function TSRange:named_child(index) - return self:collect_children(function(c) - return c.named() - end)[index + 1] -end - -function TSRange:start() - return unpack(self.start_pos) -end - -function TSRange:end_() - return unpack(self.end_pos) -end - -function TSRange:range() - return self.start_pos[1], self.start_pos[2], self.end_pos[1], self.end_pos[2] -end - -function TSRange:type() - return "nvim-treesitter-range" -end - -function TSRange:symbol() - return -1 -end - -function TSRange:named() - return false -end - -function TSRange:missing() - return false -end - -function TSRange:has_error() - return #self:collect_children(function(c) - return c:has_error() - end) > 0 and true or false -end - -function TSRange:sexpr() - return table.concat( - vim.tbl_map(function(c) - return c:sexpr() - end, self:collect_children()), - " " - ) -end - -M.TSRange = TSRange -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/utils.lua b/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/utils.lua deleted file mode 100644 index d920f4a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/lua/nvim-treesitter/utils.lua +++ /dev/null @@ -1,237 +0,0 @@ -local api = vim.api -local fn = vim.fn -local luv = vim.loop - -local M = {} - --- Wrapper around vim.notify with common options set. ----@param msg string ----@param log_level number|nil ----@param opts table|nil -function M.notify(msg, log_level, opts) - local default_opts = { title = "nvim-treesitter" } - vim.notify(msg, log_level, vim.tbl_extend("force", default_opts, opts or {})) -end - --- Returns the system-specific path separator. ----@return string -function M.get_path_sep() - return (fn.has "win32" == 1 and not vim.opt.shellslash:get()) and "\\" or "/" -end - --- Returns a function that joins the given arguments with separator. Arguments --- can't be nil. Example: --- ---[[ - print(M.generate_join(" ")("foo", "bar")) ---]] ---prints "foo bar" ----@param separator string ----@return fun(...: string): string -function M.generate_join(separator) - return function(...) - return table.concat({ ... }, separator) - end -end - -M.join_path = M.generate_join(M.get_path_sep()) - -M.join_space = M.generate_join " " - ----@class Command ----@field run function ----@field f_args string ----@field args string - --- Define user defined vim command which calls nvim-treesitter module function --- - If module name is 'mod', it should be defined in hierarchy 'nvim-treesitter.mod' --- - A table with name 'commands' should be defined in 'mod' which needs to be passed as --- the commands param of this function --- ----@param mod string Name of the module that resides in the hierarchy - nvim-treesitter.module ----@param commands table Command list for the module ---- - {command_name} Name of the vim user defined command, Keys: ---- - {run}: (function) callback function that needs to be executed ---- - {f_args}: (string, default ) ---- - type of arguments that needs to be passed to the vim command ---- - {args}: (string, optional) ---- - vim command attributes ---- ----* @example ---- If module is nvim-treesitter.custom_mod ----
----  M.commands = {
----      custom_command = {
----          run = M.module_function,
----          f_args = "",
----          args = {
----              "-range"
----          }
----      }
----  }
----
----  utils.setup_commands("custom_mod", require("nvim-treesitter.custom_mod").commands)
----  
---- ---- Will generate command : ----
----  command! -range custom_command \
----      lua require'nvim-treesitter.custom_mod'.commands.custom_command['run']()
----  
-function M.setup_commands(mod, commands) - for command_name, def in pairs(commands) do - local f_args = def.f_args or "" - local call_fn = - string.format("lua require'nvim-treesitter.%s'.commands.%s['run'](%s)", mod, command_name, f_args) - local parts = require("nvim-treesitter.compat").flatten { - "command!", - "-bar", - def.args, - command_name, - call_fn, - } - api.nvim_command(table.concat(parts, " ")) - end -end - ----@param dir string ----@param create_err string ----@param writeable_err string ----@return string|nil, string|nil -function M.create_or_reuse_writable_dir(dir, create_err, writeable_err) - create_err = create_err or M.join_space("Could not create dir '", dir, "': ") - writeable_err = writeable_err or M.join_space("Invalid rights, '", dir, "' should be read/write") - -- Try creating and using parser_dir if it doesn't exist - if not luv.fs_stat(dir) then - local ok, error = pcall(vim.fn.mkdir, dir, "p", "0755") - if not ok then - return nil, M.join_space(create_err, error) - end - - return dir - end - - -- parser_dir exists, use it if it's read/write - if luv.fs_access(dir, "RW") then - return dir - end - - -- parser_dir exists but isn't read/write, give up - return nil, M.join_space(writeable_err, dir, "'") -end - -function M.get_package_path() - -- Path to this source file, removing the leading '@' - local source = string.sub(debug.getinfo(1, "S").source, 2) - - -- Path to the package root - return fn.fnamemodify(source, ":p:h:h:h") -end - -function M.get_cache_dir() - local cache_dir = fn.stdpath "data" - - if luv.fs_access(cache_dir, "RW") then - return cache_dir - elseif luv.fs_access("/tmp", "RW") then - return "/tmp" - end - - return nil, M.join_space("Invalid cache rights,", fn.stdpath "data", "or /tmp should be read/write") -end - --- Returns $XDG_DATA_HOME/nvim/site, but could use any directory that is in --- runtimepath -function M.get_site_dir() - return M.join_path(fn.stdpath "data", "site") -end - --- Gets a property at path ----@param tbl table the table to access ----@param path string the '.' separated path ----@return table|nil result the value at path or nil -function M.get_at_path(tbl, path) - if path == "" then - return tbl - end - - local segments = vim.split(path, ".", true) - ---@type table[]|table - local result = tbl - - for _, segment in ipairs(segments) do - if type(result) == "table" then - ---@type table - -- TODO: figure out the actual type of tbl - result = result[segment] - end - end - - return result -end - -function M.set_jump() - vim.cmd "normal! m'" -end - --- Filters a list based on the given predicate ----@param tbl any[] The list to filter ----@param predicate fun(v:any, i:number):boolean The predicate to filter with -function M.filter(tbl, predicate) - local result = {} - - for i, v in ipairs(tbl) do - if predicate(v, i) then - table.insert(result, v) - end - end - - return result -end - --- Returns a list of all values from the first list --- that are not present in the second list. ----@param tbl1 any[] The first table ----@param tbl2 any[] The second table ----@return table -function M.difference(tbl1, tbl2) - return M.filter(tbl1, function(v) - return not vim.tbl_contains(tbl2, v) - end) -end - -function M.identity(a) - return a -end - --- Returns a function returning the given value ----@param a any ----@return fun():any -function M.constant(a) - return function() - return a - end -end - --- Returns a function that returns the given value if it is a function, --- otherwise returns a function that returns the given value. ----@param a any ----@return fun(...):any -function M.to_func(a) - return type(a) == "function" and a or M.constant(a) -end - ----@return string|nil -function M.ts_cli_version() - if fn.executable "tree-sitter" == 1 then - local handle = io.popen "tree-sitter -V" - if not handle then - return - end - local result = handle:read "*a" - handle:close() - return vim.split(result, "\n")[1]:match "[^tree%psitter ].*" - end -end - -return M diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/notes.txt b/nvim/.config/nvim/vendor/nvim-treesitter/notes.txt deleted file mode 100644 index fac5944..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/notes.txt +++ /dev/null @@ -1,12 +0,0 @@ -Decoration provider "conceal_line" (ns=nvim.treesitter.highlighter): -Lua: .../neovim/0.12.1/share/nvim/runtime/lua/vim/treesitter.lua:196: attempt to call method 'range' (a nil value) -stack traceback: - .../neovim/0.12.1/share/nvim/runtime/lua/vim/treesitter.lua:196: in function 'get_range' - .../neovim/0.12.1/share/nvim/runtime/lua/vim/treesitter.lua:231: in function 'get_node_text' - ...nvim-treesitter/lua/nvim-treesitter/query_predicates.lua:141: in function 'handler' - ...m/0.12.1/share/nvim/runtime/lua/vim/treesitter/query.lua:868: in function '_apply_directives' - ...m/0.12.1/share/nvim/runtime/lua/vim/treesitter/query.lua:1089: in function '(for generator)' - ...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:1123: in function '_get_injections' - ...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:690: in function '_parse' - ...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:639: in function 'parse' - ....1/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:529: in function <....1/s diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/parser-info/.gitignore b/nvim/.config/nvim/vendor/nvim-treesitter/parser-info/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/parser-info/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/parser/.gitignore b/nvim/.config/nvim/vendor/nvim-treesitter/parser/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/parser/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/plugin/nvim-treesitter.lua b/nvim/.config/nvim/vendor/nvim-treesitter/plugin/nvim-treesitter.lua deleted file mode 100644 index 4ea3925..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/plugin/nvim-treesitter.lua +++ /dev/null @@ -1,34 +0,0 @@ --- Last Change: 2022 Apr 16 - -if vim.g.loaded_nvim_treesitter then - return -end -vim.g.loaded_nvim_treesitter = true - --- setup modules -require("nvim-treesitter").setup() - -local api = vim.api - --- define autocommands -local augroup = api.nvim_create_augroup("NvimTreesitter", {}) - -api.nvim_create_autocmd("Filetype", { - pattern = "query", - group = augroup, - callback = function() - api.nvim_clear_autocmds { - group = augroup, - event = "BufWritePost", - } - api.nvim_create_autocmd("BufWritePost", { - group = augroup, - buffer = 0, - callback = function(opts) - require("nvim-treesitter.query").invalidate_query_file(opts.file) - end, - desc = "Invalidate query file", - }) - end, - desc = "Reload query", -}) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/folds.scm deleted file mode 100644 index 8e3defa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/folds.scm +++ /dev/null @@ -1,13 +0,0 @@ -; Support for folding in Ada -; za toggles folding a package, subprogram, if statement or loop -[ - (package_declaration) - (generic_package_declaration) - (package_body) - (subprogram_body) - (block_statement) - (if_statement) - (loop_statement) - (gnatprep_declarative_if_statement) - (gnatprep_if_statement) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/highlights.scm deleted file mode 100644 index 0d42b70..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/highlights.scm +++ /dev/null @@ -1,286 +0,0 @@ -; highlight queries. -; See the syntax at https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries -; See also https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#parser-configurations -; for a list of recommended @ tags, though not all of them have matching -; highlights in neovim. -[ - "abort" - "abs" - "abstract" - "accept" - "access" - "all" - "array" - "at" - "begin" - "body" - "declare" - "delay" - "delta" - "digits" - "do" - "end" - "entry" - "exit" - "generic" - "interface" - "is" - "limited" - "mod" - "new" - "null" - "of" - "others" - "out" - "overriding" - "package" - "pragma" - "private" - "protected" - "range" - "separate" - "subtype" - "synchronized" - "tagged" - "task" - "terminate" - "type" - "until" - "when" -] @keyword - -"record" @keyword.type - -[ - "aliased" - "constant" - "renames" -] @keyword.modifier - -[ - "with" - "use" -] @keyword.import - -[ - "function" - "procedure" -] @keyword.function - -[ - "and" - "in" - "not" - "or" - "xor" -] @keyword.operator - -[ - "while" - "loop" - "for" - "parallel" - "reverse" - "some" -] @keyword.repeat - -"return" @keyword.return - -[ - "case" - "if" - "else" - "then" - "elsif" - "select" -] @keyword.conditional - -[ - "exception" - "raise" -] @keyword.exception - -(comment) @comment @spell - -(string_literal) @string - -(character_literal) @string - -(numeric_literal) @number - -; Highlight the name of subprograms -(procedure_specification - name: (_) @function) - -(function_specification - name: (_) @function) - -(package_declaration - name: (_) @function) - -(package_body - name: (_) @function) - -(generic_instantiation - name: (_) @function) - -(entry_declaration - . - (identifier) @function) - -; Some keywords should take different categories depending on the context -(use_clause - "use" @keyword.import - "type" @keyword.import) - -(with_clause - "private" @keyword.import) - -(with_clause - "limited" @keyword.import) - -(use_clause - (_) @module) - -(with_clause - (_) @module) - -(loop_statement - "end" @keyword.repeat) - -(if_statement - "end" @keyword.conditional) - -(loop_parameter_specification - "in" @keyword.repeat) - -(loop_parameter_specification - "in" @keyword.repeat) - -(iterator_specification - [ - "in" - "of" - ] @keyword.repeat) - -(range_attribute_designator - "range" @keyword.repeat) - -(raise_statement - "with" @keyword.exception) - -(gnatprep_declarative_if_statement) @keyword.directive - -(gnatprep_if_statement) @keyword.directive - -(gnatprep_identifier) @keyword.directive - -(subprogram_declaration - "is" @keyword.function - "abstract" @keyword.function) - -(aspect_specification - "with" @keyword.function) - -(full_type_declaration - "is" @keyword.type) - -(subtype_declaration - "is" @keyword.type) - -(record_definition - "end" @keyword.type) - -(full_type_declaration - (_ - "access" @keyword.type)) - -(array_type_definition - "array" @keyword.type - "of" @keyword.type) - -(access_to_object_definition - "access" @keyword.type) - -(access_to_object_definition - "access" @keyword.type - [ - (general_access_modifier - "constant" @keyword.type) - (general_access_modifier - "all" @keyword.type) - ]) - -(range_constraint - "range" @keyword.type) - -(signed_integer_type_definition - "range" @keyword.type) - -(index_subtype_definition - "range" @keyword.type) - -(record_type_definition - "abstract" @keyword.type) - -(record_type_definition - "tagged" @keyword.type) - -(record_type_definition - "limited" @keyword.type) - -(record_type_definition - (record_definition - "null" @keyword.type)) - -(private_type_declaration - "is" @keyword.type - "private" @keyword.type) - -(private_type_declaration - "tagged" @keyword.type) - -(private_type_declaration - "limited" @keyword.type) - -(task_type_declaration - "task" @keyword.type - "is" @keyword.type) - -; Gray the body of expression functions -(expression_function_declaration - (function_specification) - "is" - (_) @attribute) - -(subprogram_declaration - (aspect_specification) @attribute) - -; Highlight full subprogram specifications -;(subprogram_body -; [ -; (procedure_specification) -; (function_specification) -; ] @function.spec -;) -((comment) @comment.documentation - . - [ - (entry_declaration) - (subprogram_declaration) - (parameter_specification) - ]) - -(compilation_unit - . - (comment) @comment.documentation) - -(component_list - (component_declaration) - . - (comment) @comment.documentation) - -(enumeration_type_definition - (identifier) - . - (comment) @comment.documentation) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/locals.scm deleted file mode 100644 index bdfc38b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ada/locals.scm +++ /dev/null @@ -1,91 +0,0 @@ -; Better highlighting by referencing to the definition, for variable -; references. However, this is not yet supported by neovim -; See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables -(compilation) @local.scope - -(package_declaration) @local.scope - -(package_body) @local.scope - -(subprogram_declaration) @local.scope - -(subprogram_body) @local.scope - -(block_statement) @local.scope - -(with_clause - (identifier) @local.definition.import) - -(procedure_specification - name: (_) @local.definition.function) - -(function_specification - name: (_) @local.definition.function) - -(package_declaration - name: (_) @local.definition.var) - -(package_body - name: (_) @local.definition.var) - -(generic_instantiation - . - name: (_) @local.definition.var) - -(component_declaration - . - (identifier) @local.definition.var) - -(exception_declaration - . - (identifier) @local.definition.var) - -(formal_object_declaration - . - (identifier) @local.definition.var) - -(object_declaration - . - (identifier) @local.definition.var) - -(parameter_specification - . - (identifier) @local.definition.var) - -(full_type_declaration - . - (identifier) @local.definition.type) - -(private_type_declaration - . - (identifier) @local.definition.type) - -(private_extension_declaration - . - (identifier) @local.definition.type) - -(incomplete_type_declaration - . - (identifier) @local.definition.type) - -(protected_type_declaration - . - (identifier) @local.definition.type) - -(formal_complete_type_declaration - . - (identifier) @local.definition.type) - -(formal_incomplete_type_declaration - . - (identifier) @local.definition.type) - -(task_type_declaration - . - (identifier) @local.definition.type) - -(subtype_declaration - . - (identifier) @local.definition.type) - -(identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/folds.scm deleted file mode 100644 index 5e1051f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/folds.scm +++ /dev/null @@ -1,4 +0,0 @@ -[ - (record) - (module) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/highlights.scm deleted file mode 100644 index 4626a8c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/highlights.scm +++ /dev/null @@ -1,87 +0,0 @@ -; Constants -(integer) @number - -; Variables and Symbols -(typed_binding - (atom - (qid) @variable)) - -(untyped_binding) @variable - -(typed_binding - (expr) @type) - -(id) @function - -(bid) @function - -(function_name - (atom - (qid) @function)) - -(field_name) @function - -[ - (data_name) - (record_name) -] @constructor - -; Set -(SetN) @type.builtin - -(expr - . - (atom) @function) - -((atom) @boolean - (#any-of? @boolean "true" "false" "True" "False")) - -; Imports and Module Declarations -"import" @keyword.import - -(module_name) @module - -; Pragmas and comments -(pragma) @keyword.directive - -(comment) @comment @spell - -; Keywords -[ - "where" - "data" - "rewrite" - "postulate" - "public" - "private" - "tactic" - "Prop" - "quote" - "renaming" - "open" - "in" - "hiding" - "constructor" - "abstract" - "let" - "field" - "mutual" - "module" - "infix" - "infixl" - "infixr" -] @keyword - -"record" @keyword.type - -;(expr -; f_name: (atom) @function) -; Brackets -[ - "(" - ")" - "{" - "}" -] @punctuation.bracket - -"=" @operator diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/agda/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/folds.scm deleted file mode 100644 index 1f2129c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/folds.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: html diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/highlights.scm deleted file mode 100644 index 271e352..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/highlights.scm +++ /dev/null @@ -1,154 +0,0 @@ -; inherits: html_tags - -(identifier) @variable - -(pipe_operator) @operator - -[ - (string) - (static_member_expression) -] @string - -(number) @number - -(pipe_call - name: (identifier) @function) - -(pipe_call - arguments: (pipe_arguments - (identifier) @variable.parameter)) - -(structural_directive - "*" @keyword - (identifier) @keyword) - -(attribute - (attribute_name) @variable.member - (#lua-match? @variable.member "#.*")) - -(binding_name - (identifier) @keyword) - -(event_binding - (binding_name - (identifier) @keyword)) - -(event_binding - "\"" @punctuation.delimiter) - -(property_binding - "\"" @punctuation.delimiter) - -(structural_assignment - operator: (identifier) @keyword) - -(member_expression - property: (identifier) @property) - -(call_expression - function: (identifier) @function) - -(call_expression - function: ((identifier) @function.builtin - (#eq? @function.builtin "$any"))) - -(pair - key: ((identifier) @variable.builtin - (#eq? @variable.builtin "$implicit"))) - -[ - (control_keyword) - (special_keyword) -] @keyword - -((control_keyword) @keyword.repeat - (#any-of? @keyword.repeat "for" "empty")) - -((control_keyword) @keyword.conditional - (#any-of? @keyword.conditional "if" "else" "switch" "case" "default")) - -((control_keyword) @keyword.coroutine - (#any-of? @keyword.coroutine "defer" "placeholder" "loading")) - -((control_keyword) @keyword.exception - (#eq? @keyword.exception "error")) - -((identifier) @boolean - (#any-of? @boolean "true" "false")) - -((identifier) @variable.builtin - (#any-of? @variable.builtin "this" "$event")) - -((identifier) @constant.builtin - (#eq? @constant.builtin "null")) - -[ - (ternary_operator) - (conditional_operator) -] @keyword.conditional.ternary - -[ - "(" - ")" - "[" - "]" - "{" - "}" - "@" -] @punctuation.bracket - -(two_way_binding - [ - "[(" - ")]" - ] @punctuation.bracket) - -[ - "{{" - "}}" -] @punctuation.special - -(template_substitution - [ - "${" - "}" - ] @punctuation.special) - -(template_chars) @string - -[ - ";" - "." - "," - "?." -] @punctuation.delimiter - -(nullish_coalescing_expression - (coalescing_operator) @operator) - -(concatenation_expression - "+" @operator) - -(icu_clause) @keyword.operator - -(icu_category) @keyword.conditional - -(binary_expression - [ - "-" - "&&" - "+" - "<" - "<=" - "=" - "==" - "===" - "!=" - "!==" - ">" - ">=" - "*" - "/" - "||" - "%" - ] @operator) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/indents.scm deleted file mode 100644 index 2f46aa5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/indents.scm +++ /dev/null @@ -1,16 +0,0 @@ -; inherits: html_tags - -[ - (statement_block) - (switch_statement) -] @indent.begin - -(statement_block - "{" @indent.branch) - -(statement_block - "}" @indent.end) - -"}" @indent.branch - -"}" @indent.end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/injections.scm deleted file mode 100644 index 448e942..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/injections.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: html_tags diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/locals.scm deleted file mode 100644 index 1f2129c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/angular/locals.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: html diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/folds.scm deleted file mode 100644 index fdfc2a1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/folds.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (class_body) - (constructor_declaration) - (argument_list) - (annotation_argument_list) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/highlights.scm deleted file mode 100644 index 82ce234..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/highlights.scm +++ /dev/null @@ -1,257 +0,0 @@ -; inherits: soql - -; Apex + SOQL -[ - "[" - "]" - "{" - "}" - "(" - ")" -] @punctuation.bracket - -[ - "," - "." - ":" - "?" - ";" -] @punctuation.delimiter - -; Default general color definition -(identifier) @variable - -(type_identifier) @type - -; Methods -(method_declaration - name: (identifier) @function.method) - -(method_invocation - name: (identifier) @function.method.call) - -(super) @function.builtin - -; Annotations -(annotation - name: (identifier) @attribute) - -; Types -(interface_declaration - name: (identifier) @type) - -(class_declaration - name: (identifier) @type) - -(class_declaration - (superclass) @type) - -(enum_declaration - name: (identifier) @type) - -(enum_constant - name: (identifier) @constant) - -(type_arguments - "<" @punctuation.delimiter) - -(type_arguments - ">" @punctuation.delimiter) - -(field_access - object: (identifier) @type) - -(field_access - field: (identifier) @property) - -((scoped_identifier - scope: (identifier) @type) - (#match? @type "^[A-Z]")) - -((method_invocation - object: (identifier) @type) - (#match? @type "^[A-Z]")) - -(method_declaration - (formal_parameters - (formal_parameter - name: (identifier) @variable.parameter))) - -(constructor_declaration - name: (identifier) @constructor) - -(dml_type) @function.builtin - -(assignment_operator) @operator - -(update_operator) @operator - -(trigger_declaration - name: (identifier) @type - object: (identifier) @type - (trigger_event) @keyword - ("," - (trigger_event) @keyword)*) - -[ - "@" - "=" - "!=" - "<=" - ">=" -] @operator - -(binary_expression - operator: [ - ">" - "<" - "==" - "===" - "!==" - "&&" - "||" - "+" - "-" - "*" - "/" - "&" - "|" - "^" - "%" - "<<" - ">>" - ">>>" - ] @operator) - -(unary_expression - operator: [ - "+" - "-" - "!" - "~" - ]) @operator - -"=>" @operator - -[ - (boolean_type) - (void_type) -] @type.builtin - -; Fields -(field_declaration - declarator: (variable_declarator - name: (identifier) @variable.member)) - -(field_access - field: (identifier) @variable.member) - -; Variables -(variable_declarator - (identifier) @property) - -(field_declaration - (modifiers - (modifier - [ - (final) - (static) - ]) - (modifier - [ - (final) - (static) - ])) - (variable_declarator - name: (identifier) @constant)) - -((identifier) @constant - (#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) ; SCREAM SNAKE CASE - -(this) @variable.builtin - -; Literals -[ - (int) - (decimal) - (currency_literal) -] @number - -(string_literal) @string - -[ - (line_comment) - (block_comment) -] @comment - -(null_literal) @constant.builtin - -; ;; Keywords -[ - "abstract" - "final" - "private" - "protected" - "public" - "static" -] @keyword.modifier - -[ - "if" - "else" - "switch" -] @keyword.conditional - -[ - "for" - "while" - "do" - "break" -] @keyword.repeat - -"return" @keyword.return - -[ - "throw" - "finally" - "try" - "catch" -] @keyword.exception - -"new" @keyword.operator - -[ - (abstract) - (all_rows_clause) - "continue" - "extends" - (final) - "get" - (global) - "implements" - "instanceof" - "on" - (override) - (private) - (protected) - (public) - "set" - (static) - (testMethod) - (webservice) - (transient) - "trigger" - (virtual) - "when" - (with_sharing) - (without_sharing) - (inherited_sharing) -] @keyword - -[ - "interface" - "class" - "enum" -] @keyword.type - -"System.runAs" @function.builtin diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/injections.scm deleted file mode 100644 index 3cd6aac..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (line_comment) - (block_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/locals.scm deleted file mode 100644 index d758f14..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/apex/locals.scm +++ /dev/null @@ -1,67 +0,0 @@ -; declarations -(class_declaration) @local.scope - -(method_declaration) @local.scope - -(constructor_declaration) @local.scope - -(enum_declaration) @local.scope - -(enhanced_for_statement) @local.scope - -; if/else -(if_statement) @local.scope - -(if_statement - consequence: (_) @local.scope) ; if body in case there are no braces - -(if_statement - alternative: (_) @local.scope) ; else body in case there are no braces - -; try/catch -(try_statement) @local.scope ; covers try+catch, individual try and catch are covered by (block) - -(catch_clause) @local.scope ; needed because `Exception` variable - -; loops -(for_statement) @local.scope - -(for_statement ; "for" body in case there are no braces - body: (_) @local.scope) - -(do_statement - body: (_) @local.scope) - -(while_statement - body: (_) @local.scope) - -; Functions -(constructor_declaration) @local.scope - -(method_declaration) @local.scope - -; definitions -(enum_declaration - name: (identifier) @local.definition.enum) - -(method_declaration - name: (identifier) @local.definition.method) - -(local_variable_declaration - declarator: (variable_declarator - name: (identifier) @local.definition.var)) - -(enhanced_for_statement - name: (identifier) @local.definition.var) - -(formal_parameter - name: (identifier) @local.definition.parameter) - -(field_declaration - declarator: (variable_declarator - name: (identifier) @local.definition.field)) - -; REFERENCES -(identifier) @local.reference - -(type_identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/folds.scm deleted file mode 100644 index b617fdc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/folds.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: cpp diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/highlights.scm deleted file mode 100644 index e6bf147..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/highlights.scm +++ /dev/null @@ -1,53 +0,0 @@ -; inherits: cpp - -((identifier) @function.builtin - (#any-of? @function.builtin - ; Digital I/O - "digitalRead" "digitalWrite" "pinMode" - ; Analog I/O - "analogRead" "analogReference" "analogWrite" - ; Zero, Due & MKR Family - "analogReadResolution" "analogWriteResolution" - ; Advanced I/O - "noTone" "pulseIn" "pulseInLong" "shiftIn" "shiftOut" "tone" - ; Time - "delay" "delayMicroseconds" "micros" "millis" - ; Math - "abs" "constrain" "map" "max" "min" "pow" "sq" "sqrt" - ; Trigonometry - "cos" "sin" "tan" - ; Characters - "isAlpha" "isAlphaNumeric" "isAscii" "isControl" "isDigit" "isGraph" "isHexadecimalDigit" - "isLowerCase" "isPrintable" "isPunct" "isSpace" "isUpperCase" "isWhitespace" - ; Random Numbers - "random" "randomSeed" - ; Bits and Bytes - "bit" "bitClear" "bitRead" "bitSet" "bitWrite" "highByte" "lowByte" - ; External Interrupts - "attachInterrupt" "detachInterrupt" - ; Interrupts - "interrupts" "noInterrupts")) - -((identifier) @type.builtin - (#any-of? @type.builtin "Serial" "SPI" "Stream" "Wire" "Keyboard" "Mouse" "String")) - -((identifier) @constant.builtin - (#any-of? @constant.builtin "HIGH" "LOW" "INPUT" "OUTPUT" "INPUT_PULLUP" "LED_BUILTIN")) - -(function_definition - (function_declarator - declarator: (identifier) @function.builtin) - (#any-of? @function.builtin "loop" "setup")) - -(call_expression - function: (primitive_type) @function.builtin) - -(call_expression - function: (identifier) @constructor - (#any-of? @constructor "SPISettings" "String")) - -(declaration - (type_identifier) @type.builtin - (function_declarator - declarator: (identifier) @constructor) - (#eq? @type.builtin "SPISettings")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/indents.scm deleted file mode 100644 index b617fdc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/indents.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: cpp diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/injections.scm deleted file mode 100644 index b637d9b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -((preproc_arg) @injection.content - (#set! injection.language "arduino")) - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/locals.scm deleted file mode 100644 index b617fdc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/arduino/locals.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: cpp diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/asm/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/asm/highlights.scm deleted file mode 100644 index eccf9c9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/asm/highlights.scm +++ /dev/null @@ -1,66 +0,0 @@ -; General -(label - [ - (ident) - (word) - ] @label) - -(reg) @variable.builtin - -(meta - kind: (_) @function.builtin) - -(instruction - kind: (_) @function.builtin) - -(const - name: (word) @constant) - -; Comments -[ - (line_comment) - (block_comment) -] @comment @spell - -; Literals -(int) @number - -(float) @number.float - -(string) @string - -; Keywords -[ - "byte" - "word" - "dword" - "qword" - "ptr" - "rel" - "label" - "const" -] @keyword - -; Operators & Punctuation -[ - "+" - "-" - "*" - "/" - "%" - "|" - "^" - "&" -] @operator - -[ - "(" - ")" - "[" - "]" -] @punctuation.bracket - -[ - "," - ":" -] @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/asm/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/asm/injections.scm deleted file mode 100644 index 3cd6aac..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/asm/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (line_comment) - (block_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/astro/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/astro/folds.scm deleted file mode 100644 index 1f2129c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/astro/folds.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: html diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/astro/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/astro/highlights.scm deleted file mode 100644 index e2917ad..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/astro/highlights.scm +++ /dev/null @@ -1,29 +0,0 @@ -; inherits: html_tags - -(doctype) @constant - -"" - "<=" - ">=" - "==" - "!=" - "~" - "!~" - "in" - "&&" - "||" - ] @operator) - -(unary_exp - [ - "!" - "+" - "-" - ] @operator) - -(assignment_exp - [ - "=" - "+=" - "-=" - "*=" - "/=" - "%=" - "^=" - ] @operator) - -(ternary_exp - [ - "?" - ":" - ] @keyword.conditional.ternary) - -(update_exp - [ - "++" - "--" - ] @operator) - -(redirected_io_statement - [ - ">" - ">>" - ] @operator) - -(piped_io_statement - [ - "|" - "|&" - ] @operator) - -(piped_io_exp - [ - "|" - "|&" - ] @operator) - -(field_ref - "$" @punctuation.delimiter) - -(regex - "/" @punctuation.delimiter) - -(regex_constant - "@" @punctuation.delimiter) - -[ - ";" - "," -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/awk/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/awk/injections.scm deleted file mode 100644 index 3e67da2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/awk/injections.scm +++ /dev/null @@ -1,17 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((regex) @injection.content - (#set! injection.language "regex")) - -((print_statement - (exp_list - . - (string) @injection.content)) - (#set! injection.language "printf")) - -((printf_statement - (exp_list - . - (string) @injection.content)) - (#set! injection.language "printf")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/folds.scm deleted file mode 100644 index 766dbe5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/folds.scm +++ /dev/null @@ -1,9 +0,0 @@ -[ - (function_definition) - (if_statement) - (case_statement) - (for_statement) - (while_statement) - (c_style_for_statement) - (heredoc_redirect) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/highlights.scm deleted file mode 100644 index 58d57d9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/highlights.scm +++ /dev/null @@ -1,261 +0,0 @@ -[ - "(" - ")" - "{" - "}" - "[" - "]" - "[[" - "]]" - "((" - "))" -] @punctuation.bracket - -[ - ";" - ";;" - ";&" - ";;&" - "&" -] @punctuation.delimiter - -[ - ">" - ">>" - "<" - "<<" - "&&" - "|" - "|&" - "||" - "=" - "+=" - "=~" - "==" - "!=" - "&>" - "&>>" - "<&" - ">&" - ">|" - "<&-" - ">&-" - "<<-" - "<<<" - ".." - "!" -] @operator - -; Do *not* spell check strings since they typically have some sort of -; interpolation in them, or, are typically used for things like filenames, URLs, -; flags and file content. -[ - (string) - (raw_string) - (ansi_c_string) - (heredoc_body) -] @string - -[ - (heredoc_start) - (heredoc_end) -] @label - -(variable_assignment - (word) @string) - -(command - argument: "$" @string) ; bare dollar - -(concatenation - (word) @string) - -[ - "if" - "then" - "else" - "elif" - "fi" - "case" - "in" - "esac" -] @keyword.conditional - -[ - "for" - "do" - "done" - "select" - "until" - "while" -] @keyword.repeat - -[ - "declare" - "typeset" - "readonly" - "local" - "unset" - "unsetenv" -] @keyword - -"export" @keyword.import - -"function" @keyword.function - -(special_variable_name) @constant - -; trap -l -((word) @constant.builtin - (#any-of? @constant.builtin - "SIGHUP" "SIGINT" "SIGQUIT" "SIGILL" "SIGTRAP" "SIGABRT" "SIGBUS" "SIGFPE" "SIGKILL" "SIGUSR1" - "SIGSEGV" "SIGUSR2" "SIGPIPE" "SIGALRM" "SIGTERM" "SIGSTKFLT" "SIGCHLD" "SIGCONT" "SIGSTOP" - "SIGTSTP" "SIGTTIN" "SIGTTOU" "SIGURG" "SIGXCPU" "SIGXFSZ" "SIGVTALRM" "SIGPROF" "SIGWINCH" - "SIGIO" "SIGPWR" "SIGSYS" "SIGRTMIN" "SIGRTMIN+1" "SIGRTMIN+2" "SIGRTMIN+3" "SIGRTMIN+4" - "SIGRTMIN+5" "SIGRTMIN+6" "SIGRTMIN+7" "SIGRTMIN+8" "SIGRTMIN+9" "SIGRTMIN+10" "SIGRTMIN+11" - "SIGRTMIN+12" "SIGRTMIN+13" "SIGRTMIN+14" "SIGRTMIN+15" "SIGRTMAX-14" "SIGRTMAX-13" - "SIGRTMAX-12" "SIGRTMAX-11" "SIGRTMAX-10" "SIGRTMAX-9" "SIGRTMAX-8" "SIGRTMAX-7" "SIGRTMAX-6" - "SIGRTMAX-5" "SIGRTMAX-4" "SIGRTMAX-3" "SIGRTMAX-2" "SIGRTMAX-1" "SIGRTMAX")) - -((word) @boolean - (#any-of? @boolean "true" "false")) - -(comment) @comment @spell - -(test_operator) @operator - -(command_substitution - "$(" @punctuation.special - ")" @punctuation.special) - -(process_substitution - [ - "<(" - ">(" - ] @punctuation.special - ")" @punctuation.special) - -(arithmetic_expansion - [ - "$((" - "((" - ] @punctuation.special - "))" @punctuation.special) - -(arithmetic_expansion - "," @punctuation.delimiter) - -(ternary_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) - -(binary_expression - operator: _ @operator) - -(unary_expression - operator: _ @operator) - -(postfix_expression - operator: _ @operator) - -(function_definition - name: (word) @function) - -(command_name - (word) @function.call) - -(command_name - (word) @function.builtin - (#any-of? @function.builtin - "." ":" "alias" "bg" "bind" "break" "builtin" "caller" "cd" "command" "compgen" "complete" - "compopt" "continue" "coproc" "dirs" "disown" "echo" "enable" "eval" "exec" "exit" "false" "fc" - "fg" "getopts" "hash" "help" "history" "jobs" "kill" "let" "logout" "mapfile" "popd" "printf" - "pushd" "pwd" "read" "readarray" "return" "set" "shift" "shopt" "source" "suspend" "test" "time" - "times" "trap" "true" "type" "typeset" "ulimit" "umask" "unalias" "wait")) - -(command - argument: [ - (word) @variable.parameter - (concatenation - (word) @variable.parameter) - ]) - -(declaration_command - (word) @variable.parameter) - -(unset_command - (word) @variable.parameter) - -(number) @number - -((word) @number - (#lua-match? @number "^[0-9]+$")) - -(file_redirect - (word) @string.special.path) - -(herestring_redirect - (word) @string) - -(file_descriptor) @operator - -(simple_expansion - "$" @punctuation.special) @none - -(expansion - "${" @punctuation.special - "}" @punctuation.special) @none - -(expansion - operator: _ @punctuation.special) - -(expansion - "@" - . - operator: _ @character.special) - -((expansion - (subscript - index: (word) @character.special)) - (#any-of? @character.special "@" "*")) - -"``" @punctuation.special - -(variable_name) @variable - -((variable_name) @constant - (#lua-match? @constant "^[A-Z][A-Z_0-9]*$")) - -((variable_name) @variable.builtin - (#any-of? @variable.builtin - ; https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Variables.html - "CDPATH" "HOME" "IFS" "MAIL" "MAILPATH" "OPTARG" "OPTIND" "PATH" "PS1" "PS2" - ; https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html - "_" "BASH" "BASHOPTS" "BASHPID" "BASH_ALIASES" "BASH_ARGC" "BASH_ARGV" "BASH_ARGV0" "BASH_CMDS" - "BASH_COMMAND" "BASH_COMPAT" "BASH_ENV" "BASH_EXECUTION_STRING" "BASH_LINENO" - "BASH_LOADABLES_PATH" "BASH_REMATCH" "BASH_SOURCE" "BASH_SUBSHELL" "BASH_VERSINFO" - "BASH_VERSION" "BASH_XTRACEFD" "CHILD_MAX" "COLUMNS" "COMP_CWORD" "COMP_LINE" "COMP_POINT" - "COMP_TYPE" "COMP_KEY" "COMP_WORDBREAKS" "COMP_WORDS" "COMPREPLY" "COPROC" "DIRSTACK" "EMACS" - "ENV" "EPOCHREALTIME" "EPOCHSECONDS" "EUID" "EXECIGNORE" "FCEDIT" "FIGNORE" "FUNCNAME" - "FUNCNEST" "GLOBIGNORE" "GROUPS" "histchars" "HISTCMD" "HISTCONTROL" "HISTFILE" "HISTFILESIZE" - "HISTIGNORE" "HISTSIZE" "HISTTIMEFORMAT" "HOSTFILE" "HOSTNAME" "HOSTTYPE" "IGNOREEOF" "INPUTRC" - "INSIDE_EMACS" "LANG" "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" "LC_NUMERIC" "LC_TIME" - "LINENO" "LINES" "MACHTYPE" "MAILCHECK" "MAPFILE" "OLDPWD" "OPTERR" "OSTYPE" "PIPESTATUS" - "POSIXLY_CORRECT" "PPID" "PROMPT_COMMAND" "PROMPT_DIRTRIM" "PS0" "PS3" "PS4" "PWD" "RANDOM" - "READLINE_ARGUMENT" "READLINE_LINE" "READLINE_MARK" "READLINE_POINT" "REPLY" "SECONDS" "SHELL" - "SHELLOPTS" "SHLVL" "SRANDOM" "TIMEFORMAT" "TMOUT" "TMPDIR" "UID")) - -(case_item - value: (word) @variable.parameter) - -[ - (regex) - (extglob_pattern) -] @string.regexp - -((program - . - (comment) @keyword.directive @nospell) - (#lua-match? @keyword.directive "^#!/")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/injections.scm deleted file mode 100644 index 9b86e35..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/injections.scm +++ /dev/null @@ -1,79 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((regex) @injection.content - (#set! injection.language "regex")) - -((heredoc_redirect - (heredoc_body) @injection.content - (heredoc_end) @injection.language) - (#downcase! @injection.language)) - -; printf 'format' -((command - name: (command_name) @_command - . - argument: [ - (string) @injection.content - (concatenation - (string) @injection.content) - (raw_string) @injection.content - (concatenation - (raw_string) @injection.content) - ]) - (#eq? @_command "printf") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "printf")) - -; printf -v var 'format' -((command - name: (command_name) @_command - argument: (word) @_arg - . - (_) - . - argument: [ - (string) @injection.content - (concatenation - (string) @injection.content) - (raw_string) @injection.content - (concatenation - (raw_string) @injection.content) - ]) - (#eq? @_command "printf") - (#eq? @_arg "-v") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "printf")) - -; printf -- 'format' -((command - name: (command_name) @_command - argument: (word) @_arg - . - argument: [ - (string) @injection.content - (concatenation - (string) @injection.content) - (raw_string) @injection.content - (concatenation - (raw_string) @injection.content) - ]) - (#eq? @_command "printf") - (#eq? @_arg "--") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "printf")) - -((command - name: (command_name) @_command - . - argument: [ - (string) - (raw_string) - ] @injection.content) - (#eq? @_command "bind") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "readline")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/locals.scm deleted file mode 100644 index 347f51f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bash/locals.scm +++ /dev/null @@ -1,14 +0,0 @@ -; Scopes -(function_definition) @local.scope - -; Definitions -(variable_assignment - name: (variable_name) @local.definition.var) - -(function_definition - name: (word) @local.definition.function) - -; References -(variable_name) @local.reference - -(word) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/folds.scm deleted file mode 100644 index d99e0c1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (list) - (scope) - (cons) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/highlights.scm deleted file mode 100644 index f84993a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/highlights.scm +++ /dev/null @@ -1,126 +0,0 @@ -; Variables -(list - (symbol) @variable) - -(cons - (symbol) @variable) - -(scope - (symbol) @variable) - -(symbind - (symbol) @variable) - -; Constants -((symbol) @constant - (#lua-match? @constant "^_*[A-Z][A-Z0-9_]*$")) - -; Functions -(list - . - (symbol) @function) - -; Namespaces -(symbind - (symbol) @module - . - (keyword)) - -; Includes -((symbol) @keyword.import - (#any-of? @keyword.import "use" "import" "load")) - -; Keywords -((symbol) @keyword - (#any-of? @keyword "do" "doc")) - -; Special Functions -; Keywords construct a symbol -(keyword) @constructor - -((list - . - (symbol) @keyword.function - . - (symbol) @function - (symbol)? @variable.parameter) - (#any-of? @keyword.function "def" "defop" "defn" "fn")) - -((cons - . - (symbol) @keyword.function - . - (symbol) @function - (symbol)? @variable.parameter) - (#any-of? @keyword.function "def" "defop" "defn" "fn")) - -((symbol) @function.builtin - (#any-of? @function.builtin - "dump" "mkfs" "json" "log" "error" "now" "cons" "wrap" "unwrap" "eval" "make-scope" "bind" - "meta" "with-meta" "null?" "ignore?" "boolean?" "number?" "string?" "symbol?" "scope?" "sink?" - "source?" "list?" "pair?" "applicative?" "operative?" "combiner?" "path?" "empty?" "thunk?" "+" - "*" "quot" "-" "max" "min" "=" ">" ">=" "<" "<=" "list->source" "across" "emit" "next" - "reduce-kv" "assoc" "symbol->string" "string->symbol" "str" "substring" "trim" "scope->list" - "string->fs-path" "string->cmd-path" "string->dir" "subpath" "path-name" "path-stem" - "with-image" "with-dir" "with-args" "with-cmd" "with-stdin" "with-env" "with-insecure" - "with-label" "with-port" "with-tls" "with-mount" "thunk-cmd" "thunk-args" "resolve" "start" - "addr" "wait" "read" "cache-dir" "binds?" "recall-memo" "store-memo" "mask" "list" "list*" - "first" "rest" "length" "second" "third" "map" "map-pairs" "foldr" "foldl" "append" "filter" - "conj" "list->scope" "merge" "apply" "id" "always" "vals" "keys" "memo" "succeeds?" "run" "last" - "take" "take-all" "insecure!" "from" "cd" "wrap-cmd" "mkfile" "path-base" "not")) - -((symbol) @function.macro - (#any-of? @function.macro - "op" "current-scope" "quote" "let" "provide" "module" "or" "and" "curryfn" "for" "$" "linux")) - -; Conditionals -((symbol) @keyword.conditional - (#any-of? @keyword.conditional "if" "case" "cond" "when")) - -; Repeats -((symbol) @keyword.repeat - (#any-of? @keyword.repeat "each")) - -; Operators -((symbol) @operator - (#any-of? @operator "&" "*" "+" "-" "<" "<=" "=" ">" ">=")) - -; Punctuation -[ - "(" - ")" -] @punctuation.bracket - -[ - "{" - "}" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -((symbol) @punctuation.delimiter - (#eq? @punctuation.delimiter "->")) - -; Literals -(string) @string - -(escape_sequence) @string.escape - -(path) @string.special.url - -(number) @number - -(boolean) @boolean - -[ - (ignore) - (null) -] @constant.builtin - -"^" @character.special - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/indents.scm deleted file mode 100644 index 27b976f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/indents.scm +++ /dev/null @@ -1,31 +0,0 @@ -[ - (list) - (scope) - (cons) -] @indent.begin - -[ - ")" - "}" - "]" -] @indent.end - -[ - "(" - ")" -] @indent.branch - -[ - "{" - "}" -] @indent.branch - -[ - "[" - "]" -] @indent.branch - -[ - (ERROR) - (comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/locals.scm deleted file mode 100644 index daed7e5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bass/locals.scm +++ /dev/null @@ -1,26 +0,0 @@ -; Scopes -[ - (list) - (scope) - (cons) -] @local.scope - -; References -(symbol) @local.reference - -; Definitions -((list - . - (symbol) @_fnkw - . - (symbol) @local.definition.function - (symbol)? @local.definition.parameter) - (#any-of? @_fnkw "def" "defop" "defn" "fn")) - -((cons - . - (symbol) @_fnkw - . - (symbol) @local.definition.function - (symbol)? @local.definition.parameter) - (#any-of? @_fnkw "def" "defop" "defn" "fn")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/folds.scm deleted file mode 100644 index 9f1b6cb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/folds.scm +++ /dev/null @@ -1,4 +0,0 @@ -[ - (transaction) - (section) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/highlights.scm deleted file mode 100644 index 1e23d28..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/highlights.scm +++ /dev/null @@ -1,57 +0,0 @@ -(date) @variable.member - -(txn) @attribute - -(account) @type - -(amount) @number - -(incomplete_amount) @number - -(compound_amount) @number - -(amount_tolerance) @number - -(currency) @property - -(key) @label - -(string) @string - -(narration) @string @spell - -(payee) @string @spell - -(tag) @constant - -(link) @constant - -[ - (minus) - (plus) - (slash) - (asterisk) -] @operator - -(comment) @comment @spell - -[ - (balance) - (open) - (close) - (commodity) - (pad) - (event) - (price) - (note) - (document) - (query) - (custom) - (pushtag) - (poptag) - (pushmeta) - (popmeta) - (option) - (include) - (plugin) -] @keyword diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/beancount/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/folds.scm deleted file mode 100644 index 321a045..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(entry) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/highlights.scm deleted file mode 100644 index 2231a17..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/highlights.scm +++ /dev/null @@ -1,57 +0,0 @@ -; CREDITS @pfoerster (adapted from https://github.com/latex-lsp/tree-sitter-bibtex) -[ - (string_type) - (preamble_type) - (entry_type) -] @keyword - -[ - (junk) - (comment) -] @comment - -(comment) @spell - -[ - "=" - "#" -] @operator - -(command) @function.builtin - -(number) @number - -(field - name: (identifier) @property) - -(token - (identifier) @variable.parameter) - -[ - (brace_word) - (quote_word) -] @string - -((field - name: (identifier) @_url - value: (value - (token - (brace_word) @string.special.url))) - (#any-of? @_url "url" "doi")) - -[ - (key_brace) - (key_paren) -] @markup.link.label - -(string - name: (identifier) @constant) - -[ - "{" - "}" - "(" - ")" -] @punctuation.bracket - -"," @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/indents.scm deleted file mode 100644 index 764172a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/indents.scm +++ /dev/null @@ -1,8 +0,0 @@ -(entry) @indent.begin - -[ - "{" - "}" -] @indent.branch - -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/injections.scm deleted file mode 100644 index 98ad387..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bibtex/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((junk) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/folds.scm deleted file mode 100644 index 217a86d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/folds.scm +++ /dev/null @@ -1,19 +0,0 @@ -[ - (module_declaration) - (metadata_declaration) - (output_declaration) - (parameter_declaration) - (resource_declaration) - (type_declaration) - (variable_declaration) - (parenthesized_expression) - (decorators) - (array) - (object) - (if_statement) - (for_statement) - (subscript_expression) - (ternary_expression) - (string) - (comment) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/highlights.scm deleted file mode 100644 index 35c9d6c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/highlights.scm +++ /dev/null @@ -1,234 +0,0 @@ -; Includes -[ - "import" - "provider" - "with" - "as" - "from" -] @keyword.import - -; Namespaces -(module_declaration - (identifier) @module) - -; Builtins -(primitive_type) @type.builtin - -((member_expression - object: (identifier) @type.builtin) - (#eq? @type.builtin "sys")) - -; Functions -(call_expression - function: (identifier) @function.call) - -(user_defined_function - name: (identifier) @function) - -; Properties -(object_property - (identifier) @property - ":" @punctuation.delimiter - (_)) - -(object_property - (compatible_identifier) @property - ":" @punctuation.delimiter - (_)) - -(property_identifier) @property - -; Attributes -(decorator - "@" @attribute) - -(decorator - (call_expression - (identifier) @attribute)) - -(decorator - (call_expression - (member_expression - object: (identifier) @attribute - property: (property_identifier) @attribute))) - -; Types -(type_declaration - (identifier) @type) - -(type_declaration - (identifier) - "=" - (identifier) @type) - -(type - (identifier) @type) - -(resource_declaration - (identifier) @type) - -(resource_expression - (identifier) @type) - -; Parameters -(parameter_declaration - (identifier) @variable.parameter - (_)) - -(call_expression - function: (_) - (arguments - (identifier) @variable.parameter)) - -(call_expression - function: (_) - (arguments - (member_expression - object: (identifier) @variable.parameter))) - -(parameter - . - (identifier) @variable.parameter) - -; Variables -(variable_declaration - (identifier) @variable - (_)) - -(metadata_declaration - (identifier) @variable - (_)) - -(output_declaration - (identifier) @variable - (_)) - -(object_property - (_) - ":" - (identifier) @variable) - -(for_statement - "for" - (for_loop_parameters - (loop_variable) @variable - (loop_enumerator) @variable)) - -; Conditionals -"if" @keyword.conditional - -(ternary_expression - "?" @keyword.conditional.ternary - ":" @keyword.conditional.ternary) - -; Loops -(for_statement - "for" @keyword.repeat - "in" - ":" @punctuation.delimiter) - -; Keywords -[ - "module" - "metadata" - "output" - "param" - "resource" - "existing" - "targetScope" - "type" - "var" - "using" - "test" -] @keyword - -"func" @keyword.function - -"assert" @keyword.exception - -; Operators -[ - "+" - "-" - "*" - "/" - "%" - "||" - "&&" - "|" - "==" - "!=" - "=~" - "!~" - ">" - ">=" - "<=" - "<" - "??" - "=" - "!" - ".?" -] @operator - -(subscript_expression - "?" @operator) - -(nullable_type - "?" @operator) - -"in" @keyword.operator - -; Literals -(string) @string - -(escape_sequence) @string.escape - -(number) @number - -(boolean) @boolean - -(null) @constant.builtin - -; Misc -(compatible_identifier - "?" @punctuation.special) - -(nullable_return_type) @punctuation.special - -[ - "{" - "}" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - "(" - ")" -] @punctuation.bracket - -[ - "." - ":" - "::" - "=>" -] @punctuation.delimiter - -; Interpolation -(interpolation) @none - -(interpolation - "${" @punctuation.special - "}" @punctuation.special) - -(interpolation - (identifier) @variable) - -; Comments -[ - (comment) - (diagnostic_comment) -] @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/indents.scm deleted file mode 100644 index 055e51b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/indents.scm +++ /dev/null @@ -1,27 +0,0 @@ -[ - (array) - (object) -] @indent.begin - -"}" @indent.end - -[ - "{" - "}" -] @indent.branch - -[ - "[" - "]" -] @indent.branch - -[ - "(" - ")" -] @indent.branch - -[ - (ERROR) - (comment) - (diagnostic_comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/injections.scm deleted file mode 100644 index 5c2d4a5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (comment) - (diagnostic_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/locals.scm deleted file mode 100644 index cc9c3c2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bicep/locals.scm +++ /dev/null @@ -1,73 +0,0 @@ -; Scopes -[ - (infrastructure) - (call_expression) - (lambda_expression) - (subscript_expression) - (if_statement) - (for_statement) - (array) - (object) - (interpolation) -] @local.scope - -; References -(property_identifier) @local.reference - -(call_expression - (identifier) @local.reference) - -(object_property - (_) - ":" - (identifier) @local.reference) - -(resource_expression - (identifier) @local.reference) - -; Definitions -(type) @local.definition.associated - -(object_property - (identifier) @local.definition.field - (_)) - -(object_property - (compatible_identifier) @local.definition.field - (_)) - -(user_defined_function - name: (identifier) @local.definition.function) - -(module_declaration - (identifier) @local.definition.namespace) - -(parameter_declaration - (identifier) @local.definition.parameter - (_)) - -(parameter - . - (identifier) @local.definition.parameter) - -(type_declaration - (identifier) @local.definition.type - (_)) - -(variable_declaration - (identifier) @local.definition.var - (_)) - -(metadata_declaration - (identifier) @local.definition.var - (_)) - -(output_declaration - (identifier) @local.definition.var - (_)) - -(for_statement - "for" - (for_loop_parameters - (loop_variable) @local.definition.var - (loop_enumerator) @local.definition.var)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/folds.scm deleted file mode 100644 index 85d2263..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/folds.scm +++ /dev/null @@ -1,24 +0,0 @@ -[ - (function_definition) - (anonymous_python_function) - (python_function_definition) - (while_statement) - (for_statement) - (if_statement) - (with_statement) - (try_statement) - (import_from_statement) - (parameters) - (argument_list) - (parenthesized_expression) - (generator_expression) - (list_comprehension) - (set_comprehension) - (dictionary_comprehension) - (tuple) - (list) - (set) - (dictionary) - (string) - (python_string) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/highlights.scm deleted file mode 100644 index c7316de..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/highlights.scm +++ /dev/null @@ -1,406 +0,0 @@ -; Includes -[ - "inherit" - "include" - "require" - "export" - "import" -] @keyword.import - -; Keywords -[ - "unset" - "EXPORT_FUNCTIONS" - "python" - "assert" - "exec" - "global" - "nonlocal" - "pass" - "print" - "with" - "as" -] @keyword - -[ - "async" - "await" -] @keyword.coroutine - -[ - "return" - "yield" -] @keyword.return - -(yield - "from" @keyword.return) - -(future_import_statement - "from" @keyword.import - "__future__" @constant.builtin) - -(import_from_statement - "from" @keyword.import) - -"import" @keyword.import - -(aliased_import - "as" @keyword.import) - -[ - "if" - "elif" - "else" -] @keyword.conditional - -[ - "for" - "while" - "break" - "continue" -] @keyword.repeat - -[ - "try" - "except" - "except*" - "raise" - "finally" -] @keyword.exception - -(raise_statement - "from" @keyword.exception) - -(try_statement - (else_clause - "else" @keyword.exception)) - -[ - "addtask" - "deltask" - "addhandler" - "def" - "lambda" -] @keyword.function - -[ - "before" - "after" -] @keyword.modifier - -[ - "append" - "prepend" - "remove" -] @keyword.modifier - -; Variables -[ - (identifier) - (python_identifier) -] @variable - -[ - "noexec" - "OVERRIDES" - "$BB_ENV_PASSTHROUGH" - "$BB_ENV_PASSTHROUGH_ADDITIONS" -] @variable.builtin - -; Reset highlighting in f-string interpolations -(interpolation) @none - -; Identifier naming conventions -((python_identifier) @type - (#lua-match? @type "^[A-Z].*[a-z]")) - -([ - (identifier) - (python_identifier) -] @constant - (#lua-match? @constant "^[A-Z][A-Z_0-9]*$")) - -((python_identifier) @constant.builtin - (#lua-match? @constant.builtin "^__[a-zA-Z0-9_]*__$")) - -((python_identifier) @constant.builtin - (#any-of? @constant.builtin - ; https://docs.python.org/3/library/constants.html - "NotImplemented" "Ellipsis" "quit" "exit" "copyright" "credits" "license")) - -((assignment - left: (python_identifier) @type.definition - (type - (python_identifier) @_annotation)) - (#eq? @_annotation "TypeAlias")) - -((assignment - left: (python_identifier) @type.definition - right: (call - function: (python_identifier) @_func)) - (#any-of? @_func "TypeVar" "NewType")) - -; Fields -(flag) @variable.member - -((attribute - attribute: (python_identifier) @variable.member) - (#lua-match? @variable.member "^[%l_].*$")) - -; Functions -(call - function: (python_identifier) @function.call) - -(call - function: (attribute - attribute: (python_identifier) @function.method.call)) - -((call - function: (python_identifier) @constructor) - (#lua-match? @constructor "^%u")) - -((call - function: (attribute - attribute: (python_identifier) @constructor)) - (#lua-match? @constructor "^%u")) - -((call - function: (python_identifier) @function.builtin) - (#any-of? @function.builtin - "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" - "classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" - "filter" "float" "format" "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" - "input" "int" "isinstance" "issubclass" "iter" "len" "list" "locals" "map" "max" "memoryview" - "min" "next" "object" "oct" "open" "ord" "pow" "print" "property" "range" "repr" "reversed" - "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" "sum" "super" "tuple" "type" - "vars" "zip" "__import__")) - -(python_function_definition - name: (python_identifier) @function) - -(type - (python_identifier) @type) - -(type - (subscript - (python_identifier) @type)) ; type subscript: Tuple[int] - -((call - function: (python_identifier) @_isinstance - arguments: (argument_list - (_) - (python_identifier) @type)) - (#eq? @_isinstance "isinstance")) - -(anonymous_python_function - (identifier) @function) - -(function_definition - (identifier) @function) - -(addtask_statement - (identifier) @function) - -(deltask_statement - (identifier) @function) - -(export_functions_statement - (identifier) @function) - -(addhandler_statement - (identifier) @function) - -(python_function_definition - body: (block - . - (expression_statement - (python_string) @string.documentation @spell))) - -; Namespace -(inherit_path) @module - -; Normal parameters -(parameters - (python_identifier) @variable.parameter) - -; Lambda parameters -(lambda_parameters - (python_identifier) @variable.parameter) - -(lambda_parameters - (tuple_pattern - (python_identifier) @variable.parameter)) - -; Default parameters -(keyword_argument - name: (python_identifier) @variable.parameter) - -; Naming parameters on call-site -(default_parameter - name: (python_identifier) @variable.parameter) - -(typed_parameter - (python_identifier) @variable.parameter) - -(typed_default_parameter - (python_identifier) @variable.parameter) - -; Variadic parameters *args, **kwargs -(parameters - (list_splat_pattern - ; *args - (python_identifier) @variable.parameter)) - -(parameters - (dictionary_splat_pattern - ; **kwargs - (python_identifier) @variable.parameter)) - -; Literals -(none) @constant.builtin - -[ - (true) - (false) -] @boolean - -((python_identifier) @variable.builtin - (#any-of? @variable.builtin "self" "cls")) - -(integer) @number - -(float) @number.float - -; Operators -[ - "?=" - "??=" - ":=" - "=+" - ".=" - "=." - "-" - "-=" - ":=" - "!=" - "*" - "**" - "**=" - "*=" - "/" - "//" - "//=" - "/=" - "&" - "&=" - "%" - "%=" - "^" - "^=" - "+" - "+=" - "<" - "<<" - "<<=" - "<=" - "<>" - "=" - "==" - ">" - ">=" - ">>" - ">>=" - "@" - "@=" - "|" - "|=" - "~" - "->" -] @operator - -[ - "and" - "in" - "is" - "not" - "or" - "is not" - "not in" - "del" -] @keyword.operator - -; Literals -[ - (string) - (python_string) - "\"" -] @string - -(include_path) @string.special.path - -[ - (escape_sequence) - (escape_interpolation) -] @string.escape - -; Punctuation -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @punctuation.bracket - -[ - ":" - "->" - ";" - "." - "," - (ellipsis) -] @punctuation.delimiter - -(variable_expansion - [ - "${" - "}" - ] @punctuation.special) - -(inline_python - [ - "${@" - "}" - ] @punctuation.special) - -(interpolation - "{" @punctuation.special - "}" @punctuation.special) - -(type_conversion) @function.macro - -([ - (identifier) - (python_identifier) -] @type.builtin - (#any-of? @type.builtin - ; https://docs.python.org/3/library/exceptions.html - "BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError" - "AttributeError" "EOFError" "FloatingPointError" "GeneratorExit" "ImportError" - "ModuleNotFoundError" "IndexError" "KeyError" "KeyboardInterrupt" "MemoryError" "NameError" - "NotImplementedError" "OSError" "OverflowError" "RecursionError" "ReferenceError" "RuntimeError" - "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError" "SystemError" - "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" - "UnicodeDecodeError" "UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" - "IOError" "WindowsError" "BlockingIOError" "ChildProcessError" "ConnectionError" - "BrokenPipeError" "ConnectionAbortedError" "ConnectionRefusedError" "ConnectionResetError" - "FileExistsError" "FileNotFoundError" "InterruptedError" "IsADirectoryError" - "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning" - "UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning" - "FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning" - ; https://docs.python.org/3/library/stdtypes.html - "bool" "int" "float" "complex" "list" "tuple" "range" "str" "bytes" "bytearray" "memoryview" - "set" "frozenset" "dict" "type" "object")) - -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/indents.scm deleted file mode 100644 index 5f20818..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/indents.scm +++ /dev/null @@ -1,172 +0,0 @@ -[ - (import_from_statement) - (parenthesized_expression) - (generator_expression) - (list_comprehension) - (set_comprehension) - (dictionary_comprehension) - (tuple_pattern) - (list_pattern) - (binary_operator) - (lambda) - (concatenated_string) -] @indent.begin - -((list) @indent.align - (#set! indent.open_delimiter "[") - (#set! indent.close_delimiter "]")) - -((dictionary) @indent.align - (#set! indent.open_delimiter "{") - (#set! indent.close_delimiter "}")) - -((set) @indent.align - (#set! indent.open_delimiter "{") - (#set! indent.close_delimiter "}")) - -((for_statement) @indent.begin - (#set! indent.immediate 1)) - -((if_statement) @indent.begin - (#set! indent.immediate 1)) - -((while_statement) @indent.begin - (#set! indent.immediate 1)) - -((try_statement) @indent.begin - (#set! indent.immediate 1)) - -(ERROR - "try" - ":" @indent.begin - (#set! indent.immediate 1)) - -((python_function_definition) @indent.begin - (#set! indent.immediate 1)) - -(function_definition) @indent.begin - -(anonymous_python_function) @indent.begin - -((with_statement) @indent.begin - (#set! indent.immediate 1)) - -(if_statement - condition: (parenthesized_expression) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")") - (#set! indent.avoid_last_matching_next 1)) - -(while_statement - condition: (parenthesized_expression) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")") - (#set! indent.avoid_last_matching_next 1)) - -(ERROR - "(" @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")") - . - (_)) - -((argument_list) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")")) - -((parameters) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")") - (#set! indent.avoid_last_matching_next 1)) - -((tuple) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")")) - -(ERROR - "[" @indent.align - (#set! indent.open_delimiter "[") - (#set! indent.close_delimiter "]") - . - (_)) - -(ERROR - "{" @indent.align - (#set! indent.open_delimiter "{") - (#set! indent.close_delimiter "}") - . - (_)) - -[ - (break_statement) - (continue_statement) -] @indent.dedent - -(ERROR - (_) @indent.branch - ":" - . - (#lua-match? @indent.branch "^else")) - -(ERROR - (_) @indent.branch @indent.dedent - ":" - . - (#lua-match? @indent.branch "^elif")) - -(parenthesized_expression - ")" @indent.end) - -(generator_expression - ")" @indent.end) - -(list_comprehension - "]" @indent.end) - -(set_comprehension - "}" @indent.end) - -(dictionary_comprehension - "}" @indent.end) - -(tuple_pattern - ")" @indent.end) - -(list_pattern - "]" @indent.end) - -(function_definition - "}" @indent.end) - -(anonymous_python_function - "}" @indent.end) - -(return_statement - [ - (_) @indent.end - (_ - [ - (_) - ")" - "}" - "]" - ] @indent.end .) - (attribute - attribute: (_) @indent.end) - (call - arguments: (_ - ")" @indent.end)) - "return" @indent.end - ] .) - -[ - ")" - "]" - "}" - (elif_clause) - (else_clause) - (except_clause) - (finally_clause) -] @indent.branch - -(string) @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/injections.scm deleted file mode 100644 index 35c984a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/injections.scm +++ /dev/null @@ -1,15 +0,0 @@ -(call - function: (attribute - object: (python_identifier) @_re) - arguments: (argument_list - (python_string - (string_content) @injection.content) @_string) - (#eq? @_re "re") - (#lua-match? @_string "^r.*") - (#set! injection.language "regex")) - -((shell_content) @injection.content - (#set! injection.language "bash")) - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/locals.scm deleted file mode 100644 index e4726ec..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bitbake/locals.scm +++ /dev/null @@ -1,117 +0,0 @@ -; References -[ - (python_identifier) - (identifier) -] @local.reference - -; Imports -(aliased_import - alias: (python_identifier) @local.definition.import) - -(import_statement - name: (dotted_name - (python_identifier) @local.definition.import)) - -(import_from_statement - name: (dotted_name - (python_identifier) @local.definition.import)) - -; Function with parameters, defines parameters -(parameters - (python_identifier) @local.definition.parameter) - -(default_parameter - (python_identifier) @local.definition.parameter) - -(typed_parameter - (python_identifier) @local.definition.parameter) - -(typed_default_parameter - (python_identifier) @local.definition.parameter) - -; *args parameter -(parameters - (list_splat_pattern - (python_identifier) @local.definition.parameter)) - -; **kwargs parameter -(parameters - (dictionary_splat_pattern - (python_identifier) @local.definition.parameter)) - -; Function defines function and scope -((python_function_definition - name: (python_identifier) @local.definition.function) @local.scope - (#set! definition.function.scope "parent")) - -(function_definition - (identifier) @local.definition.function) - -(anonymous_python_function - (identifier) @local.definition.function) - -; Loops -; not a scope! -(for_statement - left: (pattern_list - (python_identifier) @local.definition.var)) - -(for_statement - left: (tuple_pattern - (python_identifier) @local.definition.var)) - -(for_statement - left: (python_identifier) @local.definition.var) - -; not a scope! -;(while_statement) @local.scope -; for in list comprehension -(for_in_clause - left: (python_identifier) @local.definition.var) - -(for_in_clause - left: (tuple_pattern - (python_identifier) @local.definition.var)) - -(for_in_clause - left: (pattern_list - (python_identifier) @local.definition.var)) - -(dictionary_comprehension) @local.scope - -(list_comprehension) @local.scope - -(set_comprehension) @local.scope - -; Assignments -(assignment - left: (python_identifier) @local.definition.var) - -(assignment - left: (pattern_list - (python_identifier) @local.definition.var)) - -(assignment - left: (tuple_pattern - (python_identifier) @local.definition.var)) - -(assignment - left: (attribute - (python_identifier) - (python_identifier) @local.definition.field)) - -(variable_assignment - (identifier) - operator: [ - "=" - "?=" - "??=" - ":=" - ] @local.definition.var) - -; Walrus operator x := 1 -(named_expression - (python_identifier) @local.definition.var) - -(as_pattern - alias: (as_pattern_target) @local.definition.var) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/folds.scm deleted file mode 100644 index cc081a7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/folds.scm +++ /dev/null @@ -1,14 +0,0 @@ -[ - (authorization) - (conditional) - (envoy) - (fragment) - (livewire) - (loop) - (once) - (php_statement) - (section) - (stack) - (switch) - (verbatim) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/highlights.scm deleted file mode 100644 index c05d284..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/highlights.scm +++ /dev/null @@ -1,15 +0,0 @@ -([ - (directive) - (directive_start) - (directive_end) -] @tag - (#set! priority 101)) - -([ - (bracket_start) - (bracket_end) -] @tag.delimiter - (#set! priority 101)) - -((comment) @comment @spell - (#set! priority 101)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/indents.scm deleted file mode 100644 index bd3e84d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/indents.scm +++ /dev/null @@ -1,3 +0,0 @@ -(directive_start) @indent.begin - -(directive_end) @indent.end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/injections.scm deleted file mode 100644 index 12fa9f9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blade/injections.scm +++ /dev/null @@ -1,15 +0,0 @@ -((text) @injection.content - (#set! injection.combined) - (#set! injection.language html)) - -((text) @injection.content - (#has-ancestor? @injection.content "envoy") - (#set! injection.combined) - (#set! injection.language bash)) - -((php_only) @injection.content - (#set! injection.combined) - (#set! injection.language php_only)) - -((parameter) @injection.content - (#set! injection.language php_only)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blueprint/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/blueprint/highlights.scm deleted file mode 100644 index f3c39f2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blueprint/highlights.scm +++ /dev/null @@ -1,75 +0,0 @@ -(object_id) @variable - -(string) @string - -(escape_sequence) @string.escape - -(comment) @comment @spell - -(constant) @constant.builtin - -(boolean) @boolean - -(using) @keyword.import - -(template) @keyword - -(decorator) @attribute - -(property_definition - (property_name) @property) - -(object) @type - -(signal_binding - (signal_name) @function.builtin) - -(signal_binding - (function - (identifier)) @function) - -(signal_binding - "swapped" @keyword) - -(styles_list - "styles" @function.macro) - -(layout_definition - "layout" @function.macro) - -(gettext_string - "_" @function.builtin) - -(menu_definition - "menu" @keyword) - -(menu_section - "section" @keyword) - -(menu_item - "item" @function.macro) - -(import_statement - (gobject_library) @module) - -(import_statement - (version_number) @number.float) - -(float) @number.float - -(number) @number - -[ - ";" - "." - "," -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blueprint/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/blueprint/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/blueprint/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/folds.scm deleted file mode 100644 index c40ea3d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/folds.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (list_expression) - (map_expression) - (module) - (select_expression) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/highlights.scm deleted file mode 100644 index 5f94f4c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/highlights.scm +++ /dev/null @@ -1,56 +0,0 @@ -(comment) @comment @spell - -(operator) @operator - -(integer_literal - "-" @operator) - -[ - "," - ":" -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -(boolean_literal) @boolean - -(integer_literal) @number - -[ - (raw_string_literal) - (interpreted_string_literal) -] @string - -(escape_sequence) @string.escape - -(identifier) @variable - -(module - type: (identifier) @function.call) - -(module - (property - field: (identifier) @variable.parameter)) - -[ - (unset) - (default) - (any) -] @variable.builtin - -(condition - name: (identifier) @function.builtin) - -(map_expression - (property - field: (identifier) @property)) - -(select_expression - "select" @keyword.conditional) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/indents.scm deleted file mode 100644 index 8cf8adc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/indents.scm +++ /dev/null @@ -1,38 +0,0 @@ -(list_expression) @indent.begin - -(list_expression - "]" @indent.branch) - -(map_expression) @indent.begin - -(map_expression - "}" @indent.branch) - -(select_expression) @indent.begin - -(select_expression - ")" @indent.branch) - -(select_value) @indent.begin - -(select_value - ")" @indent.branch) - -(select_pattern - "(" @indent.begin) - -(select_pattern - ")" @indent.branch) - -(select_cases) @indent.begin - -(select_cases - "}" @indent.branch) - -(module) @indent.begin - -(module - ")" @indent.branch) - -(module - "}" @indent.branch) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/locals.scm deleted file mode 100644 index c8a5a17..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/bp/locals.scm +++ /dev/null @@ -1,15 +0,0 @@ -(module - (property - field: (identifier) @local.definition.parameter)) - -(map_expression - (property - field: (identifier) @local.definition.field)) - -(assignment - left: (identifier) @local.definition.var) - -(pattern_binding - binding: (identifier) @local.definition.var) - -(identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/folds.scm deleted file mode 100644 index 56b7d57..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/folds.scm +++ /dev/null @@ -1,8 +0,0 @@ -[ - (function_statement) - (sub_statement) - (while_statement) - (for_statement) - (if_statement) - (try_statement) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/highlights.scm deleted file mode 100644 index 5758f56..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/highlights.scm +++ /dev/null @@ -1,177 +0,0 @@ -; Identifiers -(identifier) @variable - -; Function declaration -(function_statement - name: (identifier) @function) - -; Sub declaration -(sub_statement - name: (identifier) @function) - -[ - (sub_start) - (function_start) - (end_sub) - (end_function) -] @keyword.function - -; Parameters -(parameter - name: (identifier) @variable.parameter) - -; Types -(type_specifier) @type - -; Variables -; Base variable in variable declarator (immediate child of prefix_exp) -(variable_declarator - (prefix_exp - (identifier) @variable - (#not-has-ancestor? @variable prefix_exp))) - -; Properties in variable declarator -(variable_declarator - (prefix_exp) - (identifier) @property) - -(multiplicative_expression - operator: (_) @keyword.operator) - -(logical_not_expression - operator: (_) @keyword.operator) - -(logical_expression - operator: (_) @keyword.operator) - -; Property access -; First identifier in a chain (base variable) -(prefix_exp - . - (identifier) @variable - (#not-has-ancestor? @variable prefix_exp)) - -; All other identifiers in a chain (properties) -(prefix_exp - (prefix_exp) - (identifier) @property) - -; Function calls -(function_call - function: (prefix_exp - (identifier) @function.call)) - -; Statements -[ - (if_start) - (else) - (else_if) - (end_if) - (then) - (conditional_compl_end_if) -] @keyword.conditional - -[ - (for_start) - (while_start) - (for_each) - (for_in) - (for_to) - (for_step) - (end_for) - (end_while) - (exit_while_statement) - (exit_for_statement) -] @keyword.repeat - -; Statements -[ - (try_start) - (try_catch) - (throw) - (end_try) -] @keyword.exception - -(return) @keyword.return - -(print) @function.builtin - -(constant) @constant - -; Operators -[ - "=" - "<>" - "<" - "<=" - ">" - ">=" - "+" - "-" - "*" - "/" -] @operator - -; Literals -(boolean) @boolean - -(number) @number - -(string) @string - -(invalid) @constant.builtin - -; Comments -(comment) @comment @spell - -; Punctuation -[ - "(" - ")" - "[" - "]" - "{" - "}" - "?[" -] @punctuation.bracket - -[ - "." - "," - "?." -] @punctuation.delimiter - -; Special highlights for library statements -(library_statement) @keyword.import - -(library_statement - path: (string) @module) - -; Array and associative array literals -(array) @constructor - -(assoc_array) @constructor - -(assoc_array_element - key: (identifier) @property) - -; Increment/decrement operators -[ - (prefix_increment_expression) - (prefix_decrement_expression) - (postfix_increment_expression) - (postfix_decrement_expression) -] @operator - -; Comparison operators -(comparison_expression - [ - "=" - "<>" - "<" - "<=" - ">" - ">=" - ] @operator) - -(as) @keyword.operator diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/indents.scm deleted file mode 100644 index e54bf52..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/indents.scm +++ /dev/null @@ -1,39 +0,0 @@ -; Start indentation for block-level constructs -[ - (sub_statement) - (function_statement) - (annonymous_sub) - (annonymous_function) - (conditional_compl) - (multi_line_if) - (for_statement) - (while_statement) - (try_statement) - (array) - (assoc_array) -] @indent.begin - -; End indentation for all end statements -[ - (end_sub) - (end_function) - (end_if) - (end_for) - (end_while) - (end_try) - (conditional_compl_end_if) - "]" - "}" -] @indent.branch @indent.end - -; Handle branching constructs -[ - (else_if_clause) - (else_clause) - (conditional_compl_else_if_clause) - (conditional_compl_else_clause) - (catch_clause) -] @indent.branch - -; Ignore comments for indentation -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/brightscript/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/folds.scm deleted file mode 100644 index bb26a62..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/folds.scm +++ /dev/null @@ -1,23 +0,0 @@ -[ - (for_statement) - (if_statement) - (while_statement) - (do_statement) - (switch_statement) - (case_statement) - (function_definition) - (struct_specifier) - (enum_specifier) - (comment) - (preproc_if) - (preproc_elif) - (preproc_else) - (preproc_ifdef) - (preproc_function_def) - (initializer_list) - (gnu_asm_expression) - (preproc_include)+ -] @fold - -(compound_statement - (compound_statement) @fold) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/highlights.scm deleted file mode 100644 index ea65075..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/highlights.scm +++ /dev/null @@ -1,341 +0,0 @@ -; Lower priority to prefer @variable.parameter when identifier appears in parameter_declaration. -((identifier) @variable - (#set! priority 95)) - -(preproc_def - (preproc_arg) @variable) - -[ - "default" - "goto" - "asm" - "__asm__" -] @keyword - -[ - "enum" - "struct" - "union" - "typedef" -] @keyword.type - -[ - "sizeof" - "offsetof" -] @keyword.operator - -(alignof_expression - . - _ @keyword.operator) - -"return" @keyword.return - -[ - "while" - "for" - "do" - "continue" - "break" -] @keyword.repeat - -[ - "if" - "else" - "case" - "switch" -] @keyword.conditional - -[ - "#if" - "#ifdef" - "#ifndef" - "#else" - "#elif" - "#endif" - "#elifdef" - "#elifndef" - (preproc_directive) -] @keyword.directive - -"#define" @keyword.directive.define - -"#include" @keyword.import - -[ - ";" - ":" - "," - "." - "::" -] @punctuation.delimiter - -"..." @punctuation.special - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -[ - "=" - "-" - "*" - "/" - "+" - "%" - "~" - "|" - "&" - "^" - "<<" - ">>" - "->" - "<" - "<=" - ">=" - ">" - "==" - "!=" - "!" - "&&" - "||" - "-=" - "+=" - "*=" - "/=" - "%=" - "|=" - "&=" - "^=" - ">>=" - "<<=" - "--" - "++" -] @operator - -; Make sure the comma operator is given a highlight group after the comma -; punctuator so the operator is highlighted properly. -(comma_expression - "," @operator) - -[ - (true) - (false) -] @boolean - -(conditional_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) - -(string_literal) @string - -(system_lib_string) @string - -(escape_sequence) @string.escape - -(null) @constant.builtin - -(number_literal) @number - -(char_literal) @character - -(preproc_defined) @function.macro - -((field_expression - (field_identifier) @property) @_parent - (#not-has-parent? @_parent template_method function_declarator call_expression)) - -(field_designator) @property - -((field_identifier) @property - (#has-ancestor? @property field_declaration) - (#not-has-ancestor? @property function_declarator)) - -(statement_identifier) @label - -(declaration - type: (type_identifier) @_type - declarator: (identifier) @label - (#eq? @_type "__label__")) - -[ - (type_identifier) - (type_descriptor) -] @type - -(storage_class_specifier) @keyword.modifier - -[ - (type_qualifier) - (gnu_asm_qualifier) - "__extension__" -] @keyword.modifier - -(linkage_specification - "extern" @keyword.modifier) - -(type_definition - declarator: (type_identifier) @type.definition) - -(primitive_type) @type.builtin - -(sized_type_specifier - _ @type.builtin - type: _?) - -((identifier) @constant - (#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) - -(preproc_def - (preproc_arg) @constant - (#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) - -(enumerator - name: (identifier) @constant) - -(case_statement - value: (identifier) @constant) - -((identifier) @constant.builtin - ; format-ignore - (#any-of? @constant.builtin - "stderr" "stdin" "stdout" - "__FILE__" "__LINE__" "__DATE__" "__TIME__" - "__STDC__" "__STDC_VERSION__" "__STDC_HOSTED__" - "__cplusplus" "__OBJC__" "__ASSEMBLER__" - "__BASE_FILE__" "__FILE_NAME__" "__INCLUDE_LEVEL__" - "__TIMESTAMP__" "__clang__" "__clang_major__" - "__clang_minor__" "__clang_patchlevel__" - "__clang_version__" "__clang_literal_encoding__" - "__clang_wide_literal_encoding__" - "__FUNCTION__" "__func__" "__PRETTY_FUNCTION__" - "__VA_ARGS__" "__VA_OPT__")) - -(preproc_def - (preproc_arg) @constant.builtin - ; format-ignore - (#any-of? @constant.builtin - "stderr" "stdin" "stdout" - "__FILE__" "__LINE__" "__DATE__" "__TIME__" - "__STDC__" "__STDC_VERSION__" "__STDC_HOSTED__" - "__cplusplus" "__OBJC__" "__ASSEMBLER__" - "__BASE_FILE__" "__FILE_NAME__" "__INCLUDE_LEVEL__" - "__TIMESTAMP__" "__clang__" "__clang_major__" - "__clang_minor__" "__clang_patchlevel__" - "__clang_version__" "__clang_literal_encoding__" - "__clang_wide_literal_encoding__" - "__FUNCTION__" "__func__" "__PRETTY_FUNCTION__" - "__VA_ARGS__" "__VA_OPT__")) - -(attribute_specifier - (argument_list - (identifier) @variable.builtin)) - -(attribute_specifier - (argument_list - (call_expression - function: (identifier) @variable.builtin))) - -((call_expression - function: (identifier) @function.builtin) - (#lua-match? @function.builtin "^__builtin_")) - -((call_expression - function: (identifier) @function.builtin) - (#has-ancestor? @function.builtin attribute_specifier)) - -; Preproc def / undef -(preproc_def - name: (_) @constant.macro) - -(preproc_call - directive: (preproc_directive) @_u - argument: (_) @constant.macro - (#eq? @_u "#undef")) - -(preproc_ifdef - name: (identifier) @constant.macro) - -(preproc_elifdef - name: (identifier) @constant.macro) - -(preproc_defined - (identifier) @constant.macro) - -(call_expression - function: (identifier) @function.call) - -(call_expression - function: (field_expression - field: (field_identifier) @function.call)) - -(function_declarator - declarator: (identifier) @function) - -(function_declarator - declarator: (parenthesized_declarator - (pointer_declarator - declarator: (field_identifier) @function))) - -(preproc_function_def - name: (identifier) @function.macro) - -(comment) @comment @spell - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$")) - -; Parameters -(parameter_declaration - declarator: (identifier) @variable.parameter) - -(parameter_declaration - declarator: (array_declarator) @variable.parameter) - -(parameter_declaration - declarator: (pointer_declarator) @variable.parameter) - -; K&R functions -; To enable support for K&R functions, -; add the following lines to your own query config and uncomment them. -; They are commented out as they'll conflict with C++ -; Note that you'll need to have `; extends` at the top of your query file. -; -; (parameter_list (identifier) @variable.parameter) -; -; (function_definition -; declarator: _ -; (declaration -; declarator: (identifier) @variable.parameter)) -; -; (function_definition -; declarator: _ -; (declaration -; declarator: (array_declarator) @variable.parameter)) -; -; (function_definition -; declarator: _ -; (declaration -; declarator: (pointer_declarator) @variable.parameter)) -(preproc_params - (identifier) @variable.parameter) - -[ - "__attribute__" - "__declspec" - "__based" - "__cdecl" - "__clrcall" - "__stdcall" - "__fastcall" - "__thiscall" - "__vectorcall" - (ms_pointer_modifier) - (attribute_declaration) -] @attribute diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/indents.scm deleted file mode 100644 index 1932ce8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/indents.scm +++ /dev/null @@ -1,99 +0,0 @@ -[ - (compound_statement) - (field_declaration_list) - (case_statement) - (enumerator_list) - (compound_literal_expression) - (initializer_list) - (init_declarator) -] @indent.begin - -; With current indent logic, if we capture expression_statement with @indent.begin -; It will be affected by _parent_ node with error subnodes deep down the tree -; So narrow indent capture to check for error inside expression statement only, -(expression_statement - (_) @indent.begin - ";" @indent.end) - -(ERROR - "for" - "(" @indent.begin - ";" - ";" - ")" @indent.end) - -((for_statement - body: (_) @_body) @indent.begin - (#not-kind-eq? @_body "compound_statement")) - -(while_statement - condition: (_) @indent.begin) - -((while_statement - body: (_) @_body) @indent.begin - (#not-kind-eq? @_body "compound_statement")) - -((if_statement) - . - (ERROR - "else" @indent.begin)) - -(if_statement - condition: (_) @indent.begin) - -; Supports if without braces (but not both if-else without braces) -(if_statement - consequence: (_ - ";" @indent.end) @_consequence - (#not-kind-eq? @_consequence "compound_statement") - alternative: (else_clause - "else" @indent.branch - [ - (if_statement - (compound_statement) @indent.dedent)? @indent.dedent - (compound_statement)? @indent.dedent - (_)? @indent.dedent - ])?) @indent.begin - -(else_clause - (_ - . - "{" @indent.branch)) - -(compound_statement - "}" @indent.end) - -[ - ")" - "}" - (statement_identifier) -] @indent.branch - -[ - "#define" - "#ifdef" - "#ifndef" - "#elif" - "#if" - "#else" - "#endif" -] @indent.zero - -[ - (preproc_arg) - (string_literal) -] @indent.ignore - -((ERROR - (parameter_declaration)) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")")) - -([ - (argument_list) - (parameter_list) -] @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")")) - -(comment) @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/injections.scm deleted file mode 100644 index 77b4d7a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c/injections.scm +++ /dev/null @@ -1,128 +0,0 @@ -((preproc_arg) @injection.content - (#set! injection.language "c")) - -((comment) @injection.content - (#set! injection.language "comment")) - -((comment) @injection.content - (#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c") - (#set! injection.language "re2c")) - -((comment) @injection.content - (#lua-match? @injection.content "/[*\/][!*\/]" - ">=" - "=" - "-=" - "+=" - "*=" - "/=" - "%=" - "^" - "^=" - "&=" - "|=" - "~" - ">>" - ">>>" - "<<" - "<<=" - ">>=" - ">>>=" - "=>" - "??" - "??=" - ".." -] @operator - -(list_pattern - ".." @character.special) - -(discard) @character.special - -[ - ";" - "." - "," - ":" -] @punctuation.delimiter - -(conditional_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) - -[ - "[" - "]" - "{" - "}" - "(" - ")" -] @punctuation.bracket - -(interpolation_brace) @punctuation.special - -(type_argument_list - [ - "<" - ">" - ] @punctuation.bracket) - -[ - "using" - "as" -] @keyword.import - -(alias_qualified_name - (identifier - "global") @keyword.import) - -[ - "with" - "new" - "typeof" - "sizeof" - "is" - "and" - "or" - "not" - "stackalloc" - "__makeref" - "__reftype" - "__refvalue" - "in" - "out" - "ref" -] @keyword.operator - -[ - "lock" - "params" - "operator" - "default" - "implicit" - "explicit" - "override" - "get" - "set" - "init" - "where" - "add" - "remove" - "checked" - "unchecked" - "fixed" - "alias" - "file" - "unsafe" -] @keyword - -(attribute_target_specifier - . - _ @keyword) - -[ - "enum" - "record" - "class" - "struct" - "interface" - "namespace" - "event" - "delegate" -] @keyword.type - -[ - "async" - "await" -] @keyword.coroutine - -[ - "const" - "extern" - "readonly" - "static" - "volatile" - "required" - "managed" - "unmanaged" - "notnull" - "abstract" - "private" - "protected" - "internal" - "public" - "partial" - "sealed" - "virtual" - "global" -] @keyword.modifier - -(scoped_type - "scoped" @keyword.modifier) - -(query_expression - (_ - [ - "from" - "orderby" - "select" - "group" - "by" - "ascending" - "descending" - "equals" - "let" - ] @keyword)) - -[ - "return" - "yield" -] @keyword.return diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c_sharp/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/c_sharp/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c_sharp/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c_sharp/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/c_sharp/locals.scm deleted file mode 100644 index bef0940..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/c_sharp/locals.scm +++ /dev/null @@ -1,42 +0,0 @@ -; Definitions -(variable_declarator - . - (identifier) @local.definition.var) - -(variable_declarator - (tuple_pattern - (identifier) @local.definition.var)) - -(declaration_expression - name: (identifier) @local.definition.var) - -(foreach_statement - left: (identifier) @local.definition.var) - -(foreach_statement - left: (tuple_pattern - (identifier) @local.definition.var)) - -(parameter - (identifier) @local.definition.parameter) - -(method_declaration - name: (identifier) @local.definition.method) - -(local_function_statement - name: (identifier) @local.definition.method) - -(property_declaration - name: (identifier) @local.definition) - -(type_parameter - (identifier) @local.definition.type) - -(class_declaration - name: (identifier) @local.definition) - -; References -(identifier) @local.reference - -; Scope -(block) @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/folds.scm deleted file mode 100644 index fd7d239..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(block) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/highlights.scm deleted file mode 100644 index 47a170f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/highlights.scm +++ /dev/null @@ -1,55 +0,0 @@ -(comment) @comment @spell - -[ - (env) - (argv) - (block_variable) - (placeholder) -] @constant - -(value) @variable - -(directive - (keyword) @attribute) - -(global_options - (option - (keyword) @attribute)) - -(keyword) @keyword - -(boolean) @boolean - -(placeholder - [ - "{" - "}" - ] @punctuation.special) - -(auto) @variable.builtin - -[ - (string_literal) - (quoted_string_literal) - (address) -] @string - -[ - (matcher) - (route) - (snippet_name) -] @string.special - -[ - (numeric_literal) - (time) - (size) - (ip_literal) -] @number - -[ - "{" - "}" -] @punctuation.bracket - -"," @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/indents.scm deleted file mode 100644 index b746788..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/indents.scm +++ /dev/null @@ -1,8 +0,0 @@ -(block) @indent.begin - -(block - "}" @indent.branch) - -(comment) @indent.auto - -(ERROR) @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/caddy/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/folds.scm deleted file mode 100644 index 9937da6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/folds.scm +++ /dev/null @@ -1,26 +0,0 @@ -[ - (mod_item) - (struct_item) - (trait_item) - (enum_item) - (impl_item) - (type_item) - (use_declaration) - (let_declaration) - (namespace_definition) - (arguments) - (implicit_arguments) - (tuple_type) - (import_statement) - (attribute_statement) - (with_statement) - (if_statement) - (function_definition) - (struct_definition) - (loop_expression) - (if_expression) - (match_expression) - (call_expression) - (tuple_expression) - (attribute_item) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/highlights.scm deleted file mode 100644 index 1ea6245..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/highlights.scm +++ /dev/null @@ -1,414 +0,0 @@ -; Preproc -[ - "%builtins" - "%lang" -] @keyword.directive - -; Includes -(import_statement - [ - "from" - "import" - ] @keyword.import - module_name: (dotted_name - (identifier) @module .)) - -[ - "as" - "use" - "mod" -] @keyword.import - -; Variables -(identifier) @variable - -; Namespaces -(namespace_definition - (identifier) @module) - -(mod_item - name: (identifier) @module) - -(use_list - (self) @module) - -(scoped_use_list - (self) @module) - -(scoped_identifier - path: (identifier) @module) - -(scoped_identifier - (scoped_identifier - name: (identifier) @module)) - -(scoped_type_identifier - path: (identifier) @module) - -((scoped_identifier - path: (identifier) @type) - (#lua-match? @type "^[A-Z]")) - -((scoped_identifier - name: (identifier) @type) - (#lua-match? @type "^[A-Z]")) - -((scoped_identifier - name: (identifier) @constant) - (#lua-match? @constant "^[A-Z][A-Z%d_]*$")) - -((scoped_identifier - path: (identifier) @type - name: (identifier) @constant) - (#lua-match? @type "^[A-Z]") - (#lua-match? @constant "^[A-Z]")) - -((scoped_type_identifier - path: (identifier) @type - name: (type_identifier) @constant) - (#lua-match? @type "^[A-Z]") - (#lua-match? @constant "^[A-Z]")) - -(scoped_use_list - path: (identifier) @module) - -(scoped_use_list - path: (scoped_identifier - (identifier) @module)) - -(use_list - (scoped_identifier - (identifier) @module - . - (_))) - -(use_list - (identifier) @type - (#lua-match? @type "^[A-Z]")) - -(use_as_clause - alias: (identifier) @type - (#lua-match? @type "^[A-Z]")) - -; Keywords -[ - ; 0.x - "using" - "let" - "const" - "local" - "rel" - "abs" - "dw" - "alloc_locals" - (inst_ret) - "with_attr" - "with" - "call" - "nondet" - ; 1.0 - "impl" - "implicits" - "of" - "ref" - "mut" -] @keyword - -[ - "struct" - "enum" - "namespace" - "type" - "trait" -] @keyword.type - -[ - "func" - "fn" - "end" -] @keyword.function - -"return" @keyword.return - -[ - "cast" - "new" - "and" -] @keyword.operator - -[ - "tempvar" - "extern" -] @keyword.modifier - -[ - "if" - "else" - "match" -] @keyword.conditional - -"loop" @keyword.repeat - -[ - "assert" - "static_assert" - "nopanic" -] @keyword.exception - -; Fields -(implicit_arguments - (typed_identifier - (identifier) @variable.member)) - -(member_expression - "." - (identifier) @variable.member) - -(call_expression - (assignment_expression - left: (identifier) @variable.member)) - -(tuple_expression - (assignment_expression - left: (identifier) @variable.member)) - -(field_identifier) @variable.member - -(shorthand_field_initializer - (identifier) @variable.member) - -; Parameters -(arguments - (typed_identifier - (identifier) @variable.parameter)) - -(call_expression - (tuple_expression - (assignment_expression - left: (identifier) @variable.parameter))) - -(return_type - (tuple_type - (named_type - . - (identifier) @variable.parameter))) - -(parameter - (identifier) @variable.parameter) - -; Builtins -(builtin_directive - (identifier) @variable.builtin) - -(lang_directive - (identifier) @variable.builtin) - -[ - "ap" - "fp" - (self) -] @variable.builtin - -; Functions -(function_definition - "func" - (identifier) @function) - -(function_definition - "fn" - (identifier) @function) - -(function_signature - "fn" - (identifier) @function) - -(extern_function_statement - (identifier) @function) - -(call_expression - function: (identifier) @function.call) - -(call_expression - function: (scoped_identifier - (identifier) @function.call .)) - -(call_expression - function: (field_expression - field: (field_identifier) @function.call)) - -"jmp" @function.builtin - -; Types -(struct_definition - . - (identifier) @type - (typed_identifier - (identifier) @variable.member)?) - -(named_type - (identifier) @type .) - -[ - (builtin_type) - (primitive_type) -] @type.builtin - -((identifier) @type - (#lua-match? @type "^[A-Z][a-zA-Z0-9_]*$")) - -(type_identifier) @type - -; Constants -((identifier) @constant - (#lua-match? @constant "^[A-Z_][A-Z0-9_]*$")) - -(enum_variant - name: (identifier) @constant) - -(call_expression - function: (scoped_identifier - "::" - name: (identifier) @constant) - (#lua-match? @constant "^[A-Z]")) - -((match_arm - pattern: (match_pattern - (identifier) @constant)) - (#lua-match? @constant "^[A-Z]")) - -((match_arm - pattern: (match_pattern - (scoped_identifier - name: (identifier) @constant))) - (#lua-match? @constant "^[A-Z]")) - -((identifier) @constant.builtin - (#any-of? @constant.builtin "Some" "None" "Ok" "Err")) - -; Constructors -(unary_expression - "new" - (call_expression - . - (identifier) @constructor)) - -((call_expression - . - (identifier) @constructor) - (#lua-match? @constructor "^%u")) - -; Attributes -(decorator - "@" @attribute - (identifier) @attribute) - -(attribute_item - (identifier) @function.macro) - -(attribute_item - (scoped_identifier - (identifier) @function.macro .)) - -; Labels -(label - . - (identifier) @label) - -(inst_jmp_to_label - "jmp" - . - (identifier) @label) - -(inst_jnz_to_label - "jmp" - . - (identifier) @label) - -; Operators -[ - "+" - "-" - "*" - "/" - "**" - "==" - "!=" - "&" - "=" - "++" - "+=" - "@" - "!" - "~" - ".." - "&&" - "||" - "^" - "<" - "<=" - ">" - ">=" - "<<" - ">>" - "%" - "-=" - "*=" - "/=" - "%=" - "&=" - "|=" - "^=" - "<<=" - ">>=" - "?" -] @operator - -; Literals -(number) @number - -(boolean) @boolean - -[ - (string) - (short_string) -] @string - -; Punctuation -(attribute_item - "#" @punctuation.special) - -[ - "." - "," - ":" - ";" - "->" - "=>" - "::" -] @punctuation.delimiter - -[ - "{" - "}" - "(" - ")" - "[" - "]" - "%{" - "%}" -] @punctuation.bracket - -(type_parameters - [ - "<" - ">" - ] @punctuation.bracket) - -(type_arguments - [ - "<" - ">" - ] @punctuation.bracket) - -; Comment -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/indents.scm deleted file mode 100644 index f63ef36..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/indents.scm +++ /dev/null @@ -1,57 +0,0 @@ -[ - (mod_item) - (struct_item) - (enum_item) - (impl_item) - (struct_expression) - (match_expression) - (tuple_expression) - (match_arm) - (match_block) - (call_expression) - (assignment_expression) - (arguments) - (block) - (use_list) - (field_declaration_list) - (enum_variant_list) - (tuple_pattern) -] @indent.begin - -(import_statement - "(") @indent.begin - -(block - "}" @indent.end) - -(enum_item - body: (enum_variant_list - "}" @indent.end)) - -(match_expression - body: (match_block - "}" @indent.end)) - -(mod_item - body: (declaration_list - "}" @indent.end)) - -(struct_item - body: (field_declaration_list - "}" @indent.end)) - -(trait_item - body: (declaration_list - "}" @indent.end)) - -[ - ")" - "]" - "}" -] @indent.branch - -[ - (comment) - (string) - (short_string) -] @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/injections.scm deleted file mode 100644 index fbb66be..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -((python_code) @injection.content - (#set! injection.language "python")) - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/locals.scm deleted file mode 100644 index 0573cf6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cairo/locals.scm +++ /dev/null @@ -1,66 +0,0 @@ -; References -(identifier) @local.reference - -((type_identifier) @local.reference - (#set! reference.kind "type")) - -((field_identifier) @local.reference - (#set! reference.kind "field")) - -; Scopes -[ - (program) - (block) - (function_definition) - (loop_expression) - (if_expression) - (match_expression) - (match_arm) - (struct_item) - (enum_item) - (impl_item) -] @local.scope - -(use_declaration - argument: (scoped_identifier - name: (identifier) @local.definition.import)) - -(use_as_clause - alias: (identifier) @local.definition.import) - -(use_list - (identifier) @local.definition.import) ; use std::process::{Child, Command, Stdio}; - -; Functions -(function_definition - (identifier) @local.definition.function) - -(function_definition - (identifier) @local.definition.method - (parameter - (self))) - -; Function with parameters, defines parameters -(parameter - [ - (identifier) - (self) - ] @local.definition.parameter) - -; Types -(struct_item - name: (type_identifier) @local.definition.type) - -(constrained_type_parameter - left: (type_identifier) @local.definition.type) ; the P in remove_file>(path: P) - -(enum_item - name: (type_identifier) @local.definition.type) - -; Module -(mod_item - name: (identifier) @local.definition.namespace) - -; Variables -(assignment_expression - left: (identifier) @local.definition.var) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/folds.scm deleted file mode 100644 index 6e3f9c1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/folds.scm +++ /dev/null @@ -1,14 +0,0 @@ -[ - (annotation_targets) - (const_list) - (enum) - (interface) - (implicit_generics) - (generics) - (group) - (method_parameters) - (named_return_types) - (struct) - (struct_shorthand) - (union) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/highlights.scm deleted file mode 100644 index a48c007..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/highlights.scm +++ /dev/null @@ -1,141 +0,0 @@ -; Preproc -[ - (unique_id) - (top_level_annotation_body) -] @keyword.directive - -; Includes -[ - "import" - "$import" - "embed" - "using" -] @keyword.import - -(import_path) @string.special.path - -; Keywords -"extends" @keyword - -[ - "struct" - "interface" - "union" - "enum" - "annotation" - "group" - "namespace" -] @keyword.type - -; Builtins -"const" @keyword.modifier - -[ - (primitive_type) - "List" -] @type.builtin - -; Typedefs -(type_definition) @type.definition - -; Labels (@number, @number!) -(field_version) @label - -; Methods -[ - (annotation_definition_identifier) - (method_identifier) -] @function.method - -; Fields -(field_identifier) @variable.member - -; Properties -(property) @property - -; Parameters -[ - (param_identifier) - (return_identifier) -] @variable.parameter - -(annotation_target) @variable.parameter.builtin - -; Constants -[ - (const_identifier) - (local_const) - (enum_member) -] @constant - -(void) @constant.builtin - -; Types -[ - (enum_identifier) - (extend_type) - (type_identifier) -] @type - -; Attributes -[ - (annotation_identifier) - (attribute) -] @attribute - -; Operators -"=" @operator - -; Literals -[ - (string) - (concatenated_string) - (block_text) - (namespace) -] @string - -(namespace) @string.special - -(escape_sequence) @string.escape - -(data_string) @string.special - -(number) @number - -(float) @number.float - -(boolean) @boolean - -(data_hex) @string.special.symbol - -; Punctuation -[ - "*" - "$" - ":" -] @punctuation.special - -[ - "{" - "}" -] @punctuation.bracket - -[ - "(" - ")" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - "." - "," - ";" - "->" -] @punctuation.delimiter - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/indents.scm deleted file mode 100644 index cc2f4d7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/indents.scm +++ /dev/null @@ -1,40 +0,0 @@ -[ - (annotation_targets) - (const) - (enum) - (interface) - (implicit_generics) - (generics) - (group) - (method_parameters) - (named_return_types) - (struct) - (union) - (field) -] @indent.begin - -((struct_shorthand - (property)) @indent.align - (#set! indent.open_delimiter "(") - (#set! indent.close_delimiter ")")) - -((method - (field_version)) @indent.align - (#set! indent.open_delimiter field_version)) - -((const_list - (const_value)) @indent.align - (#set! indent.open_delimiter "[") - (#set! indent.close_delimiter "]")) - -(concatenated_string) @indent.align - -[ - "}" - ")" -] @indent.end @indent.branch - -[ - (ERROR) - (comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/locals.scm deleted file mode 100644 index d1f0cca..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/capnp/locals.scm +++ /dev/null @@ -1,97 +0,0 @@ -[ - (message) - (annotation_targets) - (const_list) - (enum) - (interface) - (implicit_generics) - (generics) - (group) - (method_parameters) - (named_return_types) - (struct) - (struct_shorthand) - (union) -] @local.scope - -[ - (extend_type) - (field_type) -] @local.reference - -(custom_type - (type_identifier) @local.reference) - -(custom_type - (generics - (generic_parameters - (generic_identifier) @local.reference))) - -(annotation_definition_identifier) @local.definition - -(const_identifier) @local.definition.constant - -(enum - (enum_identifier) @local.definition.enum) - -[ - (enum_member) - (field_identifier) -] @local.definition.field - -(method_identifier) @local.definition.method - -(namespace) @local.definition.namespace - -[ - (param_identifier) - (return_identifier) -] @local.definition.parameter - -(group - (type_identifier) @local.definition.type) - -(struct - (type_identifier) @local.definition.type) - -(union - (type_identifier) @local.definition.type) - -(interface - (type_identifier) @local.definition.type) - -; Generics Related (don't know how to combine these) -(struct - (generics - (generic_parameters - (generic_identifier) @local.definition.parameter))) - -(interface - (generics - (generic_parameters - (generic_identifier) @local.definition.parameter))) - -(method - (implicit_generics - (implicit_generic_parameters - (generic_identifier) @local.definition.parameter))) - -(method - (generics - (generic_parameters - (generic_identifier) @local.definition.parameter))) - -(annotation - (generics - (generic_parameters - (generic_identifier) @local.definition.type))) - -(replace_using - (generics - (generic_parameters - (generic_identifier) @local.definition.type))) - -(return_type - (generics - (generic_parameters - (generic_identifier) @local.definition.type))) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/folds.scm deleted file mode 100644 index 052dd20..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (intent_def) - (slot_def) - (alias_def) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/highlights.scm deleted file mode 100644 index 47113f2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/highlights.scm +++ /dev/null @@ -1,54 +0,0 @@ -; Punctuation -[ - "%[" - "@[" - "~[" - "*[" - "]" - "(" - ")" -] @punctuation.bracket - -"," @punctuation.delimiter - -(eq) @operator - -([ - "\"" - "'" -] @punctuation.special - (#set! conceal "")) - -[ - "%" - "?" - "#" -] @character.special - -; Entities -(intent) @module - -(slot) @type - -(variation) @attribute - -(alias) @keyword.directive - -(number) @number - -(argument - key: (string) @property - value: (string) @string) - -(escape) @string.escape - -; Import -"import" @keyword.import - -(file) @string.special.path - -; Text -(word) @spell - -; Comment -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/indents.scm deleted file mode 100644 index dc9e13d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/indents.scm +++ /dev/null @@ -1,8 +0,0 @@ -[ - (intent_def) - (slot_def) - (alias_def) -] @indent.begin - -(ERROR - "]") @indent.begin diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/locals.scm deleted file mode 100644 index 827447f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/chatito/locals.scm +++ /dev/null @@ -1,16 +0,0 @@ -; Definitions -(intent_def - (intent) @local.definition) - -(slot_def - (slot) @local.definition) - -(alias_def - (alias) @local.definition) - -; References -(slot_ref - (slot) @local.reference) - -(alias_ref - (alias) @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/folds.scm deleted file mode 100644 index 47525b1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/folds.scm +++ /dev/null @@ -1,13 +0,0 @@ -[ - (template_body) - (block_statement) - (if_statement) - (for_statement) - (while_statement) - (function_body) - (call_expression) - (array_expression) - (tuple_expression) - (comment) - (include_directive)+ -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/highlights.scm deleted file mode 100644 index c61925e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/highlights.scm +++ /dev/null @@ -1,137 +0,0 @@ -; identifiers -; ----------- -(identifier) @variable - -; Pragma -; ----------- -[ - "pragma" - "circom" -] @keyword.directive - -(circom_version) @string.special - -; Include -; ----------- -[ - "public" - "signal" - "var" - "include" -] @keyword.import - -; Literals -; -------- -(string) @string - -(int_literal) @number - -; Definitions -; ----------- -(function_definition - name: (identifier) @function) - -(template_definition - name: (identifier) @function) - -; Use constructor coloring for special functions -"main" @constructor - -; Invocations -(call_expression - . - (identifier) @function.call) - -; Function parameters -(parameter - name: (identifier) @variable.parameter) - -; Members -(member_expression - property: (property_identifier) @property) - -; Tokens -; ------- -; Keywords -[ - "input" - "output" - "public" - "component" -] @keyword - -[ - "for" - "while" -] @keyword.repeat - -[ - "if" - "else" -] @keyword.conditional - -"return" @keyword.return - -[ - "function" - "template" -] @keyword.function - -; Punctuation -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -[ - "." - "," - ";" -] @punctuation.delimiter - -; Operators -[ - "&&" - "||" - ">>" - "<<" - "&" - "^" - "|" - "+" - "-" - "*" - "/" - "%" - "**" - "<" - "<=" - "=" - "==" - "!=" - "+=" - "-=" - ">=" - ">" - "!" - "~" - "-" - "+" - "++" - "--" - "<==" - "==>" - "<--" - "-->" - "===" -] @operator - -; Comments -(comment) @comment @spell - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/locals.scm deleted file mode 100644 index 4c3a751..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/circom/locals.scm +++ /dev/null @@ -1,12 +0,0 @@ -(function_definition) @local.scope - -(template_definition) @local.scope - -(main_component_definition) @local.scope - -(block_statement) @local.scope - -(parameter - name: (identifier) @local.definition) @local.definition - -(identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/folds.scm deleted file mode 100644 index eceb697..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/folds.scm +++ /dev/null @@ -1,2 +0,0 @@ -(source - (list_lit) @fold) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/highlights.scm deleted file mode 100644 index 2642766..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/highlights.scm +++ /dev/null @@ -1,347 +0,0 @@ -; >> Explanation -; Parsers for lisps are a bit weird in that they just return the raw forms. -; This means we have to do a bit of extra work in the queries to get things -; highlighted as they should be. -; -; For the most part this means that some things have to be assigned multiple -; groups. -; By doing this we can add a basic capture and then later refine it with more -; specialized captures. -; This can mean that sometimes things are highlighted weirdly because they -; have multiple highlight groups applied to them. -; >> Literals -((dis_expr) @comment - (#set! priority 105) - ; Higher priority to mark the whole sexpr as a comment - ) - -(kwd_lit) @string.special.symbol - -(str_lit) @string - -(num_lit) @number - -(char_lit) @character - -(bool_lit) @boolean - -(nil_lit) @constant.builtin - -(comment) @comment @spell - -(regex_lit) @string.regexp - -[ - "'" - "`" -] @string.escape - -[ - "~" - "~@" - "#" -] @punctuation.special - -[ - "{" - "}" - "[" - "]" - "(" - ")" -] @punctuation.bracket - -; >> Symbols -; General symbol highlighting -(sym_lit) @variable - -; General function calls -(list_lit - . - (sym_lit) @function.call) - -(anon_fn_lit - . - (sym_lit) @function.call) - -; Quoted symbols -(quoting_lit - (sym_lit) @string.special.symbol) - -(syn_quoting_lit - (sym_lit) @string.special.symbol) - -; Used in destructure pattern -((sym_lit) @variable.parameter - (#lua-match? @variable.parameter "^[&]")) - -; Inline function variables -((sym_lit) @variable.builtin - (#lua-match? @variable.builtin "^%%%d*$")) - -((sym_lit) @variable.builtin - (#eq? @variable.builtin "%&")) - -; Constructor -((sym_lit) @constructor - (#lua-match? @constructor "^-%>[^>].*")) - -; Builtin dynamic variables -((sym_lit) @variable.builtin - (#any-of? @variable.builtin - "*agent*" "*allow-unresolved-vars*" "*assert*" "*clojure-version*" "*command-line-args*" - "*compile-files*" "*compile-path*" "*compiler-options*" "*data-readers*" - "*default-data-reader-fn*" "*err*" "*file*" "*flush-on-newline*" "*fn-loader*" "*in*" - "*math-context*" "*ns*" "*out*" "*print-dup*" "*print-length*" "*print-level*" "*print-meta*" - "*print-namespace-maps*" "*print-readably*" "*read-eval*" "*reader-resolver*" "*source-path*" - "*suppress-read*" "*unchecked-math*" "*use-context-classloader*" "*verbose-defrecords*" - "*warn-on-reflection*")) - -; Builtin repl variables -((sym_lit) @variable.builtin - (#any-of? @variable.builtin "*1" "*2" "*3" "*e")) - -; Types -(sym_lit - name: (sym_name) @_name - (#lua-match? @_name "^[%u][^/%s]*$")) @type - -; Symbols with `.` but not `/` -(sym_lit - !namespace - name: (sym_name) @_name - (#lua-match? @_name "^[^.]+[.]")) @type - -; Interop -; (.instanceMember instance args*) -; (.instanceMember Classname args*) -((sym_lit - name: (sym_name) @_name) @function.method - (#lua-match? @_name "^%.[^-]")) - -; (.-instanceField instance) -((sym_name) @variable.member - (#lua-match? @variable.member "^%.%-%S*")) - -; Classname/staticField -(sym_lit - namespace: (sym_ns) @_namespace - (#lua-match? @_namespace "^[%u]%S*$")) @variable.member - -; (Classname/staticMethod args*) -(list_lit - . - (sym_lit - namespace: (sym_ns) @_namespace - (#lua-match? @_namespace "^%u")) @function.method) - -; TODO: Special casing for the `.` macro -; Operators -((sym_lit) @operator - (#any-of? @operator "*" "*'" "+" "+'" "-" "-'" "/" "<" "<=" ">" ">=" "=" "==")) - -((sym_lit) @keyword.operator - (#any-of? @keyword.operator "not" "not=" "and" "or")) - -; Definition functions -((sym_lit) @keyword - (#any-of? @keyword - "def" "defonce" "defrecord" "defmacro" "definline" "definterface" "defmulti" "defmethod" - "defstruct" "defprotocol" "deftype")) - -((sym_lit) @keyword - (#eq? @keyword "declare")) - -((sym_name) @keyword.coroutine - (#any-of? @keyword.coroutine - "alts!" "alts!!" "await" "await-for" "await1" "chan" "close!" "future" "go" "sync" "thread" - "timeout" "!" ">!!")) - -((sym_lit - name: (sym_name) @_keyword.function.name) @keyword.function - (#any-of? @_keyword.function.name "defn" "defn-" "fn" "fn*")) - -; Comment -((sym_lit) @comment - (#eq? @comment "comment")) - -; Conditionals -((sym_lit) @keyword.conditional - (#any-of? @keyword.conditional "case" "cond" "cond->" "cond->>" "condp")) - -((sym_lit) @keyword.conditional - (#any-of? @keyword.conditional "if" "if-let" "if-not" "if-some")) - -((sym_lit) @keyword.conditional - (#any-of? @keyword.conditional "when" "when-first" "when-let" "when-not" "when-some")) - -; Repeats -((sym_lit) @keyword.repeat - (#any-of? @keyword.repeat "doseq" "dotimes" "for" "loop" "recur" "while")) - -; Exception -((sym_lit) @keyword.exception - (#any-of? @keyword.exception "throw" "try" "catch" "finally")) - -; Includes -((sym_lit) @keyword.import - (#any-of? @keyword.import "ns" "import" "require" "use")) - -; Builtin macros -; TODO: Do all these items belong here? -((sym_lit - name: (sym_name) @function.macro) - (#any-of? @function.macro - "." ".." "->" "->>" "amap" "areduce" "as->" "assert" "binding" "bound-fn" "delay" "do" "dosync" - "doto" "extend-protocol" "extend-type" "gen-class" "gen-interface" "io!" "lazy-cat" "lazy-seq" - "let" "letfn" "locking" "memfn" "monitor-enter" "monitor-exit" "proxy" "proxy-super" "pvalues" - "refer-clojure" "reify" "set!" "some->" "some->>" "time" "unquote" "unquote-splicing" "var" - "vswap!" "with-bindings" "with-in-str" "with-loading-context" "with-local-vars" "with-open" - "with-out-str" "with-precision" "with-redefs")) - -; All builtin functions -; (->> (ns-publics *ns*) -; (keep (fn [[s v]] (when-not (:macro (meta v)) s))) -; sort -; clojure.pprint/pprint)) -; ...and then lots of manual filtering... -((sym_lit - name: (sym_name) @function.builtin) - (#any-of? @function.builtin - "->ArrayChunk" "->Eduction" "->Vec" "->VecNode" "->VecSeq" "-cache-protocol-fn" "-reset-methods" - "PrintWriter-on" "StackTraceElement->vec" "Throwable->map" "accessor" "aclone" "add-classpath" - "add-tap" "add-watch" "agent" "agent-error" "agent-errors" "aget" "alength" "alias" "all-ns" - "alter" "alter-meta!" "alter-var-root" "ancestors" "any?" "apply" "array-map" "aset" - "aset-boolean" "aset-byte" "aset-char" "aset-double" "aset-float" "aset-int" "aset-long" - "aset-short" "assoc" "assoc!" "assoc-in" "associative?" "atom" "bases" "bean" "bigdec" "bigint" - "biginteger" "bit-and" "bit-and-not" "bit-clear" "bit-flip" "bit-not" "bit-or" "bit-set" - "bit-shift-left" "bit-shift-right" "bit-test" "bit-xor" "boolean" "boolean-array" "boolean?" - "booleans" "bound-fn*" "bound?" "bounded-count" "butlast" "byte" "byte-array" "bytes" "bytes?" - "cast" "cat" "char" "char-array" "char-escape-string" "char-name-string" "char?" "chars" "chunk" - "chunk-append" "chunk-buffer" "chunk-cons" "chunk-first" "chunk-next" "chunk-rest" - "chunked-seq?" "class" "class?" "clear-agent-errors" "clojure-version" "coll?" "commute" "comp" - "comparator" "compare" "compare-and-set!" "compile" "complement" "completing" "concat" "conj" - "conj!" "cons" "constantly" "construct-proxy" "contains?" "count" "counted?" "create-ns" - "create-struct" "cycle" "dec" "dec'" "decimal?" "dedupe" "default-data-readers" "delay?" - "deliver" "denominator" "deref" "derive" "descendants" "destructure" "disj" "disj!" "dissoc" - "dissoc!" "distinct" "distinct?" "doall" "dorun" "double" "double-array" "eduction" "empty" - "empty?" "ensure" "ensure-reduced" "enumeration-seq" "error-handler" "error-mode" "eval" "even?" - "every-pred" "every?" "extend" "extenders" "extends?" "false?" "ffirst" "file-seq" "filter" - "filterv" "find" "find-keyword" "find-ns" "find-protocol-impl" "find-protocol-method" "find-var" - "first" "flatten" "float" "float-array" "float?" "floats" "flush" "fn?" "fnext" "fnil" "force" - "format" "frequencies" "future-call" "future-cancel" "future-cancelled?" "future-done?" - "future?" "gensym" "get" "get-in" "get-method" "get-proxy-class" "get-thread-bindings" - "get-validator" "group-by" "halt-when" "hash" "hash-combine" "hash-map" "hash-ordered-coll" - "hash-set" "hash-unordered-coll" "ident?" "identical?" "identity" "ifn?" "in-ns" "inc" "inc'" - "indexed?" "init-proxy" "inst-ms" "inst-ms*" "inst?" "instance?" "int" "int-array" "int?" - "integer?" "interleave" "intern" "interpose" "into" "into-array" "ints" "isa?" "iterate" - "iterator-seq" "juxt" "keep" "keep-indexed" "key" "keys" "keyword" "keyword?" "last" "line-seq" - "list" "list*" "list?" "load" "load-file" "load-reader" "load-string" "loaded-libs" "long" - "long-array" "longs" "macroexpand" "macroexpand-1" "make-array" "make-hierarchy" "map" - "map-entry?" "map-indexed" "map?" "mapcat" "mapv" "max" "max-key" "memoize" "merge" "merge-with" - "meta" "method-sig" "methods" "min" "min-key" "mix-collection-hash" "mod" "munge" "name" - "namespace" "namespace-munge" "nat-int?" "neg-int?" "neg?" "newline" "next" "nfirst" "nil?" - "nnext" "not-any?" "not-empty" "not-every?" "ns-aliases" "ns-imports" "ns-interns" "ns-map" - "ns-name" "ns-publics" "ns-refers" "ns-resolve" "ns-unalias" "ns-unmap" "nth" "nthnext" - "nthrest" "num" "number?" "numerator" "object-array" "odd?" "parents" "partial" "partition" - "partition-all" "partition-by" "pcalls" "peek" "persistent!" "pmap" "pop" "pop!" - "pop-thread-bindings" "pos-int?" "pos?" "pr" "pr-str" "prefer-method" "prefers" - "primitives-classnames" "print" "print-ctor" "print-dup" "print-method" "print-simple" - "print-str" "printf" "println" "println-str" "prn" "prn-str" "promise" "proxy-call-with-super" - "proxy-mappings" "proxy-name" "push-thread-bindings" "qualified-ident?" "qualified-keyword?" - "qualified-symbol?" "quot" "rand" "rand-int" "rand-nth" "random-sample" "range" "ratio?" - "rational?" "rationalize" "re-find" "re-groups" "re-matcher" "re-matches" "re-pattern" "re-seq" - "read" "read+string" "read-line" "read-string" "reader-conditional" "reader-conditional?" - "realized?" "record?" "reduce" "reduce-kv" "reduced" "reduced?" "reductions" "ref" - "ref-history-count" "ref-max-history" "ref-min-history" "ref-set" "refer" - "release-pending-sends" "rem" "remove" "remove-all-methods" "remove-method" "remove-ns" - "remove-tap" "remove-watch" "repeat" "repeatedly" "replace" "replicate" "requiring-resolve" - "reset!" "reset-meta!" "reset-vals!" "resolve" "rest" "restart-agent" "resultset-seq" "reverse" - "reversible?" "rseq" "rsubseq" "run!" "satisfies?" "second" "select-keys" "send" "send-off" - "send-via" "seq" "seq?" "seqable?" "seque" "sequence" "sequential?" "set" - "set-agent-send-executor!" "set-agent-send-off-executor!" "set-error-handler!" "set-error-mode!" - "set-validator!" "set?" "short" "short-array" "shorts" "shuffle" "shutdown-agents" - "simple-ident?" "simple-keyword?" "simple-symbol?" "slurp" "some" "some-fn" "some?" "sort" - "sort-by" "sorted-map" "sorted-map-by" "sorted-set" "sorted-set-by" "sorted?" "special-symbol?" - "spit" "split-at" "split-with" "str" "string?" "struct" "struct-map" "subs" "subseq" "subvec" - "supers" "swap!" "swap-vals!" "symbol" "symbol?" "tagged-literal" "tagged-literal?" "take" - "take-last" "take-nth" "take-while" "tap>" "test" "the-ns" "thread-bound?" "to-array" - "to-array-2d" "trampoline" "transduce" "transient" "tree-seq" "true?" "type" "unchecked-add" - "unchecked-add-int" "unchecked-byte" "unchecked-char" "unchecked-dec" "unchecked-dec-int" - "unchecked-divide-int" "unchecked-double" "unchecked-float" "unchecked-inc" "unchecked-inc-int" - "unchecked-int" "unchecked-long" "unchecked-multiply" "unchecked-multiply-int" - "unchecked-negate" "unchecked-negate-int" "unchecked-remainder-int" "unchecked-short" - "unchecked-subtract" "unchecked-subtract-int" "underive" "unquote" "unquote-splicing" - "unreduced" "unsigned-bit-shift-right" "update" "update-in" "update-proxy" "uri?" "uuid?" "val" - "vals" "var-get" "var-set" "var?" "vary-meta" "vec" "vector" "vector-of" "vector?" "volatile!" - "volatile?" "vreset!" "with-bindings*" "with-meta" "with-redefs-fn" "xml-seq" "zero?" "zipmap" - ; earlier - "drop" "drop-last" "drop-while" "double?" "doubles" "ex-data" "ex-info" - ; 1.10 - "ex-cause" "ex-message" - ; 1.11 - "NaN?" "abs" "infinite?" "iteration" "random-uuid" "parse-boolean" "parse-double" "parse-long" - "parse-uuid" "seq-to-map-for-destructuring" "update-keys" "update-vals" - ; 1.12 - "partitionv" "partitionv-all" "splitv-at")) - -; >> Context based highlighting -; def-likes -; Correctly highlight docstrings -;(list_lit -;. -;(sym_lit) @_keyword ; Don't really want to highlight twice -;(#any-of? @_keyword -;"def" "defonce" "defrecord" "defmacro" "definline" -;"defmulti" "defmethod" "defstruct" "defprotocol" -;"deftype") -;. -;(sym_lit) -;. -; TODO: Add @comment highlight -;(str_lit)? -;. -;(_)) -; Function definitions -(list_lit - . - ((sym_lit - name: (sym_name) @_keyword.function.name) - (#any-of? @_keyword.function.name "defn" "defn-" "fn" "fn*")) - . - (sym_lit)? @function - . - ; TODO: Add @comment highlight - (str_lit)?) - -; TODO: Fix parameter highlighting -; I think there's a bug here in nvim-treesitter -; TODO: Reproduce bug and file ticket -;. -;[(vec_lit -; (sym_lit)* @variable.parameter) -; (list_lit -; (vec_lit -; (sym_lit)* @variable.parameter))]) -;[((list_lit -; (vec_lit -; (sym_lit) @variable.parameter) -; (_) -; + -; ((vec_lit -; (sym_lit) @variable.parameter) -; (_))) -; Meta punctuation -; NOTE: When the above `Function definitions` query captures the -; the @function it also captures the child meta_lit -; We capture the meta_lit symbol (^) after so that the later -; highlighting overrides the former -"^" @punctuation.special - -; namespaces -(list_lit - . - (sym_lit) @_include - (#eq? @_include "ns") - . - (sym_lit) @module) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/locals.scm deleted file mode 100644 index e47adce..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/clojure/locals.scm +++ /dev/null @@ -1 +0,0 @@ -; placeholder file to get incremental selection to work diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/folds.scm deleted file mode 100644 index ef153b9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/folds.scm +++ /dev/null @@ -1,8 +0,0 @@ -[ - (if_condition) - (foreach_loop) - (while_loop) - (function_def) - (macro_def) - (block_def) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/highlights.scm deleted file mode 100644 index fbbf0d5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/highlights.scm +++ /dev/null @@ -1,221 +0,0 @@ -(normal_command - (identifier) - (argument_list - (argument - (unquoted_argument)) @constant) - (#lua-match? @constant "^[%u@][%u%d_]+$")) - -[ - (quoted_argument) - (bracket_argument) -] @string - -(variable_ref) @none - -(variable) @variable - -[ - (bracket_comment) - (line_comment) -] @comment @spell - -(normal_command - (identifier) @function) - -[ - "ENV" - "CACHE" -] @module - -[ - "$" - "{" - "}" -] @punctuation.special - -[ - "(" - ")" -] @punctuation.bracket - -[ - (function) - (endfunction) - (macro) - (endmacro) -] @keyword.function - -[ - (if) - (elseif) - (else) - (endif) -] @keyword.conditional - -[ - (foreach) - (endforeach) - (while) - (endwhile) -] @keyword.repeat - -(normal_command - (identifier) @keyword.repeat - (#match? @keyword.repeat "\\c^(continue|break)$")) - -(normal_command - (identifier) @keyword.return - (#match? @keyword.return "\\c^return$")) - -(function_command - (function) - (argument_list - . - (argument) @function - (argument)* @variable.parameter)) - -(macro_command - (macro) - (argument_list - . - (argument) @function.macro - (argument)* @variable.parameter)) - -(block_def - (block_command - (block) @function.builtin - (argument_list - (argument - (unquoted_argument) @constant)) - (#any-of? @constant "SCOPE_FOR" "POLICIES" "VARIABLES" "PROPAGATE")) - (endblock_command - (endblock) @function.builtin)) - -; -((argument) @boolean - (#match? @boolean "\\c^(1|on|yes|true|y|0|off|no|false|n|ignore|notfound|.*-notfound)$")) - -; -(if_command - (if) - (argument_list - (argument) @keyword.operator) - (#any-of? @keyword.operator - "NOT" "AND" "OR" "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST" "EXISTS" "IS_NEWER_THAN" - "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE" "MATCHES" "LESS" "GREATER" "EQUAL" "LESS_EQUAL" - "GREATER_EQUAL" "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL" - "VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL")) - -(elseif_command - (elseif) - (argument_list - (argument) @keyword.operator) - (#any-of? @keyword.operator - "NOT" "AND" "OR" "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST" "EXISTS" "IS_NEWER_THAN" - "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE" "MATCHES" "LESS" "GREATER" "EQUAL" "LESS_EQUAL" - "GREATER_EQUAL" "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL" - "VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL")) - -(normal_command - (identifier) @function.builtin - (#match? @function.builtin - "\\c^(cmake_host_system_information|cmake_language|cmake_minimum_required|cmake_parse_arguments|cmake_path|cmake_policy|configure_file|execute_process|file|find_file|find_library|find_package|find_path|find_program|foreach|get_cmake_property|get_directory_property|get_filename_component|get_property|include|include_guard|list|macro|mark_as_advanced|math|message|option|separate_arguments|set|set_directory_properties|set_property|site_name|string|unset|variable_watch|add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|build_command|create_test_sourcelist|define_property|enable_language|enable_testing|export|fltk_wrap_ui|get_source_file_property|get_target_property|get_test_property|include_directories|include_external_msproject|include_regular_expression|install|link_directories|link_libraries|load_cache|project|remove_definitions|set_source_files_properties|set_target_properties|set_tests_properties|source_group|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_precompile_headers|target_sources|try_compile|try_run|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload)$")) - -(normal_command - (identifier) @_function - (argument_list - . - (argument) @variable) - (#match? @_function "\\c^set$")) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^set$") - (argument_list - . - (argument) - ((argument) @_cache @keyword.modifier - . - (argument) @_type @type - (#any-of? @_cache "CACHE") - (#any-of? @_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL")))) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^unset$") - (argument_list - . - (argument) - (argument) @keyword.modifier - (#any-of? @keyword.modifier "CACHE" "PARENT_SCOPE"))) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - (argument_list - . - (argument) @constant - (#any-of? @constant "LENGTH" "GET" "JOIN" "SUBLIST" "FIND") - . - (argument) @variable - (argument) @variable .)) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - (argument_list - . - (argument) @constant - . - (argument) @variable - (#any-of? @constant - "APPEND" "FILTER" "INSERT" "POP_BACK" "POP_FRONT" "PREPEND" "REMOVE_ITEM" "REMOVE_AT" - "REMOVE_DUPLICATES" "REVERSE" "SORT"))) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - (argument_list - . - (argument) @_transform @constant - . - (argument) @variable - . - (argument) @_action @constant - (#eq? @_transform "TRANSFORM") - (#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE"))) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - (argument_list - . - (argument) @_transform @constant - . - (argument) @variable - . - (argument) @_action @constant - . - (argument)? @_selector @constant - (#eq? @_transform "TRANSFORM") - (#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE") - (#any-of? @_selector "AT" "FOR" "REGEX"))) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - (argument_list - . - (argument) @_transform @constant - (argument) @constant - . - (argument) @variable - (#eq? @_transform "TRANSFORM") - (#eq? @constant "OUTPUT_VARIABLE"))) - -(escape_sequence) @string.escape - -((source_file - . - (line_comment) @keyword.directive @nospell) - (#lua-match? @keyword.directive "^#!/")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/indents.scm deleted file mode 100644 index cbd976c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/indents.scm +++ /dev/null @@ -1,26 +0,0 @@ -[ - (normal_command) - (if_condition) - (foreach_loop) - (while_loop) - (function_def) - (macro_def) - (block_def) -] @indent.begin - -[ - (elseif_command) - (else_command) - (endif_command) - (endforeach_command) - (endwhile_command) - (endfunction_command) - (endmacro_command) - (endblock_command) -] @indent.branch - -")" @indent.branch - -")" @indent.end - -(argument_list) @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/injections.scm deleted file mode 100644 index eb8e215..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cmake/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (bracket_comment) - (line_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/comment/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/comment/highlights.scm deleted file mode 100644 index 5d18b79..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/comment/highlights.scm +++ /dev/null @@ -1,49 +0,0 @@ -((tag - (name) @comment.todo @nospell - ("(" @punctuation.bracket - (user) @constant - ")" @punctuation.bracket)? - ":" @punctuation.delimiter) - (#any-of? @comment.todo "TODO" "WIP")) - -("text" @comment.todo @nospell - (#any-of? @comment.todo "TODO" "WIP")) - -((tag - (name) @comment.note @nospell - ("(" @punctuation.bracket - (user) @constant - ")" @punctuation.bracket)? - ":" @punctuation.delimiter) - (#any-of? @comment.note "NOTE" "XXX" "INFO" "DOCS" "PERF" "TEST")) - -("text" @comment.note @nospell - (#any-of? @comment.note "NOTE" "XXX" "INFO" "DOCS" "PERF" "TEST")) - -((tag - (name) @comment.warning @nospell - ("(" @punctuation.bracket - (user) @constant - ")" @punctuation.bracket)? - ":" @punctuation.delimiter) - (#any-of? @comment.warning "HACK" "WARNING" "WARN" "FIX")) - -("text" @comment.warning @nospell - (#any-of? @comment.warning "HACK" "WARNING" "WARN" "FIX")) - -((tag - (name) @comment.error @nospell - ("(" @punctuation.bracket - (user) @constant - ")" @punctuation.bracket)? - ":" @punctuation.delimiter) - (#any-of? @comment.error "FIXME" "BUG" "ERROR")) - -("text" @comment.error @nospell - (#any-of? @comment.error "FIXME" "BUG" "ERROR")) - -; Issue number (#123) -("text" @number - (#lua-match? @number "^#[0-9]+$")) - -(uri) @string.special.url @nospell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/folds.scm deleted file mode 100644 index eceb697..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/folds.scm +++ /dev/null @@ -1,2 +0,0 @@ -(source - (list_lit) @fold) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/highlights.scm deleted file mode 100644 index 7236c84..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/highlights.scm +++ /dev/null @@ -1,315 +0,0 @@ -(sym_lit) @variable - -; A highlighting for functions/macros in th cl namespace is available in theHamsta/nvim-treesitter-commonlisp -;(list_lit . (sym_lit) @function.builtin (#cl-standard-function? @function.builtin)) -;(list_lit . (sym_lit) @function.builtin (#cl-standard-macro? @function.macro)) -(dis_expr) @comment - -(defun_keyword) @function.macro - -(defun_header - function_name: (_) @function) - -(defun_header - lambda_list: (list_lit - (sym_lit) @variable.parameter)) - -(defun_header - keyword: (defun_keyword - "defmethod") - lambda_list: (list_lit - (list_lit - . - (sym_lit) - . - (sym_lit) @string.special.symbol))) - -(defun_header - lambda_list: (list_lit - (list_lit - . - (sym_lit) @variable.parameter - . - (_)))) - -(defun_header - specifier: (sym_lit) @string.special.symbol) - -[ - ":" - "::" - "." -] @punctuation.special - -[ - (accumulation_verb) - (for_clause_word) - "for" - "and" - "finally" - "thereis" - "always" - "when" - "if" - "unless" - "else" - "do" - "loop" - "below" - "in" - "from" - "across" - "repeat" - "being" - "into" - "with" - "as" - "while" - "until" - "return" - "initially" -] @function.macro - -"=" @operator - -(include_reader_macro) @string.special.symbol - -[ - "#C" - "#c" -] @number - -[ - (kwd_lit) - (self_referential_reader_macro) -] @string.special.symbol - -(package_lit - package: (_) @module) - -"cl" @module - -(str_lit) @string - -(num_lit) @number - -((sym_lit) @boolean - (#any-of? @boolean "t" "T")) - -(nil_lit) @constant.builtin - -(comment) @comment @spell - -; dynamic variables -((sym_lit) @variable.builtin - (#lua-match? @variable.builtin "^[*].+[*]$")) - -; quote -(format_specifier) @string.escape - -(quoting_lit - "'" @string.escape) - -(syn_quoting_lit - "`" @string.escape) - -(unquoting_lit - "," @string.escape) - -(unquote_splicing_lit - ",@" @string.escape) - -[ - "(" - ")" -] @punctuation.bracket - -(block_comment) @comment @spell - -(with_clause - type: (_) @type) - -(for_clause - type: (_) @type) - -; defun-like things -(list_lit - . - (sym_lit) @function.macro - . - (sym_lit) @function - (#eq? @function.macro "deftest")) - -; Macros and Special Operators -(list_lit - . - (sym_lit) @function.macro - ; Generated via https://github.com/theHamsta/nvim-treesitter-commonlisp/blob/22fdc9fd6ed594176cc7299cc6f68dd21c94c63b/scripts/generate-symbols.lisp#L1-L21 - (#any-of? @function.macro - "do*" "step" "handler-bind" "decf" "prog1" "destructuring-bind" "defconstant" "do" "lambda" - "with-standard-io-syntax" "case" "restart-bind" "ignore-errors" "with-slots" "prog2" "defclass" - "define-condition" "print-unreadable-object" "defvar" "when" "with-open-file" "prog" "incf" - "declaim" "and" "loop-finish" "multiple-value-bind" "pop" "psetf" "defmacro" "with-open-stream" - "define-modify-macro" "defsetf" "formatter" "call-method" "handler-case" "pushnew" "or" - "with-hash-table-iterator" "ecase" "cond" "defun" "remf" "ccase" "define-compiler-macro" - "dotimes" "multiple-value-list" "assert" "deftype" "with-accessors" "trace" - "with-simple-restart" "do-symbols" "nth-value" "define-symbol-macro" "psetq" "rotatef" "dolist" - "check-type" "multiple-value-setq" "push" "pprint-pop" "loop" "define-setf-expander" - "pprint-exit-if-list-exhausted" "with-condition-restarts" "defstruct" "with-input-from-string" - "with-compilation-unit" "defgeneric" "with-output-to-string" "untrace" "defparameter" - "ctypecase" "do-external-symbols" "etypecase" "do-all-symbols" "with-package-iterator" "unless" - "defmethod" "in-package" "defpackage" "return" "typecase" "shiftf" "setf" "pprint-logical-block" - "time" "restart-case" "prog*" "define-method-combination" "optimize")) - -; constant -((sym_lit) @constant - (#lua-match? @constant "^[+].+[+]$")) - -(var_quoting_lit - marker: "#'" @string.special.symbol - value: (_) @string.special.symbol) - -[ - "#" - "#p" - "#P" -] @string.special.symbol - -(list_lit - . - (sym_lit) @function.builtin - ; Generated via https://github.com/theHamsta/nvim-treesitter-commonlisp/blob/22fdc9fd6ed594176cc7299cc6f68dd21c94c63b/scripts/generate-symbols.lisp#L1-L21 - (#any-of? @function.builtin - "apropos-list" "subst" "substitute" "pprint-linear" "file-namestring" "write-char" "do*" - "slot-exists-p" "file-author" "macro-function" "rassoc" "make-echo-stream" - "arithmetic-error-operation" "position-if-not" "list" "cdadr" "lisp-implementation-type" - "vector-push" "let" "length" "string-upcase" "adjoin" "digit-char" "step" "member-if" - "handler-bind" "lognot" "apply" "gcd" "slot-unbound" "stringp" "values-list" "stable-sort" - "decode-float" "make-list" "rplaca" "isqrt" "export" "synonym-stream-symbol" "function-keywords" - "replace" "tanh" "maphash" "code-char" "decf" "array-displacement" "string-not-lessp" - "slot-value" "remove-if" "cell-error-name" "vectorp" "cdddar" "two-way-stream-output-stream" - "parse-integer" "get-internal-real-time" "fourth" "make-string" "slot-missing" "byte-size" - "string-trim" "nstring-downcase" "cdaddr" "<" "labels" "interactive-stream-p" "fifth" "max" - "logxor" "pathname-name" "function" "realp" "eql" "logand" "short-site-name" "prog1" - "user-homedir-pathname" "list-all-packages" "exp" "cadar" "read-char-no-hang" - "package-error-package" "stream-external-format" "bit-andc2" "nsubstitute-if" "mapcar" - "complement" "load-logical-pathname-translations" "pprint-newline" "oddp" "caaar" - "destructuring-bind" "copy-alist" "acos" "go" "bit-nor" "defconstant" "fceiling" "tenth" - "nreverse" "=" "nunion" "slot-boundp" "string>" "count-if" "atom" "char=" "random-state-p" - "row-major-aref" "bit-andc1" "translate-pathname" "simple-vector-p" "coerce" "substitute-if-not" - "zerop" "invalid-method-error" "compile" "realpart" "remove-if-not" "pprint-tab" - "hash-table-rehash-threshold" "invoke-restart" "if" "count" "/=" "do" "initialize-instance" - "abs" "schar" "simple-condition-format-control" "delete-package" "subst-if" "lambda" - "hash-table-count" "array-has-fill-pointer-p" "bit" "with-standard-io-syntax" "parse-namestring" - "proclaim" "array-in-bounds-p" "multiple-value-call" "rplacd" "some" "graphic-char-p" - "read-from-string" "consp" "cadaar" "acons" "every" "make-pathname" "mask-field" "case" - "set-macro-character" "bit-and" "restart-bind" "echo-stream-input-stream" "compile-file" - "fill-pointer" "numberp" "acosh" "array-dimensions" "documentation" "minusp" "inspect" - "copy-structure" "integer-length" "ensure-generic-function" "char>=" "quote" "lognor" - "make-two-way-stream" "ignore-errors" "tailp" "with-slots" "fboundp" - "logical-pathname-translations" "equal" "float-sign" "shadow" "sleep" "numerator" "prog2" "getf" - "ldb-test" "round" "locally" "echo-stream-output-stream" "log" "get-macro-character" - "alphanumericp" "find-method" "nintersection" "defclass" "define-condition" - "print-unreadable-object" "defvar" "broadcast-stream-streams" "floatp" "subst-if-not" "integerp" - "translate-logical-pathname" "subsetp" "when" "write-string" "with-open-file" "clrhash" - "apropos" "intern" "min" "string-greaterp" "import" "nset-difference" "prog" "incf" - "both-case-p" "multiple-value-prog1" "characterp" "streamp" "digit-char-p" "random" - "string-lessp" "make-string-input-stream" "copy-symbol" "read-sequence" "logcount" "bit-not" - "boundp" "encode-universal-time" "third" "declaim" "map" "cons" "set-syntax-from-char" "and" - "cis" "symbol-plist" "loop-finish" "standard-char-p" "multiple-value-bind" "asin" "string" "pop" - "complex" "fdefinition" "psetf" "type-error-datum" "output-stream-p" "floor" "write-line" "<=" - "defmacro" "rational" "hash-table-test" "with-open-stream" "read-char" "string-capitalize" - "get-properties" "y-or-n-p" "use-package" "remove" "compiler-macro-function" "read" - "package-nicknames" "remove-duplicates" "make-load-form-saving-slots" "dribble" - "define-modify-macro" "make-dispatch-macro-character" "close" "cosh" "open" "finish-output" - "string-downcase" "car" "nstring-capitalize" "software-type" "read-preserving-whitespace" "cadr" - "fround" "nsublis" "defsetf" "find-all-symbols" "char>" "no-applicable-method" - "compute-restarts" "pathname" "bit-orc2" "write-sequence" "pprint-tabular" "symbol-value" - "char-name" "get-decoded-time" "formatter" "bit-vector-p" "intersection" "pathname-type" - "clear-input" "call-method" "princ-to-string" "symbolp" "make-load-form" "nsubst" - "pprint-dispatch" "handler-case" "method-combination-error" "probe-file" "atan" "string<" - "type-error-expected-type" "pushnew" "unread-char" "print" "or" "with-hash-table-iterator" - "make-sequence" "ecase" "unwind-protect" "require" "sixth" "get-dispatch-macro-character" - "char-not-lessp" "read-byte" "tagbody" "file-error-pathname" "catch" "rationalp" "char-downcase" - "char-int" "array-rank" "cond" "last" "make-string-output-stream" "array-dimension" - "host-namestring" "input-stream-p" "decode-universal-time" "defun" "eval-when" "char-code" - "pathname-directory" "evenp" "subseq" "pprint" "ftruncate" "make-instance" "pathname-host" - "logbitp" "remf" "1+" "copy-pprint-dispatch" "char-upcase" "error" "read-line" "second" - "make-package" "directory" "special-operator-p" "open-stream-p" "rassoc-if-not" "ccase" "equalp" - "substitute-if" "*" "char/=" "cdr" "sqrt" "lcm" "logical-pathname" "eval" - "define-compiler-macro" "nsubstitute-if-not" "mapcon" "imagpart" "set-exclusive-or" - "simple-condition-format-arguments" "expt" "concatenate" "file-position" "macrolet" "keywordp" - "hash-table-rehash-size" "+" "eighth" "use-value" "char-equal" "bit-xor" "format" "byte" - "dotimes" "namestring" "char-not-equal" "multiple-value-list" "assert" "append" "notany" "typep" - "delete-file" "makunbound" "cdaar" "file-write-date" ">" "cdddr" "write-to-string" "funcall" - "member-if-not" "deftype" "readtable-case" "with-accessors" "truename" "constantp" "rassoc-if" - "caaadr" "tree-equal" "nset-exclusive-or" "nsubstitute" "make-instances-obsolete" - "package-use-list" "invoke-debugger" "provide" "count-if-not" "trace" "logandc1" "nthcdr" - "char<=" "functionp" "with-simple-restart" "set-dispatch-macro-character" "logorc2" "unexport" - "rest" "unbound-slot-instance" "make-hash-table" "hash-table-p" "reinitialize-instance" "nth" - "do-symbols" "nreconc" "macroexpand" "store-value" "float-precision" "remprop" "nth-value" - "define-symbol-macro" "update-instance-for-redefined-class" "identity" "progv" "progn" - "return-from" "readtablep" "rem" "symbol-name" "psetq" "wild-pathname-p" "char" "list*" "char<" - "plusp" "pairlis" "cddar" "pprint-indent" "union" "compiled-function-p" "rotatef" "abort" - "machine-type" "concatenated-stream-streams" "string-right-trim" "enough-namestring" - "arithmetic-error-operands" "ceiling" "dolist" "delete" "make-condition" "string-left-trim" - "integer-decode-float" "check-type" "notevery" "function-lambda-expression" "-" - "multiple-value-setq" "name-char" "push" "pprint-pop" "compile-file-pathname" "list-length" - "nstring-upcase" "eq" "find-if" "method-qualifiers" "caadr" "cddr" "string=" "let*" - "remove-method" "pathname-match-p" "find-package" "truncate" "caaddr" "get-setf-expansion" - "loop" "define-setf-expander" "caddr" "package-shadowing-symbols" "force-output" - "slot-makunbound" "string-not-greaterp" "cdadar" "cdaadr" "logandc2" "make-array" - "merge-pathnames" "sin" "1-" "machine-version" "ffloor" "packagep" "set-pprint-dispatch" "flet" - "gensym" "pprint-exit-if-list-exhausted" "cos" "get" "mapl" "delete-if" - "with-condition-restarts" "atanh" "copy-list" "fill" "char-not-greaterp" "bit-orc1" "mod" - "package-used-by-list" "warn" "add-method" "simple-string-p" "find-restart" "describe" - "pathname-version" "peek-char" "yes-or-no-p" "complexp" "aref" "not" "position-if" "string>=" - "defstruct" "float-radix" "ninth" "caadar" "subtypep" "set" "butlast" "allocate-instance" - "with-input-from-string" "assoc" "write" "make-random-state" "bit-eqv" "float-digits" - "long-site-name" "with-compilation-unit" "delete-duplicates" "make-symbol" "room" "cdar" - "pprint-fill" "defgeneric" "macroexpand-1" "scale-float" "cdaaar" - "update-instance-for-different-class" "array-row-major-index" "ed" "file-string-length" - "ensure-directories-exist" "copy-readtable" "string<=" "seventh" "with-output-to-string" - "signum" "elt" "untrace" "null" "defparameter" "block" "prin1" "revappend" "gentemp" "ctypecase" - "ash" "sxhash" "listp" "do-external-symbols" "bit-ior" "etypecase" "sort" "change-class" - "find-class" "alpha-char-p" "map-into" "terpri" "do-all-symbols" "ldb" "logorc1" "search" - "fmakunbound" "load" "character" "string-not-equal" "pathnamep" "make-broadcast-stream" "arrayp" - "mapcan" "cerror" "invoke-restart-interactively" "assoc-if-not" "with-package-iterator" - "get-internal-run-time" "read-delimited-list" "unless" "lower-case-p" "restart-name" "/" "boole" - "defmethod" "float" "software-version" "vector-pop" "vector-push-extend" "caar" "ldiff" "member" - "find-symbol" "reduce" "svref" "describe-object" "logior" "string-equal" "type-of" "position" - "cddadr" "pathname-device" "get-output-stream-string" "symbol-package" "tan" - "compute-applicable-methods" "cddddr" "nsubst-if-not" "sublis" "set-difference" - "two-way-stream-input-stream" "adjustable-array-p" "machine-instance" "signal" "conjugate" - "caaaar" "endp" "lisp-implementation-version" "cddaar" "package-name" "adjust-array" "bit-nand" - "gethash" "in-package" "symbol-function" "make-concatenated-stream" "defpackage" "class-of" - "no-next-method" "logeqv" "deposit-field" "disassemble" "unuse-package" "copy-tree" "find" - "asinh" "class-name" "rename-file" "values" "print-not-readable-object" "mismatch" "cadadr" - "shadowing-import" "delete-if-not" "maplist" "listen" "return" "stream-element-type" "unintern" - "merge" "make-synonym-stream" "prin1-to-string" "nsubst-if" "byte-position" "phase" - "muffle-warning" "remhash" "continue" "load-time-value" "hash-table-size" - "upgraded-complex-part-type" "char-lessp" "sbit" "upgraded-array-element-type" "file-length" - "typecase" "cadddr" "first" "rationalize" "logtest" "find-if-not" "dpb" "mapc" "sinh" - "char-greaterp" "shiftf" "denominator" "get-universal-time" "nconc" "setf" "lognand" - "rename-package" "pprint-logical-block" "break" "symbol-macrolet" "the" "fresh-line" - "clear-output" "assoc-if" "string/=" "princ" "directory-namestring" "stream-error-stream" - "array-element-type" "setq" "copy-seq" "time" "restart-case" "prog*" "shared-initialize" - "array-total-size" "simple-bit-vector-p" "define-method-combination" "write-byte" "constantly" - "caddar" "print-object" "vector" "throw" "reverse" ">=" "upper-case-p" "nbutlast") - ) - -(list_lit - . - (sym_lit) @operator - (#match? @operator "^([+*-+=<>]|<=|>=|/=)$")) - -((sym_lit) @string.special.symbol - (#lua-match? @string.special.symbol "^[&]")) - -[ - (array_dimension) - "#0A" - "#0a" -] @number - -(char_lit) @character diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/injections.scm deleted file mode 100644 index dc89820..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (comment) - (block_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/locals.scm deleted file mode 100644 index 98036d3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/commonlisp/locals.scm +++ /dev/null @@ -1,109 +0,0 @@ -(defun_header - function_name: (sym_lit) @local.definition.function - (#set! definition.function.scope "parent")) - -(defun_header - lambda_list: (list_lit - (sym_lit) @local.definition.parameter)) - -(defun_header - keyword: (defun_keyword - "defmethod") - lambda_list: (list_lit - (list_lit - . - (sym_lit) - . - (sym_lit) @local.definition.type))) - -(defun_header - lambda_list: (list_lit - (list_lit - . - (sym_lit) @local.definition.parameter - . - (_)))) - -(sym_lit) @local.reference - -(defun) @local.scope - -((list_lit - . - (sym_lit) @_defvar - . - (sym_lit) @local.definition.var) - (#match? @_defvar "^(cl:)?(defvar|defparameter)$")) - -(list_lit - . - (sym_lit) @_deftest - . - (sym_lit) @local.definition.function - (#eq? @_deftest "deftest")) @local.scope - -(list_lit - . - (sym_lit) @_deftest - . - (sym_lit) @local.definition.function - (#eq? @_deftest "deftest")) @local.scope - -(for_clause - . - (sym_lit) @local.definition.var) - -(with_clause - . - (sym_lit) @local.definition.var) - -(loop_macro) @local.scope - -(list_lit - . - (sym_lit) @_let - (#match? @_let "(cl:|cffi:)?(with-accessors|with-foreign-objects|let[*]?)") - . - (list_lit - (list_lit - . - (sym_lit) @local.definition.var))) @local.scope - -(list_lit - . - (sym_lit) @_let - (#match? @_let "(cl:|alexandria:)?(with-gensyms|dotimes|with-foreign-object)") - . - (list_lit - . - (sym_lit) @local.definition.var)) @local.scope - -(list_lit - . - (kwd_lit) @_import_from - (#eq? @_import_from ":import-from") - . - (_) - (kwd_lit - (kwd_symbol) @local.definition.import)) - -(list_lit - . - (kwd_lit) @_import_from - (#eq? @_import_from ":import-from") - . - (_) - (sym_lit) @local.definition.import) - -(list_lit - . - (kwd_lit) @_use - (#eq? @_use ":use") - (kwd_lit - (kwd_symbol) @local.definition.import)) - -(list_lit - . - (kwd_lit) @_use - (#eq? @_use ":use") - (sym_lit) @local.definition.import) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cooklang/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cooklang/highlights.scm deleted file mode 100644 index 4ac3918..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cooklang/highlights.scm +++ /dev/null @@ -1,31 +0,0 @@ -(metadata) @comment - -(comment) @comment @spell - -[ - "{" - "}" -] @punctuation.bracket - -"%" @punctuation.special - -(ingredient - "@" @punctuation.delimiter - (name)? @string.special.symbol - (amount - (quantity)? @number - (units)? @constant)?) - -(timer - "~" @punctuation.delimiter - (name)? @string.special.symbol - (amount - (quantity)? @number - (units)? @constant)?) - -(cookware - "#" @punctuation.delimiter - (name)? @string.special.symbol - (amount - (quantity)? @number - (units)? @constant)?) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cooklang/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cooklang/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cooklang/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/folds.scm deleted file mode 100644 index 2ce5ddb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (object) - (array) - (assign_block) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/highlights.scm deleted file mode 100644 index 8f394ed..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/highlights.scm +++ /dev/null @@ -1,37 +0,0 @@ -[ - "let" - "in" -] @keyword - -[ - "{" - "}" - "[" - "]" -] @punctuation.bracket - -"." @punctuation.delimiter - -[ - ".." - "=" -] @operator - -(input) @constant - -(null) @constant.builtin - -(comment) @comment @spell - -(string) @string - -(integer) @number - -(float) @number.float - -(float - "." @number.float) - -(boolean) @boolean - -(path_seg) @property diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/indents.scm deleted file mode 100644 index f1f5e04..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/indents.scm +++ /dev/null @@ -1,24 +0,0 @@ -[ - (assign_block - "{") - (object) - (array) -] @indent.begin - -(assign_block - "}" @indent.branch) - -(assign_block - "}" @indent.end) - -(object - "}" @indent.branch) - -(object - "}" @indent.end) - -(array - "]" @indent.branch) - -(array - "]" @indent.end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/locals.scm deleted file mode 100644 index 7e78c4d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/corn/locals.scm +++ /dev/null @@ -1,13 +0,0 @@ -; scopes -[ - (object) - (array) -] @local.scope - -; definitions -(assign_block - (assignment - (input) @local.definition.constant)) - -(value - (input) @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/folds.scm deleted file mode 100644 index 02feec4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (meta_map) - (map) - (array) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/highlights.scm deleted file mode 100644 index 9cc438e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/highlights.scm +++ /dev/null @@ -1,54 +0,0 @@ -; Literals -(string) @string - -(escape_sequence) @string.escape - -(hex_blob - "x" @character.special - (_) @string) - -(esc_blob - "b" @character.special - (_) @string) - -(datetime - "d" @character.special - (_) @string.special) - -(_ - key: (_) @property) - -(number) @number - -(float) @number.float - -(boolean) @boolean - -(null) @constant.builtin - -; Punctuation -[ - "," - ":" -] @punctuation.delimiter - -[ - "{" - "}" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - "<" - ">" -] @punctuation.bracket - -("\"" @string - (#set! conceal "")) - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/indents.scm deleted file mode 100644 index 8ec2ff5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/indents.scm +++ /dev/null @@ -1,17 +0,0 @@ -[ - (meta_map) - (map) - (imap) - (array) -] @indent.begin - -[ - "]" - "}" - ">" -] @indent.end @indent.branch - -[ - (ERROR) - (comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/locals.scm deleted file mode 100644 index 2a4ba47..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpon/locals.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (document) - (meta_map) - (map) - (array) -] @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/folds.scm deleted file mode 100644 index f5f5664..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/folds.scm +++ /dev/null @@ -1,14 +0,0 @@ -; inherits: c - -[ - (for_range_loop) - (class_specifier) - (field_declaration - type: (enum_specifier) - default_value: (initializer_list)) - (template_declaration) - (namespace_definition) - (try_statement) - (catch_clause) - (lambda_expression) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/highlights.scm deleted file mode 100644 index 85ff2dc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/highlights.scm +++ /dev/null @@ -1,268 +0,0 @@ -; inherits: c - -((identifier) @variable.member - (#lua-match? @variable.member "^m_.*$")) - -(parameter_declaration - declarator: (reference_declarator) @variable.parameter) - -; function(Foo ...foo) -(variadic_parameter_declaration - declarator: (variadic_declarator - (_) @variable.parameter)) - -; int foo = 0 -(optional_parameter_declaration - declarator: (_) @variable.parameter) - -;(field_expression) @variable.parameter ;; How to highlight this? -((field_expression - (field_identifier) @function.method) @_parent - (#has-parent? @_parent template_method function_declarator)) - -(field_declaration - (field_identifier) @variable.member) - -(field_initializer - (field_identifier) @property) - -(function_declarator - declarator: (field_identifier) @function.method) - -(concept_definition - name: (identifier) @type.definition) - -(alias_declaration - name: (type_identifier) @type.definition) - -(auto) @type.builtin - -(namespace_identifier) @module - -((namespace_identifier) @type - (#lua-match? @type "^[%u]")) - -(case_statement - value: (qualified_identifier - (identifier) @constant)) - -(using_declaration - . - "using" - . - "namespace" - . - [ - (qualified_identifier) - (identifier) - ] @module) - -(destructor_name - (identifier) @function.method) - -; functions -(function_declarator - (qualified_identifier - (identifier) @function)) - -(function_declarator - (qualified_identifier - (qualified_identifier - (identifier) @function))) - -(function_declarator - (qualified_identifier - (qualified_identifier - (qualified_identifier - (identifier) @function)))) - -((qualified_identifier - (qualified_identifier - (qualified_identifier - (qualified_identifier - (identifier) @function)))) @_parent - (#has-ancestor? @_parent function_declarator)) - -(function_declarator - (template_function - (identifier) @function)) - -(operator_name) @function - -"operator" @function - -"static_assert" @function.builtin - -(call_expression - (qualified_identifier - (identifier) @function.call)) - -(call_expression - (qualified_identifier - (qualified_identifier - (identifier) @function.call))) - -(call_expression - (qualified_identifier - (qualified_identifier - (qualified_identifier - (identifier) @function.call)))) - -((qualified_identifier - (qualified_identifier - (qualified_identifier - (qualified_identifier - (identifier) @function.call)))) @_parent - (#has-ancestor? @_parent call_expression)) - -(call_expression - (template_function - (identifier) @function.call)) - -(call_expression - (qualified_identifier - (template_function - (identifier) @function.call))) - -(call_expression - (qualified_identifier - (qualified_identifier - (template_function - (identifier) @function.call)))) - -(call_expression - (qualified_identifier - (qualified_identifier - (qualified_identifier - (template_function - (identifier) @function.call))))) - -((qualified_identifier - (qualified_identifier - (qualified_identifier - (qualified_identifier - (template_function - (identifier) @function.call))))) @_parent - (#has-ancestor? @_parent call_expression)) - -; methods -(function_declarator - (template_method - (field_identifier) @function.method)) - -(call_expression - (field_expression - (field_identifier) @function.method.call)) - -; constructors -((function_declarator - (qualified_identifier - (identifier) @constructor)) - (#lua-match? @constructor "^%u")) - -((call_expression - function: (identifier) @constructor) - (#lua-match? @constructor "^%u")) - -((call_expression - function: (qualified_identifier - name: (identifier) @constructor)) - (#lua-match? @constructor "^%u")) - -((call_expression - function: (field_expression - field: (field_identifier) @constructor)) - (#lua-match? @constructor "^%u")) - -; constructing a type in an initializer list: Constructor (): **SuperType (1)** -((field_initializer - (field_identifier) @constructor - (argument_list)) - (#lua-match? @constructor "^%u")) - -; Constants -(this) @variable.builtin - -(null - "nullptr" @constant.builtin) - -(true) @boolean - -(false) @boolean - -; Literals -(raw_string_literal) @string - -; Keywords -[ - "try" - "catch" - "noexcept" - "throw" -] @keyword.exception - -[ - "decltype" - "explicit" - "friend" - "override" - "using" - "requires" - "constexpr" -] @keyword - -[ - "class" - "namespace" - "template" - "typename" - "concept" -] @keyword.type - -[ - "co_await" - "co_yield" - "co_return" -] @keyword.coroutine - -[ - "public" - "private" - "protected" - "final" - "virtual" -] @keyword.modifier - -[ - "new" - "delete" - "xor" - "bitand" - "bitor" - "compl" - "not" - "xor_eq" - "and_eq" - "or_eq" - "not_eq" - "and" - "or" -] @keyword.operator - -"<=>" @operator - -"::" @punctuation.delimiter - -(template_argument_list - [ - "<" - ">" - ] @punctuation.bracket) - -(template_parameter_list - [ - "<" - ">" - ] @punctuation.bracket) - -(literal_suffix) @operator diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/indents.scm deleted file mode 100644 index 0782d22..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/indents.scm +++ /dev/null @@ -1,8 +0,0 @@ -; inherits: c - -(condition_clause) @indent.begin - -((field_initializer_list) @indent.begin - (#set! indent.start_at_same_line 1)) - -(access_specifier) @indent.branch diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/injections.scm deleted file mode 100644 index 6e16572..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cpp/injections.scm +++ /dev/null @@ -1,13 +0,0 @@ -((preproc_arg) @injection.content - (#set! injection.language "cpp")) - -((comment) @injection.content - (#set! injection.language "comment")) - -((comment) @injection.content - (#lua-match? @injection.content "/[*\/][!*\/] -(type_parameter_declaration - (type_identifier) @local.definition.type) - -(template_declaration) @local.scope - -; Namespaces -(namespace_definition - name: (namespace_identifier) @local.definition.namespace - body: (_) @local.scope) - -(namespace_definition - name: (nested_namespace_specifier) @local.definition.namespace - body: (_) @local.scope) - -((namespace_identifier) @local.reference - (#set! reference.kind "namespace")) - -; Function definitions -(template_function - name: (identifier) @local.definition.function) @local.scope - -(template_method - name: (field_identifier) @local.definition.method) @local.scope - -(function_declarator - declarator: (qualified_identifier - name: (identifier) @local.definition.function)) @local.scope - -(field_declaration - declarator: (function_declarator - (field_identifier) @local.definition.method)) - -(lambda_expression) @local.scope - -; Control structures -(try_statement - body: (_) @local.scope) - -(catch_clause) @local.scope - -(requires_expression) @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/folds.scm deleted file mode 100644 index 60d69a9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/folds.scm +++ /dev/null @@ -1,10 +0,0 @@ -[ - ; top-level block statements from https://github.com/tree-sitter/tree-sitter-css/blob/master/grammar.js - ; note: (block) is not used due to unideal behavior when node before block node spans multiple lines - (rule_set) - (at_rule) - (supports_statement) - (media_statement) - (keyframe_block) - (import_statement)+ -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/highlights.scm deleted file mode 100644 index 49471fd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/highlights.scm +++ /dev/null @@ -1,109 +0,0 @@ -[ - "@media" - "@charset" - "@namespace" - "@supports" - "@keyframes" - (at_keyword) -] @keyword.directive - -"@import" @keyword.import - -[ - (to) - (from) -] @keyword - -(comment) @comment @spell - -(tag_name) @tag - -(class_name) @type - -(id_name) @constant - -[ - (property_name) - (feature_name) -] @property - -[ - (nesting_selector) - (universal_selector) -] @character.special - -(function_name) @function - -[ - "~" - ">" - "+" - "-" - "*" - "/" - "=" - "^=" - "|=" - "~=" - "$=" - "*=" -] @operator - -[ - "and" - "or" - "not" - "only" -] @keyword.operator - -(important) @keyword.modifier - -(attribute_selector - (plain_value) @string) - -(pseudo_element_selector - "::" - (tag_name) @attribute) - -(pseudo_class_selector - (class_name) @attribute) - -(attribute_name) @tag.attribute - -(namespace_name) @module - -(keyframes_name) @variable - -((property_name) @variable - (#lua-match? @variable "^[-][-]")) - -((plain_value) @variable - (#lua-match? @variable "^[-][-]")) - -[ - (string_value) - (color_value) - (unit) -] @string - -(integer_value) @number - -(float_value) @number.float - -[ - "#" - "," - "." - ":" - "::" - ";" -] @punctuation.delimiter - -[ - "{" - ")" - "(" - "}" - "[" - "]" -] @punctuation.bracket diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/indents.scm deleted file mode 100644 index 75e4a63..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/indents.scm +++ /dev/null @@ -1,11 +0,0 @@ -[ - (block) - (declaration) -] @indent.begin - -(block - "}" @indent.branch) - -"}" @indent.dedent - -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/css/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/csv/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/csv/highlights.scm deleted file mode 100644 index de2213a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/csv/highlights.scm +++ /dev/null @@ -1,3 +0,0 @@ -; inherits: tsv - -"," @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/folds.scm deleted file mode 100644 index b617fdc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/folds.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: cpp diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/highlights.scm deleted file mode 100644 index 6605c5a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/highlights.scm +++ /dev/null @@ -1,17 +0,0 @@ -; inherits: cpp - -[ - "<<<" - ">>>" -] @punctuation.bracket - -[ - "__host__" - "__device__" - "__global__" - "__managed__" - "__forceinline__" - "__noinline__" -] @keyword.modifier - -"__launch_bounds__" @keyword.modifier diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/indents.scm deleted file mode 100644 index b617fdc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/indents.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: cpp diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/injections.scm deleted file mode 100644 index 0259958..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -((preproc_arg) @injection.content - (#set! injection.language "cuda")) - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/locals.scm deleted file mode 100644 index b617fdc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cuda/locals.scm +++ /dev/null @@ -1 +0,0 @@ -; inherits: cpp diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/folds.scm deleted file mode 100644 index 934b59e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (import_spec_list) - (field) - (string) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/highlights.scm deleted file mode 100644 index 27d4dad..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/highlights.scm +++ /dev/null @@ -1,164 +0,0 @@ -; Includes -[ - "package" - "import" -] @keyword.import - -; Namespaces -(package_identifier) @module - -(import_spec - [ - "." - "_" - ] @punctuation.special) - -[ - (attr_path) - (package_path) -] @string.special.url ; In attributes - -; Attributes -(attribute) @attribute - -; Conditionals -"if" @keyword.conditional - -; Repeats -"for" @keyword.repeat - -(for_clause - "_" @punctuation.special) - -; Keywords -"let" @keyword - -"in" @keyword.operator - -; Operators -[ - "+" - "-" - "*" - "/" - "|" - "&" - "||" - "&&" - "==" - "!=" - "<" - "<=" - ">" - ">=" - "=~" - "!~" - "!" - "=" -] @operator - -; Fields & Properties -(field - (label - (identifier) @variable.member)) - -(selector_expression - (_) - (identifier) @property) - -; Functions -(call_expression - function: (identifier) @function.call) - -(call_expression - function: (selector_expression - (_) - (identifier) @function.call)) - -(call_expression - function: (builtin_function) @function.call) - -(builtin_function) @function.builtin - -; Variables -(identifier) @variable - -; Types -(primitive_type) @type.builtin - -((identifier) @type - (#lua-match? @type "^_?#")) - -[ - (slice_type) - (pointer_type) -] @type ; In attributes - -; Punctuation -[ - "," - ":" -] @punctuation.delimiter - -[ - "{" - "}" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - "(" - ")" -] @punctuation.bracket - -[ - "<" - ">" -] @punctuation.bracket - -[ - (ellipsis) - "?" -] @punctuation.special - -; Literals -(string) @string - -[ - (escape_char) - (escape_unicode) -] @string.escape - -(number) @number - -(float) @number.float - -(si_unit - (float) - (_) @string.special.symbol) - -(boolean) @boolean - -[ - (null) - (top) - (bottom) -] @constant.builtin - -; Interpolations -(interpolation - "\\(" @punctuation.special - (_) - ")" @punctuation.special) @none - -(interpolation - "\\(" - (identifier) @variable - ")") - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/indents.scm deleted file mode 100644 index cef2345..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/indents.scm +++ /dev/null @@ -1,30 +0,0 @@ -[ - (import_spec_list) - (field) -] @indent.begin - -[ - "}" - "]" - ")" -] @indent.end - -[ - "{" - "}" -] @indent.branch - -[ - "[" - "]" -] @indent.branch - -[ - "(" - ")" -] @indent.branch - -[ - (ERROR) - (comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/locals.scm deleted file mode 100644 index b2a8972..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cue/locals.scm +++ /dev/null @@ -1,31 +0,0 @@ -; Scopes -[ - (source_file) - (field) - (for_clause) -] @local.scope - -; References -(identifier) @local.reference - -; Definitions -(import_spec - path: (string) @local.definition.import) - -(field - (label - (identifier) @local.definition.field)) - -(package_identifier) @local.definition.namespace - -(for_clause - (identifier) @local.definition.var - (expression)) - -(for_clause - (identifier) - (identifier) @local.definition.var - (expression)) - -(let_clause - (identifier) @local.definition.var) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/folds.scm deleted file mode 100644 index c8bd407..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/folds.scm +++ /dev/null @@ -1,10 +0,0 @@ -[ - (multiline_string) - (multiline_graph_string) - (top_section) - (sub_section_1) - (sub_section_2) - (runtime_section) - (task_section) - (graph_section) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/highlights.scm deleted file mode 100644 index a744caa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/highlights.scm +++ /dev/null @@ -1,72 +0,0 @@ -(comment) @comment @spell - -(key) @property - -(boolean) @boolean - -(datetime) @string.special - -(task_name) @function - -(include_directive) @keyword.import - -[ - (section_name) - (namespace) -] @markup.heading - -[ - (integer) - (recurrence) -] @number - -[ - "[" - "]" - "[[" - "]]" - "[[[" - "]]]" - "<" - ">" - (graph_parenthesis) -] @punctuation.bracket - -[ - "\"" - "\"\"\"" - (unquoted_string) - (quoted_string) - (multiline_string) -] @string - -[ - (xtrigger_annotation) - (suicide_annotation) -] @attribute - -[ - "=" - (assignment_operator) - (graph_logical) - (graph_arrow) -] @operator - -(include_statement - path: (_)? @string.special.path) - -(task_parameter - name: (_)? @variable.parameter - selection: (_)? @variable.parameter) - -(task_output - ":" @tag - (nametag) @variable.builtin - "?"? @tag) - -[ - (jinja2_expression) - (jinja2_statement) - (jinja2_comment) - (jinja2_shebang) -] @keyword.directive diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/indents.scm deleted file mode 100644 index 0457e45..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/indents.scm +++ /dev/null @@ -1,16 +0,0 @@ -[ - (top_section) - (sub_section_1) - (sub_section_2) - (graph_section) - (runtime_section) - (task_section) -] @indent.begin - -(multiline_string - quotes_close: _ @indent.end) @indent.begin - -(multiline_graph_string - quotes_close: _ @indent.end) @indent.begin - -(line_continuation) @indent.zero diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/injections.scm deleted file mode 100644 index 41becd6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/cylc/injections.scm +++ /dev/null @@ -1,11 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -; https://cylc.github.io/cylc-doc/latest/html/user-guide/task-implementation/job-scripts.html#jobscripts -((setting - key: (key) @_key - (#any-of? @_key - "script" "init-script" "env-script" "pre-script" "post-script" "err-script" "exit-script") - value: (_ - (string_content) @injection.content)) - (#set! injection.language "bash")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/folds.scm deleted file mode 100644 index 49d6256..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/folds.scm +++ /dev/null @@ -1,4 +0,0 @@ -[ - (block_statement) - (aggregate_body) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/highlights.scm deleted file mode 100644 index 11d08a1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/highlights.scm +++ /dev/null @@ -1,374 +0,0 @@ -; Keywords -[ - (directive) - (shebang) -] @keyword.directive - -[ - (import) - (module) -] @keyword.import - -[ - (alias) - (asm) - (class) - (delegate) - (delete) - (enum) - (interface) - (invariant) - (mixin) - (pragma) - (struct) - (template) - (union) - (unittest) - (version) - (with) - (traits) - (vector) - (parameters_) - (default) - (goto) -] @keyword - -(function) @keyword.function - -(synchronized) @keyword.coroutine - -[ - (if) - (else) - (switch) - (case) - (break) -] @keyword.conditional - -[ - (do) - (for) - (foreach) - (foreach_reverse) - (while) - (continue) -] @keyword.repeat - -(return) @keyword.return - -[ - (abstract) - (deprecated) - (private) - (protected) - (public) - (package) - (immutable) - (final) - (const) - (override) - (static) -] @keyword.modifier - -[ - (assert) - (try) - (catch) - (finally) - (throw) - (nothrow) -] @keyword.exception - -[ - (cast) - (new) - (in) - (is) - (not_in) - (not_is) - (typeid) - (typeof) -] @keyword.operator - -[ - (lazy) - (align) - (extern) - (scope) - (ref) - (pure) - (export) - (shared) - (gshared) - (out) - (inout) -] @keyword.modifier - -(parameter_attribute - (return) @keyword.modifier) - -(parameter_attribute - (in) @keyword.modifier) - -(parameter_attribute - (out) @keyword.modifier) - -(debug) @keyword.debug - -; Operators -[ - "/=" - "/" - ".." - "&" - "&=" - "&&" - "|" - "|=" - "||" - "-" - "-=" - "--" - "+" - "+=" - "++" - "<" - "<=" - "<<" - "<<=" - ">" - ">=" - ">>=" - ">>>=" - ">>" - ">>>" - "!" - "!=" - "$" - "=" - "==" - "*" - "*=" - "%" - "%=" - "^" - "^=" - "^^" - "^^=" - "~" - "~=" - "@" -] @operator - -; Variables -(identifier) @variable - -[ - "exit" - "success" - "failure" - (this) - (super) -] @variable.builtin - -(linkage_attribute - "(" - _ @variable.builtin - ")") - -; Modules -(module_fqn - (identifier) @module) - -; Attributes -(at_attribute - (identifier) @attribute) - -; Constants -(enum_member - (identifier) @constant) - -(manifest_declarator - . - (identifier) @constant) - -; Members -(aggregate_body - (variable_declaration - (declarator - (identifier) @variable.member))) - -(property_expression - "." - (identifier) @variable.member) - -(type - "." - (identifier) @variable.member) - -; Types -(class_declaration - (class) - . - (identifier) @type) - -(struct_declaration - (struct) - . - (identifier) @type) - -(union_declaration - (union) - . - (identifier) @type) - -(enum_declaration - (enum) - . - (identifier) @type) - -(alias_declaration - (alias) - . - (identifier) @type) - -((identifier) @type - (#lua-match? @type "^[A-Z].*")) - -(type - . - (identifier) @type .) - -[ - (auto) - (void) - (bool) - (byte) - (ubyte) - (char) - (short) - (ushort) - (wchar) - (dchar) - (int) - (uint) - (long) - (ulong) - (real) - (double) - (float) - (cent) - (ucent) - (ireal) - (idouble) - (ifloat) - (creal) - (double) - (cfloat) -] @type.builtin - -; Functions -(function_declaration - (identifier) @function) - -(call_expression - (identifier) @function) - -(call_expression - (type - (identifier) @function .)) - -(call_expression - (property_expression - (call_expression) - (identifier) @function .)) - -; Parameters -(parameter - (_) - (identifier) @variable.parameter) - -(function_literal - "(" - (type - (identifier) @variable.parameter)) - -; Constructors -(constructor - (this) @constructor) - -(destructor - (this) @constructor) - -(postblit - . - (this) @constructor) - -; Punctuation -[ - ";" - "." - ":" - "," - "=>" -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -"..." @punctuation.special - -; Ternaries -(ternary_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) - -; Labels -(label - (identifier) @label) - -(goto_statement - (identifier) @label) - -; Literals -(string_literal) @string - -[ - (int_literal) - (float_literal) -] @number - -(char_literal) @character - -[ - (true) - (false) -] @boolean - -[ - (null) - (special_keyword) -] @constant.builtin - -; Comments -(comment) @comment @spell - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^///[^/]")) - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^///$")) - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$")) - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^/[+][+][^+].*[+]/$")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/indents.scm deleted file mode 100644 index c89b4e9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/indents.scm +++ /dev/null @@ -1,24 +0,0 @@ -[ - (parameters) - (template_parameters) - (expression_statement) - (aggregate_body) - (function_body) - (scope_statement) - (block_statement) - (case_statement) -] @indent.begin - -(comment) @indent.auto - -[ - (case) - (default) - "}" - "]" -] @indent.branch - -[ - (directive) - (shebang) -] @indent.zero diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/injections.scm deleted file mode 100644 index cfc1bf9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/injections.scm +++ /dev/null @@ -1,19 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((call_expression - (type) @_printf - (named_arguments - "(" - . - (named_argument - (expression - (string_literal) @injection.content)))) - (#eq? @_printf "printf") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.language "printf")) - -; TODO: uncomment when asm is added -; ((asm_inline) @injection.content -; (#set! injection.language "asm") -; (#set! injection.combined)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/locals.scm deleted file mode 100644 index 2cd7b9e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/d/locals.scm +++ /dev/null @@ -1,79 +0,0 @@ -; Scopes -[ - (source_file) - (block_statement) - (aggregate_body) -] @local.scope - -; References -(identifier) @local.reference - -; Definitions -(module_def - (module_declaration - (module_fqn) @local.definition.namespace) - (#set! definition.namespace.scope "global")) - -(enum_declaration - (enum_member - . - (identifier) @local.definition.enum)) - -(class_declaration - (class) - . - (identifier) @local.definition.type) - -(struct_declaration - (struct) - . - (identifier) @local.definition.type) - -(union_declaration - (union) - . - (identifier) @local.definition.type) - -(enum_declaration - (enum) - . - (identifier) @local.definition.type) - -(alias_declaration - (alias_initializer - . - (identifier) @local.definition.type)) - -(constructor - (this) @local.definition.method) - -(destructor - (this) @local.definition.method) - -(postblit - (this) @local.definition.method) - -(aggregate_body - (function_declaration - (identifier) @local.definition.method)) - -(manifest_declarator - . - (identifier) @local.definition.constant) - -(anonymous_enum_declaration - (enum_member - . - (identifier) @local.definition.constant)) - -(variable_declaration - (declarator - (identifier) @local.definition.var)) - -(aggregate_body - (variable_declaration - (declarator - (identifier) @local.definition.field))) - -(function_declaration - (identifier) @local.definition.function) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/folds.scm deleted file mode 100644 index fc75ac2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/folds.scm +++ /dev/null @@ -1,13 +0,0 @@ -[ - (class_definition) - (enum_declaration) - (extension_declaration) - (arguments) - (function_body) - (block) - (switch_block) - (list_literal) - (set_or_map_literal) - (string_literal) - (import_or_export)+ -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/highlights.scm deleted file mode 100644 index 072a10d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/highlights.scm +++ /dev/null @@ -1,303 +0,0 @@ -(identifier) @variable - -(dotted_identifier_list) @string - -; Methods -; -------------------- -; TODO: add method/call_expression to grammar and -; distinguish method call from variable access -(function_expression_body - (identifier) @function.call) - -; ((identifier)(selector (argument_part)) @function) -; NOTE: This query is a bit of a work around for the fact that the dart grammar doesn't -; specifically identify a node as a function call -(((identifier) @function.call - (#lua-match? @function.call "^_?[%l]")) - . - (selector - . - (argument_part))) @function.call - -; Annotations -; -------------------- -(annotation - "@" @attribute - name: (identifier) @attribute) - -; Operators and Tokens -; -------------------- -(template_substitution - "$" @punctuation.special - "{" @punctuation.special - "}" @punctuation.special) @none - -(template_substitution - "$" @punctuation.special - (identifier_dollar_escaped) @variable) @none - -(escape_sequence) @string.escape - -[ - "=>" - ".." - "??" - "==" - "!" - "?" - "&&" - "%" - "<" - ">" - "=" - ">=" - "<=" - "||" - ">>>=" - ">>=" - "<<=" - "&=" - "|=" - "??=" - "%=" - "+=" - "-=" - "*=" - "/=" - "^=" - "~/=" - (shift_operator) - (multiplicative_operator) - (increment_operator) - (is_operator) - (prefix_operator) - (equality_operator) - (additive_operator) -] @operator - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -; Delimiters -; -------------------- -[ - ";" - "." - "," - ":" - "?." - "?" -] @punctuation.delimiter - -; Types -; -------------------- -(class_definition - name: (identifier) @type) - -(constructor_signature - name: (identifier) @type) - -(scoped_identifier - scope: (identifier) @type) - -(function_signature - name: (identifier) @function.method) - -(getter_signature - (identifier) @function.method) - -(setter_signature - name: (identifier) @function.method) - -(enum_declaration - name: (identifier) @type) - -(enum_constant - name: (identifier) @type) - -(void_type) @type - -((scoped_identifier - scope: (identifier) @type - name: (identifier) @type) - (#lua-match? @type "^[%u%l]")) - -(type_identifier) @type - -(type_alias - (type_identifier) @type.definition) - -(type_arguments - [ - "<" - ">" - ] @punctuation.bracket) - -; Variables -; -------------------- -; var keyword -(inferred_type) @keyword - -((identifier) @type - (#lua-match? @type "^_?[%u].*[%l]")) ; catch Classes or IClasses not CLASSES - -"Function" @type - -; properties -(unconditional_assignable_selector - (identifier) @property) - -(conditional_assignable_selector - (identifier) @property) - -(this) @variable.builtin - -; Parameters -; -------------------- -(formal_parameter - (identifier) @variable.parameter) - -(named_argument - (label - (identifier) @variable.parameter)) - -; Literals -; -------------------- -[ - (hex_integer_literal) - (decimal_integer_literal) - (decimal_floating_point_literal) - ; TODO: inaccessible nodes - ; (octal_integer_literal) - ; (hex_floating_point_literal) -] @number - -(symbol_literal) @string.special.symbol - -(string_literal) @string - -(true) @boolean - -(false) @boolean - -(null_literal) @constant.builtin - -(comment) @comment @spell - -(documentation_comment) @comment.documentation @spell - -; Keywords -; -------------------- -[ - "import" - "library" - "export" - "as" - "show" - "hide" -] @keyword.import - -; Reserved words (cannot be used as identifiers) -[ - ; TODO: - ; "rethrow" cannot be targeted at all and seems to be an invisible node - ; TODO: - ; the assert keyword cannot be specifically targeted - ; because the grammar selects the whole node or the content - ; of the assertion not just the keyword - ; assert - (case_builtin) - "late" - "required" - "on" - "extends" - "in" - "is" - "new" - "super" - "with" -] @keyword - -[ - "class" - "enum" - "extension" -] @keyword.type - -"return" @keyword.return - -; Built in identifiers: -; alone these are marked as keywords -[ - "deferred" - "factory" - "get" - "implements" - "interface" - "library" - "operator" - "mixin" - "part" - "set" - "typedef" -] @keyword - -[ - "async" - "async*" - "sync*" - "await" - "yield" -] @keyword.coroutine - -[ - (const_builtin) - (final_builtin) - "abstract" - "covariant" - "external" - "static" - "final" - "base" - "sealed" -] @keyword.modifier - -; when used as an identifier: -((identifier) @variable.builtin - (#any-of? @variable.builtin - "abstract" "as" "covariant" "deferred" "dynamic" "export" "external" "factory" "Function" "get" - "implements" "import" "interface" "library" "operator" "mixin" "part" "set" "static" "typedef")) - -[ - "if" - "else" - "switch" - "default" -] @keyword.conditional - -(conditional_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) - -[ - "try" - "throw" - "catch" - "finally" - (break_statement) -] @keyword.exception - -[ - "do" - "while" - "continue" - "for" -] @keyword.repeat diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/indents.scm deleted file mode 100644 index 03d9464..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/indents.scm +++ /dev/null @@ -1,49 +0,0 @@ -[ - (class_body) - (function_body) - (function_expression_body) - (declaration - (initializers)) - (switch_block) - (formal_parameter_list) - (formal_parameter) - (list_literal) - (return_statement) - (arguments) - (try_statement) -] @indent.begin - -(switch_block - (_) @indent.begin - (#set! indent.immediate 1) - (#set! indent.start_at_same_line 1)) - -[ - (switch_statement_case) - (switch_statement_default) -] @indent.branch - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @indent.branch - -"}" @indent.end - -(return_statement - ";" @indent.end) - -(break_statement - ";" @indent.end) - -(comment) @indent.ignore - -; dedenting the else block is painfully slow; replace with simpler strategy -; (if_statement) @indent.begin -; (if_statement -; (block) @indent.branch) -(if_statement) @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/locals.scm deleted file mode 100644 index 3e3beb5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dart/locals.scm +++ /dev/null @@ -1,32 +0,0 @@ -; Definitions -(function_signature - name: (identifier) @local.definition.function) - -(formal_parameter - name: (identifier) @local.definition.parameter) - -(initialized_variable_definition - name: (identifier) @local.definition.var) - -(initialized_identifier - (identifier) @local.definition.var) - -(static_final_declaration - (identifier) @local.definition.var) - -; References -(identifier) @local.reference - -; Scopes -(class_definition - body: (_) @local.scope) - -[ - (block) - (if_statement) - (for_statement) - (while_statement) - (try_statement) - (catch_clause) - (finally_clause) -] @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/folds.scm deleted file mode 100644 index 624ca8a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(group) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/highlights.scm deleted file mode 100644 index 7a5ebf2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/highlights.scm +++ /dev/null @@ -1,94 +0,0 @@ -(comment) @comment @spell - -(group_name) @markup.heading - -(entry - key: (identifier) @property) - -(localized_key - name: (identifier) @property) - -[ - (language) - (country) - (encoding) - (modifier) -] @string.special - -(string) @string - -(escape_sequence) @string.escape - -(field_code) @character.special - -[ - (true) - (false) -] @boolean - -"=" @operator - -[ - ";" - "_" - "." - "@" -] @punctuation.delimiter - -[ - "[" - "]" -] @punctuation.bracket - -; Especial entries -((entry - key: (identifier) @_key - value: (string) @type) - (#eq? @_key "Type") - (#any-of? @type "Application" "Link" "Directory")) - -((entry - key: (identifier) @_key - value: (string) @number) - (#eq? @_key "Version")) - -((entry - key: (identifier) @_key - value: (string) @string.special.path) - (#any-of? @_key "TryExec" "Path")) - -((entry - key: (identifier) @_key - value: (string) @string.special.url) - (#eq? @_key "URL")) - -; https://specifications.freedesktop.org/menu-spec/latest/category-registry.html -((entry - key: (identifier) @_key - value: (list - (string) @constant.builtin)) - (#eq? @_key "Categories") - (#any-of? @constant.builtin - ; Main categories - "AudioVideo" "Audio" "Video" "Development" "Education" "Game" "Graphics" "Network" "Office" - "Science" "Settings" "System" "Utility" - ; Additional Categories - "Building" "Debugger" "IDE" "GUIDesigner" "Profiling" "RevisionControl" "Translation" "Calendar" - "ContactManagement" "Database" "Dictionary" "Chart" "Email" "Finance" "FlowChart" "PDA" - "ProjectManagement" "Presentation" "Spreadsheet" "WordProcessor" "2DGraphics" "VectorGraphics" - "RasterGraphics" "3DGraphics" "Scanning" "OCR" "Photography" "Publishing" "Viewer" "TextTools" - "DesktopSettings" "HardwareSettings" "Printing" "PackageManager" "Dialup" "InstantMessaging" - "Chat" "IRCClient" "Feed" "FileTransfer" "HamRadio" "News" "P2P" "RemoteAccess" "Telephony" - "TelephonyTools" "VideoConference" "WebBrowser" "WebDevelopment" "Midi" "Mixer" "Sequencer" - "Tuner" "TV" "AudioVideoEditing" "Player" "Recorder" "DiscBurning" "ActionGame" "AdventureGame" - "ArcadeGame" "BoardGame" "BlocksGame" "CardGame" "KidsGame" "LogicGame" "RolePlaying" "Shooter" - "Simulation" "SportsGame" "StrategyGame" "Art" "Construction" "Music" "Languages" - "ArtificialIntelligence" "Astronomy" "Biology" "Chemistry" "ComputerScience" "DataVisualization" - "Economy" "Electricity" "Geography" "Geology" "Geoscience" "History" "Humanities" - "ImageProcessing" "Literature" "Maps" "Math" "NumericalAnalysis" "MedicalSoftware" "Physics" - "Robotics" "Spirituality" "Sports" "ParallelComputing" "Amusement" "Archiving" "Compression" - "Electronics" "Emulator" "Engineering" "FileTools" "FileManager" "TerminalEmulator" "Filesystem" - "Monitor" "Security" "Accessibility" "Calculator" "Clock" "TextEditor" "Documentation" "Adult" - "Core" "KDE" "COSMIC" "GNOME" "XFCE" "DDE" "GTK" "Qt" "Motif" "Java" "ConsoleOnly" - ; Reserved - "Screensaver" "TrayIcon" "Applet" "Shell")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/injections.scm deleted file mode 100644 index 1666a04..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/desktop/injections.scm +++ /dev/null @@ -1,8 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((entry - key: (identifier) @_exec - value: (string) @injection.content) - (#eq? @_exec "Exec") - (#set! injection.language "bash")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/folds.scm deleted file mode 100644 index 206c4be..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(node) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/highlights.scm deleted file mode 100644 index 74ec89a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/highlights.scm +++ /dev/null @@ -1,61 +0,0 @@ -(comment) @comment @spell - -[ - (preproc_include) - (dtsi_include) -] @keyword.import - -(preproc_def) @constant.macro - -(preproc_function_def) @function.macro - -[ - (memory_reservation) - (file_version) -] @attribute - -[ - (string_literal) - (byte_string_literal) - (system_lib_string) -] @string - -(integer_literal) @number - -(identifier) @variable - -(node - (identifier) @module) - -(property - (identifier) @property) - -(node - label: (_) @label) - -(call_expression - (identifier) @function.macro) - -(reference) @label ; referencing labeled_item.identifier - -(unit_address) @constant - -"=" @operator - -[ - "(" - ")" - "[" - "]" - "{" - "}" - "<" - ">" -] @punctuation.bracket - -[ - ";" - ":" - "," - "@" -] @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/indents.scm deleted file mode 100644 index 9740060..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/indents.scm +++ /dev/null @@ -1,12 +0,0 @@ -[ - (node) - (property) - (integer_cells) -] @indent.begin - -[ - "}" - ">" -] @indent.branch - -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/locals.scm deleted file mode 100644 index e33a81d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/devicetree/locals.scm +++ /dev/null @@ -1,4 +0,0 @@ -[ - (node) - (integer_cells) -] @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/folds.scm deleted file mode 100644 index bc92797..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/folds.scm +++ /dev/null @@ -1,10 +0,0 @@ -[ - (let_binding) - (application_expression) - (lambda_expression) - (record_type) - (union_type) - (list_literal) - (record_literal) - (block_comment) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/highlights.scm deleted file mode 100644 index d7a5d00..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/highlights.scm +++ /dev/null @@ -1,200 +0,0 @@ -; Imports -(missing_import) @keyword.import - -(local_import) @string.special.path - -(http_import) @string.special.url - -[ - (env_variable) - (import_hash) -] @string.special - -[ - (import_as_bytes) - (import_as_location) - (import_as_text) -] @type - -; Types -([ - (let_binding - (label) @type) - (union_type_entry - (label) @type) -] - (#lua-match? @type "^%u")) - -((primitive_expression - (identifier - (label) @type) - (selector - (label) @type)) @variable - (#lua-match? @variable "^[A-Z][^.]*$")) - -; Parameters -(lambda_expression - label: (label) @variable.parameter) - -; Variables -(label) @variable - -(identifier - [ - (label) @variable - (de_bruijn_index) @operator - ]) - -(let_binding - label: (label) @variable) - -; Fields -(record_literal_entry - (label) @variable.member) - -(record_type_entry - (label) @variable.member) - -(selector - (selector_dot) - (_) @variable.member) - -; Keywords -(env_import) @keyword - -[ - "let" - "in" - "assert" -] @keyword - -[ - "using" - "as" - "with" -] @keyword.operator - -; Operators -[ - (type_operator) - (assign_operator) - (lambda_operator) - (arrow_operator) - (infix_operator) - (completion_operator) - (assert_operator) - (forall_operator) - (empty_record_literal) -] @operator - -; Builtins -(builtin_function) @function.builtin - -(builtin - [ - "Bool" - "Natural" - "Natural/build" - "Natural/fold" - "Natural/isZero" - "Natural/even" - "Natural/odd" - "Natural/subtract" - "Natural/toInteger" - "Natural/show" - "Integer" - "Integer/toDouble" - "Integer/show" - "Integer/negate" - "Integer/clamp" - "Double" - "Double/show" - "List" - "List/build" - "List/fold" - "List/length" - "List/head" - "List/last" - "List/indexed" - "List/reverse" - "Text" - "Text/show" - "Text/replace" - "Optional" - "Date" - "Date/show" - "Time" - "Time/show" - "TimeZone" - "TimeZone/show" - "Type" - "Kind" - "Sort" - ] @type.builtin) - -; Punctuation -[ - "," - "|" -] @punctuation.delimiter - -(selector_dot) @punctuation.delimiter - -[ - "{" - "}" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - "(" - ")" -] @punctuation.bracket - -[ - "<" - ">" -] @punctuation.bracket - -; Conditionals -[ - "if" - "then" - "else" -] @keyword.conditional - -; Literals -[ - (text_literal) - (bytes_literal) -] @string - -(interpolation - "}" @string) - -[ - (double_quote_escaped) - (single_quote_escaped) -] @string.escape - -[ - (integer_literal) - (natural_literal) -] @number - -(double_literal) @number.float - -(boolean_literal) @boolean - -(builtin - "None") @constant.builtin - -; Comments -[ - (line_comment) - (block_comment) -] @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/injections.scm deleted file mode 100644 index 3cd6aac..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dhall/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (line_comment) - (block_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/folds.scm deleted file mode 100644 index 3560abb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (block) - (hunks) - (hunk) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/highlights.scm deleted file mode 100644 index 54c57a8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/highlights.scm +++ /dev/null @@ -1,49 +0,0 @@ -(comment) @comment @spell - -[ - (addition) - (new_file) -] @diff.plus - -[ - (deletion) - (old_file) -] @diff.minus - -(commit) @constant - -(location) @attribute - -(command - "diff" @function - (argument) @variable.parameter) - -(filename) @string.special.path - -(mode) @number - -([ - ".." - "+" - "++" - "+++" - "++++" - "-" - "--" - "---" - "----" -] @punctuation.special - (#set! priority 95)) - -[ - (binary_change) - (similarity) - (file_change) -] @label - -(index - "index" @keyword) - -(similarity - (score) @number - "%" @number) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/diff/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/disassembly/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/disassembly/highlights.scm deleted file mode 100644 index b1ece9a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/disassembly/highlights.scm +++ /dev/null @@ -1,30 +0,0 @@ -(byte) @constant - -[ - (address) - (hexadecimal) - (integer) -] @number - -(identifier) @variable - -(bad_instruction) @comment.warning - -(code_location - (identifier) @function.call) - -(comment) @comment - -(instruction) @function - -(memory_dump) @string - -[ - "<" - ">" -] @punctuation.special - -[ - "+" - ":" -] @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/disassembly/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/disassembly/injections.scm deleted file mode 100644 index 9fb52da..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/disassembly/injections.scm +++ /dev/null @@ -1,6 +0,0 @@ -; TODO: https://github.com/nvim-treesitter/nvim-treesitter/pull/5548#issuecomment-1773707396 -; -; To be added once a compatible Assembly parser is merged into nvim-treesitter -; -; ((instruction) @injection.content -; (#set! injection.language "asm")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/folds.scm deleted file mode 100644 index 94f3724..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/folds.scm +++ /dev/null @@ -1,7 +0,0 @@ -[ - (section) - (code_block) - (raw_block) - (list) - (div) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/highlights.scm deleted file mode 100644 index 73dd660..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/highlights.scm +++ /dev/null @@ -1,372 +0,0 @@ -(heading) @markup.heading - -((heading - (marker) @_heading.marker) @markup.heading.1 - (#eq? @_heading.marker "# ")) - -((heading - (marker) @_heading.marker) @markup.heading.2 - (#eq? @_heading.marker "## ")) - -((heading - (marker) @_heading.marker) @markup.heading.3 - (#eq? @_heading.marker "### ")) - -((heading - (marker) @_heading.marker) @markup.heading.4 - (#eq? @_heading.marker "##### ")) - -((heading - (marker) @_heading.marker) @markup.heading.5 - (#eq? @_heading.marker "###### ")) - -((heading - (marker) @_heading.marker) @markup.heading.6 - (#eq? @_heading.marker "####### ")) - -(thematic_break) @string.special - -[ - (div_marker_begin) - (div_marker_end) -] @punctuation.delimiter - -([ - (code_block) - (raw_block) - (frontmatter) -] @markup.raw.block - (#set! priority 90)) - -; Remove @markup.raw for code with a language spec -(code_block - . - (code_block_marker_begin) - (language) - (code) @none - (#set! priority 90)) - -[ - (code_block_marker_begin) - (code_block_marker_end) - (raw_block_marker_begin) - (raw_block_marker_end) -] @punctuation.delimiter - -(language) @attribute - -(inline_attribute - _ @conceal - (#set! conceal "")) - -((language_marker) @punctuation.delimiter - (#set! conceal "")) - -(block_quote) @markup.quote - -(block_quote_marker) @punctuation.special - -(table_header) @markup.heading - -(table_header - "|" @punctuation.special) - -(table_row - "|" @punctuation.special) - -(table_separator) @punctuation.special - -(table_caption - (marker) @punctuation.special) - -(table_caption) @markup.italic - -[ - (list_marker_dash) - (list_marker_plus) - (list_marker_star) - (list_marker_definition) - (list_marker_decimal_period) - (list_marker_decimal_paren) - (list_marker_decimal_parens) - (list_marker_lower_alpha_period) - (list_marker_lower_alpha_paren) - (list_marker_lower_alpha_parens) - (list_marker_upper_alpha_period) - (list_marker_upper_alpha_paren) - (list_marker_upper_alpha_parens) - (list_marker_lower_roman_period) - (list_marker_lower_roman_paren) - (list_marker_lower_roman_parens) - (list_marker_upper_roman_period) - (list_marker_upper_roman_paren) - (list_marker_upper_roman_parens) -] @markup.list - -(list_marker_task - (unchecked)) @markup.list.unchecked - -(list_marker_task - (checked)) @markup.list.checked - -; Colorize `x` in `[x]` -((checked) @constant.builtin - (#offset! @constant.builtin 0 1 0 -1)) - -[ - (ellipsis) - (en_dash) - (em_dash) - (quotation_marks) -] @string.special - -(list_item - (term) @type.definition) - -; Conceal { and } but leave " and ' -((quotation_marks) @string.special - (#any-of? @string.special "\"}" "'}") - (#offset! @string.special 0 1 0 0) - (#set! conceal "")) - -((quotation_marks) @string.special - (#any-of? @string.special "\\\"" "\\'" "{'" "{\"") - (#offset! @string.special 0 0 0 -1) - (#set! conceal "")) - -[ - (hard_line_break) - (backslash_escape) -] @string.escape - -; Only conceal \ but leave escaped character. -((backslash_escape) @string.escape - (#offset! @string.escape 0 0 0 -1) - (#set! conceal "")) - -(frontmatter_marker) @punctuation.delimiter - -(emphasis) @markup.italic - -(strong) @markup.strong - -(symbol) @string.special.symbol - -(insert) @markup.underline - -(delete) @markup.strikethrough - -[ - (highlighted) - (superscript) - (subscript) -] @string.special - -([ - (emphasis_begin) - (emphasis_end) - (strong_begin) - (strong_end) - (superscript_begin) - (superscript_end) - (subscript_begin) - (subscript_end) - (highlighted_begin) - (highlighted_end) - (insert_begin) - (insert_end) - (delete_begin) - (delete_end) - (verbatim_marker_begin) - (verbatim_marker_end) - (math_marker) - (math_marker_begin) - (math_marker_end) - (raw_inline_attribute) - (raw_inline_marker_begin) - (raw_inline_marker_end) -] @punctuation.delimiter - (#set! conceal "")) - -((math) @markup.math - (#set! priority 90)) - -(verbatim) @markup.raw - -((raw_inline) @markup.raw - (#set! priority 90)) - -[ - (comment) - (inline_comment) -] @comment - -(span - [ - "[" - "]" - ] @punctuation.bracket) - -(inline_attribute - [ - "{" - "}" - ] @punctuation.bracket) - -(block_attribute - [ - "{" - "}" - ] @punctuation.bracket) - -[ - (class) - (class_name) -] @type - -(identifier) @tag - -(key_value - "=" @operator) - -(key_value - (key) @property) - -(key_value - (value) @string) - -(link_text - [ - "[" - "]" - ] @punctuation.bracket - (#set! conceal "")) - -(autolink - [ - "<" - ">" - ] @punctuation.bracket - (#set! conceal "")) - -(inline_link - (inline_link_destination) @markup.link.url - (#set! conceal "")) - -(link_reference_definition - ":" @punctuation.special) - -(full_reference_link - (link_text) @markup.link) - -(full_reference_link - (link_label) @markup.link.label - (#set! conceal "")) - -(collapsed_reference_link - "[]" @punctuation.bracket - (#set! conceal "")) - -(full_reference_link - [ - "[" - "]" - ] @punctuation.bracket - (#set! conceal "")) - -(collapsed_reference_link - (link_text) @markup.link) - -(collapsed_reference_link - (link_text) @markup.link.label) - -(inline_link - (link_text) @markup.link) - -(full_reference_image - (link_label) @markup.link.label) - -(full_reference_image - [ - "[" - "]" - ] @punctuation.bracket) - -(collapsed_reference_image - "[]" @punctuation.bracket) - -(image_description - [ - "![" - "]" - ] @punctuation.bracket) - -(image_description) @markup.italic - -(link_reference_definition - [ - "[" - "]" - ] @punctuation.bracket) - -(link_reference_definition - (link_label) @markup.link.label) - -(inline_link_destination - [ - "(" - ")" - ] @punctuation.bracket) - -[ - (autolink) - (inline_link_destination) - (link_destination) - (link_reference_definition) -] @markup.link.url - -(footnote - (reference_label) @markup.link.label) - -(footnote_reference - (reference_label) @markup.link.label) - -[ - (footnote_marker_begin) - (footnote_marker_end) -] @punctuation.bracket - -(todo) @comment.todo - -(note) @comment.note - -(fixme) @comment.error - -[ - (paragraph) - (comment) - (table_cell) -] @spell - -[ - (autolink) - (inline_link_destination) - (link_destination) - (code_block) - (raw_block) - (math) - (raw_inline) - (verbatim) - (reference_label) - (class) - (class_name) - (identifier) - (key_value) - (frontmatter) -] @nospell - -(full_reference_link - (link_label) @nospell) - -(full_reference_image - (link_label) @nospell) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/indents.scm deleted file mode 100644 index 3b1a56e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/indents.scm +++ /dev/null @@ -1,10 +0,0 @@ -; The intention here is to rely on Neovims `autoindent` setting. -; This allows us to not indent after just a single list item -; so we can create narrow lists quickly, but indent blocks inside list items -; to the previous paragraph. -(list_item_content) @indent.auto - -(footnote_content) @indent.align - -((table_caption) @indent.begin - (#set! indent.immediate 1)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/injections.scm deleted file mode 100644 index 0e41410..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/injections.scm +++ /dev/null @@ -1,24 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -(math - (content) @injection.content - (#set! injection.language "latex")) - -(code_block - (language) @injection.language - (code) @injection.content) - -(raw_block - (raw_block_info - (language) @injection.language) - (content) @injection.content) - -(raw_inline - (content) @injection.content - (raw_inline_attribute - (language) @injection.language)) - -(frontmatter - (language) @injection.language - (frontmatter_content) @injection.content) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/locals.scm deleted file mode 100644 index 1ac2752..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/djot/locals.scm +++ /dev/null @@ -1,17 +0,0 @@ -(link_reference_definition - (link_label) @local.definition) - -(footnote - (reference_label) @local.definition) - -(collapsed_reference_link - (link_text) @local.reference) - -(full_reference_link - (link_label) @local.reference) - -(full_reference_image - (link_label) @local.reference) - -(footnote_reference - (reference_label) @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dockerfile/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dockerfile/highlights.scm deleted file mode 100644 index 72893f8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dockerfile/highlights.scm +++ /dev/null @@ -1,68 +0,0 @@ -[ - "FROM" - "AS" - "RUN" - "CMD" - "LABEL" - "EXPOSE" - "ENV" - "ADD" - "COPY" - "ENTRYPOINT" - "VOLUME" - "USER" - "WORKDIR" - "ARG" - "ONBUILD" - "STOPSIGNAL" - "HEALTHCHECK" - "SHELL" - "MAINTAINER" - "CROSS_BUILD" -] @keyword - -[ - ":" - "@" -] @operator - -(comment) @comment @spell - -(image_spec - (image_tag - ":" @punctuation.special) - (image_digest - "@" @punctuation.special)) - -(double_quoted_string) @string - -[ - (heredoc_marker) - (heredoc_end) -] @label - -((heredoc_block - (heredoc_line) @string) - (#set! priority 90)) - -(expansion - [ - "$" - "{" - "}" - ] @punctuation.special) - -((variable) @constant - (#lua-match? @constant "^[A-Z][A-Z_0-9]*$")) - -(arg_instruction - . - (unquoted_string) @property) - -(env_instruction - (env_pair - . - (unquoted_string) @property)) - -(expose_instruction - (expose_port) @number) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dockerfile/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dockerfile/injections.scm deleted file mode 100644 index 5d3bbff..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dockerfile/injections.scm +++ /dev/null @@ -1,12 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((shell_command - (shell_fragment) @injection.content) - (#set! injection.language "bash") - (#set! injection.combined)) - -((run_instruction - (heredoc_block) @injection.content) - (#set! injection.language "bash") - (#set! injection.include-children)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/highlights.scm deleted file mode 100644 index 75ad922..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/highlights.scm +++ /dev/null @@ -1,49 +0,0 @@ -(identifier) @type - -[ - "strict" - "graph" - "digraph" - "subgraph" - "node" - "edge" -] @keyword - -(string_literal) @string - -(number_literal) @number - -[ - (edgeop) - (operator) -] @operator - -[ - "," - ";" -] @punctuation.delimiter - -[ - "{" - "}" - "[" - "]" - "<" - ">" -] @punctuation.bracket - -(subgraph - id: (id - (identifier) @module)) - -(attribute - name: (id - (identifier) @variable.member)) - -(attribute - value: (id - (identifier) @constant)) - -(comment) @comment @spell - -(preproc) @keyword.directive diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/indents.scm deleted file mode 100644 index a951e55..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/indents.scm +++ /dev/null @@ -1,9 +0,0 @@ -[ - (block) - (attr_list) -] @indent.begin - -[ - "}" - "]" -] @indent.branch @indent.end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/injections.scm deleted file mode 100644 index 4fe39a8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dot/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -((html_internal) @injection.content - (#set! injection.language "html")) - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/highlights.scm deleted file mode 100644 index 454500d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/highlights.scm +++ /dev/null @@ -1,61 +0,0 @@ -((tag_name) @keyword - (#set! priority 105)) - -[ - "@code" - "@endcode" -] @keyword - -(identifier) @variable - -((tag - (tag_name) @_param - (identifier) @variable.parameter) - (#any-of? @_param "@param" "\\param")) - -(function - (identifier) @function) - -(function_link) @function - -(emphasis) @markup.italic - -[ - "\\a" - "\\c" -] @tag - -(code_block_language) @label - -[ - "in" - "out" - "inout" -] @keyword.modifier - -"~" @operator - -[ - "" - "" -] @tag - -[ - "." - "," - "::" - (code_block_start) - (code_block_end) -] @punctuation.delimiter - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @punctuation.bracket - -(code_block_content) @none diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/indents.scm deleted file mode 100644 index ef30f1e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/indents.scm +++ /dev/null @@ -1 +0,0 @@ -(document) @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/injections.scm deleted file mode 100644 index 994f535..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/doxygen/injections.scm +++ /dev/null @@ -1,15 +0,0 @@ -((type) @injection.content - (#set! injection.parent)) - -([ - (function_link) - (code) -] @injection.content - (#set! injection.parent)) - -((link) @injection.content - (#set! injection.language "html")) - -(code_block - (code_block_language) @injection.language - (code_block_content) @injection.content) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/folds.scm deleted file mode 100644 index b1bce4f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/folds.scm +++ /dev/null @@ -1,4 +0,0 @@ -[ - (conditionalSect) - (Comment) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/highlights.scm deleted file mode 100644 index 9afd6e3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/highlights.scm +++ /dev/null @@ -1,148 +0,0 @@ -; Text declaration -(TextDecl - "xml" @keyword.directive) - -(TextDecl - [ - "version" - "encoding" - ] @tag.attribute) - -(TextDecl - (EncName) @string.special) - -(TextDecl - (VersionNum) @number) - -; Processing instructions -(PI) @keyword.directive - -; Element declaration -(elementdecl - "ELEMENT" @keyword.directive.define - (Name) @tag) - -(contentspec - (_ - (Name) @tag.attribute)) - -"#PCDATA" @type.builtin - -[ - "EMPTY" - "ANY" -] @keyword.modifier - -[ - "*" - "?" - "+" -] @character.special - -; Entity declaration -(GEDecl - "ENTITY" @keyword.directive.define - (Name) @constant) - -(GEDecl - (EntityValue) @string) - -(NDataDecl - "NDATA" @keyword - (Name) @label) - -; Parsed entity declaration -(PEDecl - "ENTITY" @keyword.directive.define - "%" @operator - (Name) @function.macro) - -(PEDecl - (EntityValue) @string) - -; Notation declaration -(NotationDecl - "NOTATION" @keyword.directive - (Name) @label) - -; Attlist declaration -(AttlistDecl - "ATTLIST" @keyword.directive.define - (Name) @tag) - -(AttDef - (Name) @tag.attribute) - -(AttDef - (Enumeration - (Nmtoken) @string)) - -[ - (StringType) - (TokenizedType) -] @type.builtin - -(NotationType - "NOTATION" @type.builtin) - -[ - "#REQUIRED" - "#IMPLIED" - "#FIXED" -] @attribute - -; Entities -(EntityRef) @constant - -((EntityRef) @constant.builtin - (#any-of? @constant.builtin "&" "<" ">" """ "'")) - -(CharRef) @character - -(PEReference) @function.macro - -; External references -[ - "PUBLIC" - "SYSTEM" -] @keyword - -(PubidLiteral) @string.special - -(SystemLiteral - (URI) @string.special.url) - -; Delimiters & punctuation -[ - "" - "" - "" -] @tag.delimiter - -[ - "(" - ")" - "[" -] @punctuation.bracket - -[ - "\"" - "'" -] @punctuation.delimiter - -[ - "," - "|" - "=" -] @operator - -; Misc -[ - "INCLUDE" - "IGNORE" -] @keyword.import - -(Comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/injections.scm deleted file mode 100644 index 57fae58..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((Comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/locals.scm deleted file mode 100644 index 88246c0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/dtd/locals.scm +++ /dev/null @@ -1,11 +0,0 @@ -(elementdecl - (Name) @local.definition.type) - -(elementdecl - (contentspec - (children - (Name) @local.reference))) - -(AttlistDecl - . - (Name) @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/earthfile/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/earthfile/highlights.scm deleted file mode 100644 index cc7dce2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/earthfile/highlights.scm +++ /dev/null @@ -1,129 +0,0 @@ -(string_array - "," @punctuation.delimiter) - -(string_array - [ - "[" - "]" - ] @punctuation.bracket) - -[ - "ARG" - "AS LOCAL" - "BUILD" - "CACHE" - "CMD" - "COPY" - "DO" - "ENTRYPOINT" - "ENV" - "EXPOSE" - "FROM DOCKERFILE" - "FROM" - "FUNCTION" - "GIT CLONE" - "HOST" - "IMPORT" - "LABEL" - "LET" - "PROJECT" - "RUN" - "SAVE ARTIFACT" - "SAVE IMAGE" - "SET" - "USER" - "VERSION" - "VOLUME" - "WORKDIR" -] @keyword - -(for_command - [ - "FOR" - "IN" - "END" - ] @keyword.repeat) - -(if_command - [ - "IF" - "END" - ] @keyword.conditional) - -(elif_block - "ELSE IF" @keyword.conditional) - -(else_block - "ELSE" @keyword.conditional) - -(import_command - [ - "IMPORT" - "AS" - ] @keyword.import) - -(try_command - [ - "TRY" - "FINALLY" - "END" - ] @keyword.exception) - -(wait_command - [ - "WAIT" - "END" - ] @keyword) - -(with_docker_command - [ - "WITH DOCKER" - "END" - ] @keyword) - -[ - (comment) - (line_continuation_comment) -] @comment @spell - -[ - (target_ref) - (target_artifact) - (function_ref) -] @function - -(target - (identifier) @function) - -[ - (double_quoted_string) - (single_quoted_string) -] @string - -(unquoted_string) @string.special - -(escape_sequence) @string.escape - -(variable) @variable - -(expansion - [ - "$" - "{" - "}" - "(" - ")" - ] @punctuation.special) - -(build_arg - [ - "--" - (variable) - ] @variable.parameter) - -(options - (_) @property) - -"=" @operator - -(line_continuation) @operator diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/earthfile/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/earthfile/injections.scm deleted file mode 100644 index 7435a40..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/earthfile/injections.scm +++ /dev/null @@ -1,9 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((line_continuation_comment) @injection.content - (#set! injection.language "comment")) - -((shell_fragment) @injection.content - (#set! injection.language "bash") - (#set! injection.include-children)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ebnf/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ebnf/highlights.scm deleted file mode 100644 index 4254d04..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ebnf/highlights.scm +++ /dev/null @@ -1,42 +0,0 @@ -; Simple tokens ;;;; -(terminal) @string - -(special_sequence) @string.special - -(integer) @number - -(comment) @comment @spell - -; Identifiers ;;;; -; Allow different highlighting for specific casings -((identifier) @type - (#lua-match? @type "^%u")) - -((identifier) @string.special.symbol - (#lua-match? @string.special.symbol "^%l")) - -((identifier) @constant - (#lua-match? @constant "^%u[%u%d_]+$")) - -; Punctuation ;;;; -[ - ";" - "," -] @punctuation.delimiter - -[ - "|" - "*" - "-" -] @operator - -"=" @keyword.operator - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ebnf/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ebnf/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ebnf/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/folds.scm deleted file mode 100644 index a348f34..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/folds.scm +++ /dev/null @@ -1,24 +0,0 @@ -[ - (arguments) - (for_in_statement) - (for_statement) - (while_statement) - (arrow_function) - (function_expression) - (function_declaration) - (class_declaration) - (method_definition) - (do_statement) - (with_statement) - (switch_statement) - (switch_case) - (switch_default) - (import_statement)+ - (if_statement) - (try_statement) - (catch_clause) - (array) - (object) - (generator_function) - (generator_function_declaration) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/highlights.scm deleted file mode 100644 index cec2f4e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/highlights.scm +++ /dev/null @@ -1,392 +0,0 @@ -; Types -; Javascript -; Variables -;----------- -(identifier) @variable - -; Properties -;----------- -(property_identifier) @variable.member - -(shorthand_property_identifier) @variable.member - -(private_property_identifier) @variable.member - -(object_pattern - (shorthand_property_identifier_pattern) @variable) - -(object_pattern - (object_assignment_pattern - (shorthand_property_identifier_pattern) @variable)) - -; Special identifiers -;-------------------- -((identifier) @type - (#lua-match? @type "^[A-Z]")) - -((identifier) @constant - (#lua-match? @constant "^_*[A-Z][A-Z%d_]*$")) - -((shorthand_property_identifier) @constant - (#lua-match? @constant "^_*[A-Z][A-Z%d_]*$")) - -((identifier) @variable.builtin - (#any-of? @variable.builtin "arguments" "module" "console" "window" "document")) - -((identifier) @type.builtin - (#any-of? @type.builtin - "Object" "Function" "Boolean" "Symbol" "Number" "Math" "Date" "String" "RegExp" "Map" "Set" - "WeakMap" "WeakSet" "Promise" "Array" "Int8Array" "Uint8Array" "Uint8ClampedArray" "Int16Array" - "Uint16Array" "Int32Array" "Uint32Array" "Float32Array" "Float64Array" "ArrayBuffer" "DataView" - "Error" "EvalError" "InternalError" "RangeError" "ReferenceError" "SyntaxError" "TypeError" - "URIError")) - -(statement_identifier) @label - -; Function and method definitions -;-------------------------------- -(function_expression - name: (identifier) @function) - -(function_declaration - name: (identifier) @function) - -(generator_function - name: (identifier) @function) - -(generator_function_declaration - name: (identifier) @function) - -(method_definition - name: [ - (property_identifier) - (private_property_identifier) - ] @function.method) - -(method_definition - name: (property_identifier) @constructor - (#eq? @constructor "constructor")) - -(pair - key: (property_identifier) @function.method - value: (function_expression)) - -(pair - key: (property_identifier) @function.method - value: (arrow_function)) - -(assignment_expression - left: (member_expression - property: (property_identifier) @function.method) - right: (arrow_function)) - -(assignment_expression - left: (member_expression - property: (property_identifier) @function.method) - right: (function_expression)) - -(variable_declarator - name: (identifier) @function - value: (arrow_function)) - -(variable_declarator - name: (identifier) @function - value: (function_expression)) - -(assignment_expression - left: (identifier) @function - right: (arrow_function)) - -(assignment_expression - left: (identifier) @function - right: (function_expression)) - -; Function and method calls -;-------------------------- -(call_expression - function: (identifier) @function.call) - -(call_expression - function: (member_expression - property: [ - (property_identifier) - (private_property_identifier) - ] @function.method.call)) - -(call_expression - function: (await_expression - (identifier) @function.call)) - -(call_expression - function: (await_expression - (member_expression - property: [ - (property_identifier) - (private_property_identifier) - ] @function.method.call))) - -; Builtins -;--------- -((identifier) @module.builtin - (#eq? @module.builtin "Intl")) - -((identifier) @function.builtin - (#any-of? @function.builtin - "eval" "isFinite" "isNaN" "parseFloat" "parseInt" "decodeURI" "decodeURIComponent" "encodeURI" - "encodeURIComponent" "require")) - -; Constructor -;------------ -(new_expression - constructor: (identifier) @constructor) - -; Decorators -;---------- -(decorator - "@" @attribute - (identifier) @attribute) - -(decorator - "@" @attribute - (call_expression - (identifier) @attribute)) - -(decorator - "@" @attribute - (member_expression - (property_identifier) @attribute)) - -(decorator - "@" @attribute - (call_expression - (member_expression - (property_identifier) @attribute))) - -; Literals -;--------- -[ - (this) - (super) -] @variable.builtin - -((identifier) @variable.builtin - (#eq? @variable.builtin "self")) - -[ - (true) - (false) -] @boolean - -[ - (null) - (undefined) -] @constant.builtin - -[ - (comment) - (html_comment) -] @comment @spell - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$")) - -(hash_bang_line) @keyword.directive - -((string_fragment) @keyword.directive - (#eq? @keyword.directive "use strict")) - -(string) @string - -(template_string) @string - -(escape_sequence) @string.escape - -(regex_pattern) @string.regexp - -(regex_flags) @character.special - -(regex - "/" @punctuation.bracket) ; Regex delimiters - -(number) @number - -((identifier) @number - (#any-of? @number "NaN" "Infinity")) - -; Punctuation -;------------ -[ - ";" - "." - "," - ":" -] @punctuation.delimiter - -[ - "--" - "-" - "-=" - "&&" - "+" - "++" - "+=" - "&=" - "/=" - "**=" - "<<=" - "<" - "<=" - "<<" - "=" - "==" - "===" - "!=" - "!==" - "=>" - ">" - ">=" - ">>" - "||" - "%" - "%=" - "*" - "**" - ">>>" - "&" - "|" - "^" - "??" - "*=" - ">>=" - ">>>=" - "^=" - "|=" - "&&=" - "||=" - "??=" - "..." -] @operator - -(binary_expression - "/" @operator) - -(ternary_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) - -(unary_expression - [ - "!" - "~" - "-" - "+" - ] @operator) - -(unary_expression - [ - "delete" - "void" - ] @keyword.operator) - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -(template_substitution - [ - "${" - "}" - ] @punctuation.special) @none - -; Imports -;---------- -(namespace_import - "*" @character.special - (identifier) @module) - -(namespace_export - "*" @character.special - (identifier) @module) - -(export_statement - "*" @character.special) - -; Keywords -;---------- -[ - "if" - "else" - "switch" - "case" -] @keyword.conditional - -[ - "import" - "from" - "as" - "export" -] @keyword.import - -[ - "for" - "of" - "do" - "while" - "continue" -] @keyword.repeat - -[ - "break" - "const" - "debugger" - "extends" - "get" - "let" - "set" - "static" - "target" - "var" - "with" -] @keyword - -"class" @keyword.type - -[ - "async" - "await" -] @keyword.coroutine - -[ - "return" - "yield" -] @keyword.return - -"function" @keyword.function - -[ - "new" - "delete" - "in" - "instanceof" - "typeof" -] @keyword.operator - -[ - "throw" - "try" - "catch" - "finally" -] @keyword.exception - -(export_statement - "default" @keyword) - -(switch_default - "default" @keyword.conditional) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/indents.scm deleted file mode 100644 index d567416..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/indents.scm +++ /dev/null @@ -1,82 +0,0 @@ -[ - (arguments) - (array) - (binary_expression) - (class_body) - (export_clause) - (formal_parameters) - (named_imports) - (object) - (object_pattern) - (parenthesized_expression) - (return_statement) - (statement_block) - (switch_case) - (switch_default) - (switch_statement) - (template_substitution) - (ternary_expression) -] @indent.begin - -(arguments - (call_expression) @indent.begin) - -(binary_expression - (call_expression) @indent.begin) - -(expression_statement - (call_expression) @indent.begin) - -(arrow_function - body: (_) @_body - (#not-kind-eq? @_body "statement_block")) @indent.begin - -(assignment_expression - right: (_) @_right - (#not-kind-eq? @_right "arrow_function" "function")) @indent.begin - -(variable_declarator - value: (_) @_value - (#not-kind-eq? @_value "arrow_function" "call_expression" "function")) @indent.begin - -(arguments - ")" @indent.end) - -(object - "}" @indent.end) - -(statement_block - "}" @indent.end) - -[ - (arguments - (object)) - ")" - "}" - "]" -] @indent.branch - -(statement_block - "{" @indent.branch) - -((parenthesized_expression - "(" - (_) - ")" @indent.end) @_outer - (#not-has-parent? @_outer if_statement)) - -[ - "}" - "]" -] @indent.end - -(template_string) @indent.ignore - -[ - (comment) - (ERROR) -] @indent.auto - -(if_statement - consequence: (_) @indent.dedent - (#not-kind-eq? @indent.dedent statement_block)) @indent.begin diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/injections.scm deleted file mode 100644 index 04abafc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/injections.scm +++ /dev/null @@ -1,203 +0,0 @@ -(((comment) @_jsdoc_comment - (#lua-match? @_jsdoc_comment "^/[*][*][^*].*[*]/$")) @injection.content - (#set! injection.language "jsdoc")) - -((comment) @injection.content - (#set! injection.language "comment")) - -; html(`...`), html`...`, sql(`...`), etc. -(call_expression - function: (identifier) @injection.language - arguments: [ - (arguments - (template_string) @injection.content) - (template_string) @injection.content - ] - (#lua-match? @injection.language "^[a-zA-Z][a-zA-Z0-9]*$") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - ; Languages excluded from auto-injection due to special rules - ; - svg uses the html parser - ; - css uses the styled parser - (#not-any-of? @injection.language "svg" "css")) - -; svg`...` or svg(`...`) -(call_expression - function: (identifier) @_name - (#eq? @_name "svg") - arguments: [ - (arguments - (template_string) @injection.content) - (template_string) @injection.content - ] - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "html")) - -; Vercel PostgreSQL -; foo.sql`...` or foo.sql(`...`) -(call_expression - function: (member_expression - property: (property_identifier) @injection.language) - arguments: [ - (arguments - (template_string) @injection.content) - (template_string) @injection.content - ] - (#eq? @injection.language "sql") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children)) - -(call_expression - function: (identifier) @_name - (#eq? @_name "gql") - arguments: (template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "graphql")) - -(call_expression - function: (identifier) @_name - (#eq? @_name "hbs") - arguments: (template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "glimmer")) - -; css``, keyframes`` -(call_expression - function: (identifier) @_name - (#any-of? @_name "css" "keyframes") - arguments: (template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "styled")) - -; styled.div`` -(call_expression - function: (member_expression - object: (identifier) @_name - (#eq? @_name "styled")) - arguments: ((template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "styled"))) - -; styled(Component)`` -(call_expression - function: (call_expression - function: (identifier) @_name - (#eq? @_name "styled")) - arguments: ((template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "styled"))) - -; styled.div.attrs({ prop: "foo" })`` -(call_expression - function: (call_expression - function: (member_expression - object: (member_expression - object: (identifier) @_name - (#eq? @_name "styled")))) - arguments: ((template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "styled"))) - -; styled(Component).attrs({ prop: "foo" })`` -(call_expression - function: (call_expression - function: (member_expression - object: (call_expression - function: (identifier) @_name - (#eq? @_name "styled")))) - arguments: ((template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "styled"))) - -((regex_pattern) @injection.content - (#set! injection.language "regex")) - -; ((comment) @_gql_comment -; (#eq? @_gql_comment "/* GraphQL */") -; (template_string) @injection.content -; (#set! injection.language "graphql")) -((template_string) @injection.content - (#lua-match? @injection.content "^`#graphql") - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "graphql")) - -; el.innerHTML = `` -(assignment_expression - left: (member_expression - property: (property_identifier) @_prop - (#any-of? @_prop "outerHTML" "innerHTML")) - right: (template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "html")) - -; el.innerHTML = '' -(assignment_expression - left: (member_expression - property: (property_identifier) @_prop - (#any-of? @_prop "outerHTML" "innerHTML")) - right: (string - (string_fragment) @injection.content) - (#set! injection.language "html")) - -;---- Angular injections ----- -; @Component({ -; template: `` -; }) -(decorator - (call_expression - function: ((identifier) @_name - (#eq? @_name "Component")) - arguments: (arguments - (object - (pair - key: ((property_identifier) @_prop - (#eq? @_prop "template")) - value: ((template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "angular"))))))) - -; @Component({ -; styles: [``] -; }) -(decorator - (call_expression - function: ((identifier) @_name - (#eq? @_name "Component")) - arguments: (arguments - (object - (pair - key: ((property_identifier) @_prop - (#eq? @_prop "styles")) - value: (array - ((template_string) @injection.content - (#offset! @injection.content 0 1 0 -1) - (#set! injection.include-children) - (#set! injection.language "css")))))))) - -; @Component({ -; styles: `` -; }) -(decorator - (call_expression - function: ((identifier) @_name - (#eq? @_name "Component")) - arguments: (arguments - (object - (pair - key: ((property_identifier) @_prop - (#eq? @_prop "styles")) - value: ((template_string) @injection.content - (#set! injection.include-children) - (#offset! @injection.content 0 1 0 -1) - (#set! injection.language "css"))))))) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/locals.scm deleted file mode 100644 index 24ea7c0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/ecma/locals.scm +++ /dev/null @@ -1,42 +0,0 @@ -; Scopes -;------- -(statement_block) @local.scope - -(function_expression) @local.scope - -(arrow_function) @local.scope - -(function_declaration) @local.scope - -(method_definition) @local.scope - -(for_statement) @local.scope - -(for_in_statement) @local.scope - -(catch_clause) @local.scope - -; Definitions -;------------ -(variable_declarator - name: (identifier) @local.definition.var) - -(import_specifier - (identifier) @local.definition.import) - -(namespace_import - (identifier) @local.definition.import) - -(function_declaration - (identifier) @local.definition.function - (#set! definition.var.scope parent)) - -(method_definition - (property_identifier) @local.definition.function - (#set! definition.var.scope parent)) - -; References -;------------ -(identifier) @local.reference - -(shorthand_property_identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/folds.scm deleted file mode 100644 index 911798f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(section) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/highlights.scm deleted file mode 100644 index feb0a52..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/highlights.scm +++ /dev/null @@ -1,55 +0,0 @@ -(comment) @comment @spell - -(section - (section_name) @string.special.path) - -(character_choice - (character) @constant) - -(character_range - start: (character) @constant - end: (character) @constant) - -[ - "[" - "]" - "{" - "}" -] @punctuation.bracket - -[ - "," - ".." - (path_separator) -] @punctuation.delimiter - -[ - "-" - "=" - (negation) -] @operator - -[ - (wildcard_characters) - (wildcard_any_characters) - (wildcard_single_character) -] @character.special - -(escaped_character) @string.escape - -(pair - key: (identifier) @property - value: (_) @string) - -(boolean) @boolean - -(integer) @number - -(unset) @constant.builtin - -[ - (spelling_language) - (indent_style) - (end_of_line) - (charset) -] @string.special diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/editorconfig/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eds/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/eds/folds.scm deleted file mode 100644 index 911798f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eds/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(section) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eds/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/eds/highlights.scm deleted file mode 100644 index 0e008c9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eds/highlights.scm +++ /dev/null @@ -1,45 +0,0 @@ -"=" @punctuation.delimiter - -[ - "[" - "]" -] @punctuation.bracket - -((section_name) @variable.builtin - (#match? @variable.builtin - "\\c^(FileInfo|DeviceInfo|DummyUsage|MandatoryObjects|OptionalObjects)$")) - -((section_name) @variable.builtin - (#lua-match? @variable.builtin "^1")) - -(section - (section_name) @_name - (#match? @_name "\\c^Comments$")) @comment - -(section - (section_name) @_name - (statement - (key) @_key) @string - (#match? @_key "\\c^ParameterName$") - (#not-match? @_name "\\c^Comments$")) - -(section - (section_name) @_name - (statement - (key) @_key) @type - (#match? @_key "\\c^(ObjectType|DataType|AccessType)$") - (#not-match? @_name "\\c^Comments$")) - -(section - (section_name) @_name - (statement - (key) @_key) @attribute - (#match? @_key "\\c^PDOMapping$") - (#not-match? @_name "\\c^Comments$")) - -(section - (section_name) @_name - (statement - (key) @_key) @number - (#match? @_key "\\c^(DefaultValue|LowLimit|HighLimit|SubNumber)$") - (#not-match? @_name "\\c^Comments$")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eex/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/eex/highlights.scm deleted file mode 100644 index d032a74..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eex/highlights.scm +++ /dev/null @@ -1,12 +0,0 @@ -[ - "%>" - "--%>" - "<%!--" - "<%" - "<%#" - "<%%=" - "<%=" -] @tag.delimiter - -; EEx comments are highlighted as such -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eex/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/eex/injections.scm deleted file mode 100644 index f13d3c1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/eex/injections.scm +++ /dev/null @@ -1,8 +0,0 @@ -; EEx expressions are Elixir -((expression) @injection.content - (#set! injection.language "elixir")) - -; EEx expressions can span multiple interpolated lines -((partial_expression) @injection.content - (#set! injection.language "elixir") - (#set! injection.combined)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/folds.scm deleted file mode 100644 index 7abfe67..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/folds.scm +++ /dev/null @@ -1,10 +0,0 @@ -[ - (anonymous_function) - (stab_clause) - (arguments) - (block) - (do_block) - (list) - (map) - (tuple) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/highlights.scm deleted file mode 100644 index cbdb40d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/highlights.scm +++ /dev/null @@ -1,217 +0,0 @@ -; Punctuation -[ - "," - ";" -] @punctuation.delimiter - -[ - "(" - ")" - "<<" - ">>" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -"%" @punctuation.special - -; Identifiers -(identifier) @variable - -; Unused Identifiers -((identifier) @comment - (#lua-match? @comment "^_")) - -; Comments -(comment) @comment @spell - -; Strings -(string) @string - -; Modules -(alias) @module - -; Atoms & Keywords -[ - (atom) - (quoted_atom) - (keyword) - (quoted_keyword) -] @string.special.symbol - -; Interpolation -(interpolation - [ - "#{" - "}" - ] @string.special) - -; Escape sequences -(escape_sequence) @string.escape - -; Integers -(integer) @number - -; Floats -(float) @number.float - -; Characters -[ - (char) - (charlist) -] @character - -; Booleans -(boolean) @boolean - -; Nil -(nil) @constant.builtin - -; Operators -(operator_identifier) @operator - -(unary_operator - operator: _ @operator) - -(binary_operator - operator: _ @operator) - -; Pipe Operator -(binary_operator - operator: "|>" - right: (identifier) @function) - -(dot - operator: _ @operator) - -(stab_clause - operator: _ @operator) - -; Local Function Calls -(call - target: (identifier) @function.call) - -; Remote Function Calls -(call - target: (dot - left: [ - (atom) @type - (_) - ] - right: (identifier) @function.call) - (arguments)) - -; Definition Function Calls -(call - target: ((identifier) @keyword.function - (#any-of? @keyword.function - "def" "defdelegate" "defexception" "defguard" "defguardp" "defimpl" "defmacro" "defmacrop" - "defmodule" "defn" "defnp" "defoverridable" "defp" "defprotocol" "defstruct")) - (arguments - [ - (call - (identifier) @function) - (identifier) @function - (binary_operator - left: (call - target: (identifier) @function) - operator: "when") - ])?) - -; Kernel Keywords & Special Forms -(call - target: ((identifier) @keyword - (#any-of? @keyword - "alias" "case" "catch" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require" - "reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with"))) - -; Special Constants -((identifier) @constant.builtin - (#any-of? @constant.builtin "__CALLER__" "__DIR__" "__ENV__" "__MODULE__" "__STACKTRACE__")) - -; Reserved Keywords -[ - "after" - "catch" - "do" - "end" - "fn" - "rescue" - "when" - "else" -] @keyword - -; Operator Keywords -[ - "and" - "in" - "not in" - "not" - "or" -] @keyword.operator - -; Capture Operator -(unary_operator - operator: "&" - operand: [ - (integer) @operator - (binary_operator - left: [ - (call - target: (dot - left: (_) - right: (identifier) @function)) - (identifier) @function - ] - operator: "/" - right: (integer) @operator) - ]) - -; Non-String Sigils -(sigil - "~" @string.special - (sigil_name) @string.special @_sigil_name - quoted_start: _ @string.special - quoted_end: _ @string.special - ((sigil_modifiers) @string.special)? - (#not-any-of? @_sigil_name "s" "S")) - -; String Sigils -(sigil - "~" @string - (sigil_name) @string @_sigil_name - quoted_start: _ @string - (quoted_content) @string - quoted_end: _ @string - ((sigil_modifiers) @string)? - (#any-of? @_sigil_name "s" "S")) - -; Module attributes -(unary_operator - operator: "@" - operand: [ - (identifier) - (call - target: (identifier)) - ] @constant) @constant - -; Documentation -(unary_operator - operator: "@" - operand: (call - target: ((identifier) @_identifier - (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) @comment.documentation - (arguments - [ - (string) - (boolean) - (charlist) - (sigil - "~" @comment.documentation - (sigil_name) @comment.documentation - quoted_start: _ @comment.documentation - (quoted_content) @comment.documentation - quoted_end: _ @comment.documentation) - ] @comment.documentation))) @comment.documentation diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/indents.scm deleted file mode 100644 index 5470b64..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/indents.scm +++ /dev/null @@ -1,25 +0,0 @@ -[ - (block) - (do_block) - (list) - (map) - (stab_clause) - (tuple) - (arguments) -] @indent.begin - -[ - ")" - "]" - "after" - "catch" - "else" - "rescue" - "}" - "end" -] @indent.end @indent.branch - -; Elixir pipelines are not indented, but other binary operator chains are -((binary_operator - operator: _ @_operator) @indent.begin - (#not-eq? @_operator "|>")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/injections.scm deleted file mode 100644 index f70fd98..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/injections.scm +++ /dev/null @@ -1,59 +0,0 @@ -; Comments -((comment) @injection.content - (#set! injection.language "comment")) - -; Documentation -(unary_operator - operator: "@" - operand: (call - target: ((identifier) @_identifier - (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) - (arguments - [ - (string - (quoted_content) @injection.content) - (sigil - (quoted_content) @injection.content) - ]) - (#set! injection.language "markdown"))) - -; HEEx -(sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content - (#any-of? @_sigil_name "H" "LVN") - (#set! injection.language "heex")) - -; Surface -(sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content - (#eq? @_sigil_name "F") - (#set! injection.language "surface")) - -; Zigler -(sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content - (#any-of? @_sigil_name "E" "L") - (#set! injection.language "eex")) - -(sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content - (#any-of? @_sigil_name "z" "Z") - (#set! injection.language "zig")) - -; Regex -(sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content - (#any-of? @_sigil_name "r" "R") - (#set! injection.language "regex")) - -; Json -(sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content - (#any-of? @_sigil_name "j" "J") - (#set! injection.language "json")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/locals.scm deleted file mode 100644 index ac9d86e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elixir/locals.scm +++ /dev/null @@ -1,200 +0,0 @@ -; References -(identifier) @local.reference - -(alias) @local.reference - -; Module Definitions -(call - target: ((identifier) @_identifier - (#eq? @_identifier "defmodule")) - (arguments - (alias) @local.definition.type)) - -; Pattern Match Definitions -(binary_operator - ; format-ignore - left: - [ - (identifier) @local.definition.var - (_ (identifier) @local.definition.var) - (_ (_ (identifier) @local.definition.var)) - (_ (_ (_ (identifier) @local.definition.var))) - (_ (_ (_ (_ (identifier) @local.definition.var)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.var))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))))) - ] - operator: "=") - -; Stab Clause Definitions -; format-ignore -(stab_clause - left: - [ - (arguments - [ - (identifier) @local.definition.var - (_ (identifier) @local.definition.var) - (_ (_ (identifier) @local.definition.var)) - (_ (_ (_ (identifier) @local.definition.var))) - (_ (_ (_ (_ (identifier) @local.definition.var)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.var))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))))) - ]) - - (binary_operator - left: - (arguments - ; format-ignore - [ - (identifier) @local.definition.var - (_ (identifier) @local.definition.var) - (_ (_ (identifier) @local.definition.var)) - (_ (_ (_ (identifier) @local.definition.var))) - (_ (_ (_ (_ (identifier) @local.definition.var)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.var))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))))) - ]) - operator: "when") - ]) - -; Aliases -; format-ignore -(call - target: - ((identifier) @_identifier - (#any-of? @_identifier "require" "alias" "use" "import")) - (arguments - [ - (alias) @local.definition.import - (_ (alias) @local.definition.import) - (_ (_ (alias) @local.definition.import)) - (_ (_ (_ (alias) @local.definition.import))) - (_ (_ (_ (_ (alias) @local.definition.import)))) - ])) - -; Local Function Definitions & Scopes -; format-ignore -(call - target: - ((identifier) @_identifier - (#any-of? @_identifier "def" "defp" "defmacro" "defmacrop" "defguard" "defguardp" "defn" "defnp" "for")) - (arguments - [ - (identifier) @local.definition.function - (binary_operator - left: (identifier) @local.definition.function - operator: "when") - (binary_operator - (identifier) @local.definition.parameter) - (call - target: (identifier) @local.definition.function - (arguments - [ - (identifier) @local.definition.parameter - (_ (identifier) @local.definition.parameter) - (_ (_ (identifier) @local.definition.parameter)) - (_ (_ (_ (identifier) @local.definition.parameter))) - (_ (_ (_ (_ (identifier) @local.definition.parameter)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))))) - ])) - ]?) - (#set! definition.function.scope parent)(do_block)?) @local.scope - -; ExUnit Test Definitions & Scopes -; format-ignore -(call - target: - ((identifier) @_identifier - (#eq? @_identifier "test")) - (arguments - [ - (string) - ((string) - . - "," - . - [ - (identifier) @local.definition.parameter - (_ (identifier) @local.definition.parameter) - (_ (_ (identifier) @local.definition.parameter)) - (_ (_ (_ (identifier) @local.definition.parameter))) - (_ (_ (_ (_ (identifier) @local.definition.parameter)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))))) - ]) - ]) - (do_block)?) @local.scope - -; Stab Clause Scopes -(stab_clause) @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/folds.scm deleted file mode 100644 index 56987d9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/folds.scm +++ /dev/null @@ -1,14 +0,0 @@ -((function_call_expr) @_fn - (#not-has-parent? @_fn parenthesized_expr)) @fold - -[ - (case_of_branch) - (case_of_expr) - (value_declaration) - (type_declaration) - (type_alias_declaration) - (list_expr) - (record_expr) - (parenthesized_expr) - (import_clause)+ -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/highlights.scm deleted file mode 100644 index cfa09ca..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/highlights.scm +++ /dev/null @@ -1,229 +0,0 @@ -[ - (line_comment) - (block_comment) -] @comment @spell - -((block_comment) @comment.documentation - (#lua-match? @comment.documentation "^{[-]|[^|]")) - -; Keywords -;--------- -[ - "if" - "then" - "else" - (case) - (of) -] @keyword.conditional - -[ - "let" - "in" - (as) - (port) - (alias) - (infix) - (module) - (type) -] @keyword - -[ - (import) - (exposing) -] @keyword.import - -; Punctuation -;------------ -(double_dot) @punctuation.special - -[ - "," - "|" - (dot) -] @punctuation.delimiter - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @punctuation.bracket - -; Variables -;---------- -(value_qid - (lower_case_identifier) @variable) - -(value_declaration - (function_declaration_left - (lower_case_identifier) @variable)) - -(type_annotation - (lower_case_identifier) @variable) - -(port_annotation - (lower_case_identifier) @variable) - -(anything_pattern - (underscore) @character.special) - -(record_base_identifier - (lower_case_identifier) @variable) - -(lower_pattern - (lower_case_identifier) @variable) - -(exposed_value - (lower_case_identifier) @variable) - -(value_qid - ((dot) - (lower_case_identifier) @variable.member)) - -(field_access_expr - ((dot) - (lower_case_identifier) @variable.member)) - -(function_declaration_left - (anything_pattern - (underscore) @character.special)) - -(function_declaration_left - (lower_pattern - (lower_case_identifier) @variable.parameter)) - -; Functions -;---------- -(value_declaration - functionDeclarationLeft: (function_declaration_left - (lower_case_identifier) @function - (pattern))) - -(value_declaration - functionDeclarationLeft: (function_declaration_left - (lower_case_identifier) @function - pattern: (_))) - -(value_declaration - functionDeclarationLeft: (function_declaration_left - (lower_case_identifier) @function) - body: (anonymous_function_expr)) - -(type_annotation - name: (lower_case_identifier) @function - typeExpression: (type_expression - (arrow))) - -(port_annotation - name: (lower_case_identifier) @function - typeExpression: (type_expression - (arrow))) - -(function_call_expr - target: (value_expr - (value_qid - (lower_case_identifier) @function.call))) - -; Operators -;---------- -[ - (operator_identifier) - (eq) - (colon) - (arrow) - (backslash) - "::" -] @operator - -; Modules -;-------- -(module_declaration - (upper_case_qid - (upper_case_identifier) @module)) - -(import_clause - (upper_case_qid - (upper_case_identifier) @module)) - -(as_clause - (upper_case_identifier) @module) - -(value_expr - (value_qid - (upper_case_identifier) @module)) - -; Types -;------ -(type_declaration - (upper_case_identifier) @type) - -(type_ref - (upper_case_qid - (upper_case_identifier) @type)) - -(type_variable - (lower_case_identifier) @type) - -(lower_type_name - (lower_case_identifier) @type) - -(exposed_type - (upper_case_identifier) @type) - -(type_alias_declaration - (upper_case_identifier) @type.definition) - -(field_type - name: (lower_case_identifier) @property) - -(field - name: (lower_case_identifier) @property) - -(type_declaration - (union_variant - (upper_case_identifier) @constructor)) - -(nullary_constructor_argument_pattern - (upper_case_qid - (upper_case_identifier) @constructor)) - -(union_pattern - (upper_case_qid - (upper_case_identifier) @constructor)) - -(value_expr - (upper_case_qid - (upper_case_identifier)) @constructor) - -; Literals -;--------- -(number_constant_expr - (number_literal) @number) - -(upper_case_qid - ((upper_case_identifier) @boolean - (#any-of? @boolean "True" "False"))) - -[ - (open_quote) - (close_quote) -] @string - -(string_constant_expr - (string_escape) @string) - -(string_constant_expr - (regular_string_part) @string) - -[ - (open_char) - (close_char) -] @character - -(char_constant_expr - (string_escape) @character) - -(char_constant_expr - (regular_string_part) @character) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/injections.scm deleted file mode 100644 index 7ee6c7f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elm/injections.scm +++ /dev/null @@ -1,8 +0,0 @@ -([ - (line_comment) - (block_comment) -] @injection.content - (#set! injection.language "comment")) - -((glsl_content) @injection.content - (#set! injection.language "glsl")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/folds.scm deleted file mode 100644 index afdfec3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(reduction) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/highlights.scm deleted file mode 100644 index 1a974bd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/highlights.scm +++ /dev/null @@ -1,36 +0,0 @@ -; Keywords -[ - "eval" - "let" -] @keyword - -; Function -(function) @function - -; Method -(method) @function.method - -; Parameter -(parameter) @variable.parameter - -; Variables -(identifier) @variable - -; Operators -[ - "\\" - "->" - "=" - (step) -] @operator - -; Punctuation -[ - "(" - ")" -] @punctuation.bracket - -":" @punctuation.delimiter - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/indents.scm deleted file mode 100644 index 6ddd1aa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/indents.scm +++ /dev/null @@ -1,6 +0,0 @@ -(reduction) @indent.begin - -[ - (ERROR) - (comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/locals.scm deleted file mode 100644 index 3e8197a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elsa/locals.scm +++ /dev/null @@ -1,12 +0,0 @@ -[ - (source_file) - (reduction) -] @local.scope - -(identifier) @local.reference - -(function) @local.definition.function - -(method) @local.definition.method - -(parameter) @local.definition.parameter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elvish/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elvish/highlights.scm deleted file mode 100644 index 9836a6c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elvish/highlights.scm +++ /dev/null @@ -1,157 +0,0 @@ -(comment) @comment @spell - -[ - "if" - "elif" -] @keyword.conditional - -(if - (else - "else" @keyword.conditional)) - -[ - "while" - "for" -] @keyword.repeat - -(while - (else - "else" @keyword.repeat)) - -(for - (else - "else" @keyword.repeat)) - -[ - "try" - "catch" - "finally" -] @keyword.exception - -(try - (else - "else" @keyword.exception)) - -"use" @keyword.import - -(import - (bareword) @string.special.path) - -(wildcard - [ - "*" - "**" - "?" - ] @character.special) - -(command - argument: (bareword) @variable.parameter) - -(command - head: (identifier) @function.call) - -((command - head: (identifier) @keyword.return) - (#eq? @keyword.return "return")) - -((command - (identifier) @keyword.operator) - (#any-of? @keyword.operator "and" "or" "coalesce")) - -[ - "+" - "-" - "*" - "/" - "%" - "<" - "<=" - "==" - "!=" - ">" - ">=" - "s" - ">=s" -] @function.builtin - -[ - ">" - "<" - ">>" - "<>" - "|" -] @operator - -(io_port) @number - -(function_definition - "fn" @keyword.function - (identifier) @function) - -(parameter_list) @variable.parameter - -(parameter_list - "|" @punctuation.bracket) - -[ - "var" - "set" - "tmp" - "del" -] @keyword - -(variable_declaration - (lhs - (identifier) @variable)) - -(variable_assignment - (lhs - (identifier) @variable)) - -(temporary_assignment - (lhs - (identifier) @variable)) - -(variable_deletion - (identifier) @variable) - -(number) @number - -(string) @string - -(variable - (identifier) @variable) - -((variable - (identifier) @function) - (#lua-match? @function ".+[~]$")) - -((variable - (identifier) @boolean) - (#any-of? @boolean "true" "false")) - -((variable - (identifier) @constant.builtin) - (#any-of? @constant.builtin - "_" "after-chdir" "args" "before-chdir" "buildinfo" "nil" "notify-bg-job-success" "num-bg-jobs" - "ok" "paths" "pid" "pwd" "value-out-indicator" "version")) - -[ - "$" - "@" -] @punctuation.special - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -";" @punctuation.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elvish/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/elvish/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/elvish/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/embedded_template/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/embedded_template/highlights.scm deleted file mode 100644 index 410983d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/embedded_template/highlights.scm +++ /dev/null @@ -1,12 +0,0 @@ -(comment_directive) @comment @spell - -[ - "<%#" - "<%" - "<%=" - "<%_" - "<%-" - "%>" - "-%>" - "_%>" -] @keyword diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/embedded_template/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/embedded_template/injections.scm deleted file mode 100644 index cdeb2cd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/embedded_template/injections.scm +++ /dev/null @@ -1,7 +0,0 @@ -((content) @injection.content - (#set! injection.language "html") - (#set! injection.combined)) - -((code) @injection.content - (#set! injection.language "ruby") - (#set! injection.combined)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/folds.scm deleted file mode 100644 index dd2b862..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/folds.scm +++ /dev/null @@ -1,10 +0,0 @@ -[ - (block) - (switch) - (formal_parameters) - (actual_parameters) - (decl_class) - (decl_enum) - (comment_block) - (doc_block) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/highlights.scm deleted file mode 100644 index aa8fb9b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/highlights.scm +++ /dev/null @@ -1,190 +0,0 @@ -[ - (comment_line) - (comment_block) -] @comment @spell - -[ - (doc_line) - (doc_block) -] @comment.documentation @spell - -(literal_bool) @boolean - -(literal_int) @number - -(literal_float) @number.float - -(literal_string) @string - -(escape_sequence) @string.escape - -(identifier) @variable - -(formal_parameter - name: (identifier) @variable.parameter) - -((identifier) @constant - (#lua-match? @constant "^[A-Z_][A-Z%d_]+$")) - -; Preprocessor directives -[ - (include) - (define) - (ifdef) - (ifndef) - (else) - (endif) -] @keyword.directive - -(preproc_const) @constant.macro - -; Constant fields -(decl_field - ((field_modifier) @_modifier - (#eq? @_modifier "const")) - type: (_) - name: (identifier) @constant) - -(enum_member - name: (identifier) @constant) - -[ - "+" - "-" - "*" - "/" - "%" - "^" - "++" - "--" - "=" - "+=" - "-=" - "*=" - "/=" - "&=" - "^=" - "|=" - "<<=" - ">>=" - "<" - "<=" - ">=" - ">" - "==" - "!=" - "!" - "&&" - "||" - ">>" - "<<" - "&" - "|" - "^" - "~" -] @operator - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -; TODO: <> in decl_class -(types - [ - "<" - ">" - ] @punctuation.bracket) - -[ - "," - "." - ":" - ";" -] @punctuation.delimiter - -[ - "default" - "extends" -] @keyword - -[ - "new" - "delete" -] @keyword.operator - -"return" @keyword.return - -[ - "if" - "else" - "switch" - "case" -] @keyword.conditional - -[ - "while" - "for" - "foreach" - "continue" - "break" -] @keyword.repeat - -[ - "enum" - "class" - "typedef" -] @keyword.type - -[ - (variable_modifier) - (method_modifier) - (class_modifier) - (field_modifier) - (formal_parameter_modifier) -] @keyword.modifier - -"ref" @type - -(decl_class - typename: (identifier) @type) - -(decl_class - superclass: (superclass - typename: (identifier) @type)) - -(decl_enum - typename: (identifier) @type) - -(type_identifier - (identifier) @type) - -[ - "auto" - (type_primitive) -] @type.builtin - -[ - (super) - (this) -] @variable.builtin - -(literal_null) @constant.builtin - -(decl_method - name: (identifier) @function.method) - -(invokation - invoked: (identifier) @function.method.call) - -; Constructor and deconstructor (function with same name of the class) -(decl_class - typename: (identifier) @_classname - body: (class_body - (decl_method - name: (identifier) @constructor - (#eq? @constructor @_classname)))) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/indents.scm deleted file mode 100644 index b1dc79b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/indents.scm +++ /dev/null @@ -1,30 +0,0 @@ -[ - (block) - (class_body) - (enum_body) - (switch_body) - (array_creation) - (formal_parameters) - (actual_parameters) -] @indent.begin - -[ - "(" - ")" - "[" - "]" - "}" -] @indent.branch - -[ - ")" - "]" - "}" -] @indent.end - -(comment_line) @indent.ignore - -[ - (ERROR) - (comment_block) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/injections.scm deleted file mode 100644 index 9231a44..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/injections.scm +++ /dev/null @@ -1,13 +0,0 @@ -([ - (comment_block) - (comment_line) -] @injection.content - (#set! injection.language "comment")) - -([ - (doc_block) - (doc_line) -] @injection.content - (#set! injection.language "doxygen")) - -; TODO: string and print (numbered) format injection diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/locals.scm deleted file mode 100644 index 9f62f9d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/enforce/locals.scm +++ /dev/null @@ -1,40 +0,0 @@ -; Scopes -(compilation_unit) @local.scope - -(decl_class - body: (_) @local.scope) - -(decl_enum - body: (_) @local.scope) - -(decl_method) @local.scope - -(block) @local.scope - -(if) @local.scope - -(for) @local.scope - -(foreach) @local.scope - -(while) @local.scope - -; Definitions -(decl_class - typename: (identifier) @local.definition.type) - -(decl_enum - typename: (identifier) @local.definition.enum) - -(decl_method - name: (identifier) @local.definition.method) - -(decl_variable - (_)* - (identifier) @local.definition.var) - -; References -(identifier) @local.reference - -(type_identifier - (identifier) @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/folds.scm deleted file mode 100644 index 65c2d8e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/folds.scm +++ /dev/null @@ -1,9 +0,0 @@ -[ - (fun_decl) - (anonymous_fun) - (case_expr) - (maybe_expr) - (map_expr) - (export_attribute) - (export_type_attribute) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/highlights.scm deleted file mode 100644 index 8bba348..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/highlights.scm +++ /dev/null @@ -1,184 +0,0 @@ -((atom) @constant - (#set! priority "90")) - -(var) @variable - -(char) @character - -(integer) @number - -(float) @number.float - -(comment) @comment @spell - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^[%%][%%]")) - -; keyword -[ - "fun" - "div" -] @keyword - -; bracket -[ - "(" - ")" - "{" - "}" - "[" - "]" - "#" -] @punctuation.bracket - -; Comparisons -[ - "==" - "=:=" - "=/=" - "=<" - ">=" - "<" - ">" -] @operator ; .comparison - -; operator -[ - ":" - ":=" - "!" - ; "-" - "+" - "=" - "->" - "=>" - "|" - "?=" -] @operator - -[ - "," - "." - ";" -] @punctuation.delimiter - -; conditional -[ - "receive" - "if" - "case" - "of" - "when" - "after" - "begin" - "end" - "maybe" - "else" -] @keyword.conditional - -[ - "catch" - "try" -] @keyword.exception - -((atom) @boolean - (#any-of? @boolean "true" "false")) - -; Macros -((macro_call_expr) @constant.macro - (#set! priority 101)) - -; Preprocessor -(pp_define - lhs: _ @constant.macro - (#set! priority 101)) - -(_preprocessor_directive) @keyword.directive -(#set! priority 99) - -; Attributes -(pp_include) @keyword.import - -(pp_include_lib) @keyword.import - -(export_attribute) @keyword.import - -(export_type_attribute) @type.definition - -(export_type_attribute - types: (fa - fun: _ @type - (#set! priority 101))) - -(behaviour_attribute) @keyword.import - -(module_attribute - (atom) @module) @keyword.import - -(wild_attribute - name: (attr_name - name: _ @attribute)) @attribute - -; Records -(record_expr) @type - -(record_field_expr - _ @variable.member) @type - -(record_field_name - _ @variable.member) @type - -(record_name - "#" @type - name: _ @type) @type - -(record_decl - name: _ @type) @type.definition - -(record_field - name: _ @variable.member) - -(record_field - name: _ @variable.member - ty: _ @type) - -; Type alias -(type_alias - name: _ @type) @type.definition - -(spec) @type.definition - -[ - (string) - (binary) -] @string - -; expr_function_call -(call - expr: [ - (atom) - (remote) - (var) - ] @function) - -(call - (atom) @keyword.exception - (#any-of? @keyword.exception "error" "throw" "exit")) - -; Parenthesized expression: (SomeFunc)(), only highlight the parens -(call - expr: (paren_expr - "(" @function.call - ")" @function.call)) - -; function -(external_fun) @function.call - -(internal_fun - fun: (atom) @function.call) - -(function_clause - name: (atom) @function) - -(fa - fun: (atom) @function) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/erlang/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/folds.scm deleted file mode 100644 index 7d8bafc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/folds.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (service) - (method) - (dto) - (enum) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/highlights.scm deleted file mode 100644 index 592bf53..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/highlights.scm +++ /dev/null @@ -1,90 +0,0 @@ -[ - ";" - "." - "," -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -(comment) @comment @spell - -(doc_comment) @comment.documentation @spell - -[ - "service" - "errors" -] @keyword - -[ - "method" - "event" -] @keyword.function - -[ - "enum" - "data" -] @keyword.type - -"extern" @keyword.modifier - -(type) @type.builtin - -(service - service_name: (identifier) @type) - -(error_set - (identifier) @variable.member) - -(error_set - name: (identifier) @type) - -(dto - name: (identifier) @type) - -(external_dto - name: (identifier) @type) - -(enum - (values_block - (identifier) @constant)) - -(enum - name: (identifier) @type) - -(external_enum - name: (identifier) @type) - -(type - name: (identifier) @type) - -[ - "map" - "nullable" - "result" - "required" - "http" - "csharp" - "js" - "info" - "obsolete" -] @attribute.builtin - -(parameter - name: (identifier) @variable.parameter) - -(field - name: (identifier) @variable.member) - -(method - name: (identifier) @function.method) - -(number_literal) @number - -(string_literal) @string diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/indents.scm deleted file mode 100644 index 247949b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/indents.scm +++ /dev/null @@ -1,7 +0,0 @@ -[ - (service_block) - (values_block) - (field_list) -] @indent.begin - -"}" @indent.branch diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/injections.scm deleted file mode 100644 index 5d9b783..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/facility/injections.scm +++ /dev/null @@ -1,8 +0,0 @@ -((remarks) @injection.content - (#set! injection.language "markdown")) - -([ - (comment) - (doc_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/faust/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/faust/highlights.scm deleted file mode 100644 index 6e7ef1d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/faust/highlights.scm +++ /dev/null @@ -1,219 +0,0 @@ -; Identifiers -(identifier) @variable - -[ - "process" - "effect" -] @variable.builtin - -(parameters - (identifier)) @variable.parameter - -(access - definition: (identifier) @variable.member) - -(global_metadata - key: (identifier) @variable.member) - -(function_metadata - function_name: (identifier) @variable.member) - -; Literals -(_ - filename: (string)) @string.special.path - -(documentation) @string.documentation @spell - -[ - (string) - (fstring) -] @string - -(int) @number - -(real) @number.float - -; Types -(_ - type: [ - (int_type) - (float_type) - (any_type) - ]) @type.builtin - -[ - (single_precision) - (double_precision) - (quad_precision) - (fixed_point_precision) -] @attribute - -; Functions -(function_definition - name: (identifier) @function) - -(function_names) @function - -(function_call - (identifier) @function.call) - -(function_call - (access - definition: (identifier) @function.call)) - -[ - "exp" - "log" - "log10" - "sqrt" - "abs" - "floor" - "ceil" - "rint" - "round" - "acos" - "asin" - "atan" - "cos" - "sin" - "tan" - "atan2" - "int" - "float" - "pow" - "min" - "max" - "fmod" - "remainder" - "prefix" - "attach" - "enable" - "control" - "rdtable" - "rwtable" - "select2" - "select3" - "lowest" - "highest" - "assertbounds" - (par) - (seq) - (sum) - (prod) - (component) - (library) - (vslider_type) - (hslider_type) - (nentry_type) - (vbargraph_type) - (hbargraph_type) - (vgroup_type) - (hgroup_type) - (tgroup_type) - "button" - "checkbox" - "soundfile" - "inputs" - "outputs" - "route" -] @function.builtin - -; xor is a @keyword.operator -[ - (add) - (sub) - (mult) - (div) - (mod) - (pow) - (or) - (and) - (lshift) - (rshift) - (lt) - (le) - (gt) - (ge) - (eq) - (neq) - (delay) - (one_sample_delay) - "=" - "=>" - "->" -] @operator - -(recursive - "~" @operator) - -(sequential - ":" @operator) - -(split - "<:" @operator) - -(merge - ":>" @operator) - -(parallel - "," @operator) - -; Keywords -[ - (par) - (seq) - (sum) - (prod) -] @keyword.repeat - -(file_import - "import" @keyword.import) - -[ - (wire) - (cut) - (mem) - "declare" - "with" - "environment" - "case" - "ffunction" - "fconstant" - "fvariable" -] @keyword - -(xor) @keyword.operator - -; Punctuation -[ - "," - ";" - "." -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -; Comments -(comment) @comment @spell - -; Tags -[ - "" - "" - "" - "" - "" - "" - "" - "" - "" -] @tag diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/faust/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/faust/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/faust/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/folds.scm deleted file mode 100644 index 0862e59..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/folds.scm +++ /dev/null @@ -1,51 +0,0 @@ -; compounds -[ - (list) - (table) - (sequence) -] @fold - -; sub-forms / special compounds -[ - (list_binding) - (table_binding) - (sequence_binding) - (table_metadata) - (sequence_arguments) - (let_vars) - (case_guard_or_special) - (case_guard) - (case_catch) -] @fold - -; forms -[ - (quote_form) - (unquote_form) - (local_form) - (var_form) - (set_form) - (global_form) - (let_form) - (fn_form) - (lambda_form) - (hashfn_form) - (each_form) - (collect_form) - (icollect_form) - (accumulate_form) - (for_form) - (fcollect_form) - (faccumulate_form) - (case_form) - (match_form) - (case_try_form) - (match_try_form) -] @fold - -; reader macros -(quote_reader_macro - expression: (_) @fold) - -(quasi_quote_reader_macro - expression: (_) @fold) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/highlights.scm deleted file mode 100644 index 2f0b5f7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/highlights.scm +++ /dev/null @@ -1,193 +0,0 @@ -; Most primitive nodes -(shebang) @keyword.directive - -(comment) @comment @spell - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @punctuation.bracket - -[ - (nil) - (nil_binding) -] @constant.builtin - -[ - (boolean) - (boolean_binding) -] @boolean - -[ - (number) - (number_binding) -] @number - -[ - (string) - (string_binding) -] @string - -[ - (symbol) - (symbol_binding) -] @variable - -(symbol_option) @keyword.directive - -(escape_sequence) @string.escape - -(multi_symbol - "." @punctuation.delimiter - member: (symbol_fragment) @variable.member) - -(list - call: (symbol) @function.call) - -(list - call: (multi_symbol - member: (symbol_fragment) @function.call .)) - -(multi_symbol_method - ":" @punctuation.delimiter - method: (symbol_fragment) @function.method.call) - -(quasi_quote_reader_macro - macro: _ @punctuation.special) - -(quote_reader_macro - macro: _ @punctuation.special) - -(unquote_reader_macro - macro: _ @punctuation.special) - -(hashfn_reader_macro - macro: _ @keyword.function) - -(sequence_arguments - (symbol_binding) @variable.parameter) - -(sequence_arguments - (rest_binding - rhs: (symbol_binding) @variable.parameter)) - -(docstring) @string.documentation - -(fn_form - name: [ - (symbol) @function - (multi_symbol - member: (symbol_fragment) @function .) - ]) - -(lambda_form - name: [ - (symbol) @function - (multi_symbol - member: (symbol_fragment) @function .) - ]) - -; NOTE: The macro name is highlighted as @variable because it -; gives a nicer contrast instead of everything being the same -; color. Rust queries use this workaround too for `macro_rules!`. -(macro_form - name: [ - (symbol) @variable - (multi_symbol - member: (symbol_fragment) @variable .) - ]) - -((symbol) @variable.parameter - (#any-of? @variable.parameter "$" "$...")) - -((symbol) @variable.parameter - (#lua-match? @variable.parameter "^%$[1-9]$")) - -((symbol) @operator - (#any-of? @operator - ; arithmetic - "+" "-" "*" "/" "//" "%" "^" - ; comparison - ">" "<" ">=" "<=" "=" "~=" - ; other - "#" "." "?." "..")) - -((symbol) @keyword.operator - (#any-of? @keyword.operator - ; comparison - "not=" - ; boolean - "and" "or" "not" - ; bitwise - "lshift" "rshift" "band" "bor" "bxor" "bnot" - ; other - "length")) - -(case_guard - call: (_) @keyword.conditional) - -(case_guard_or_special - call: (_) @keyword.conditional) - -((symbol) @keyword.function - (#any-of? @keyword.function "fn" "lambda" "λ" "hashfn")) - -((symbol) @keyword.repeat - (#any-of? @keyword.repeat "for" "each" "while")) - -((symbol) @keyword.conditional - (#any-of? @keyword.conditional "if" "when" "match" "case" "match-try" "case-try")) - -((symbol) @keyword - (#any-of? @keyword - "global" "local" "let" "set" "var" "comment" "do" "doc" "eval-compiler" "lua" "macros" "unquote" - "quote" "tset" "values" "tail!")) - -((symbol) @keyword.import - (#any-of? @keyword.import "require-macros" "import-macros" "include")) - -((symbol) @function.macro - (#any-of? @function.macro - "collect" "icollect" "fcollect" "accumulate" "faccumulate" "->" "->>" "-?>" "-?>>" "?." "doto" - "macro" "macrodebug" "partial" "pick-args" "pick-values" "with-open")) - -(case_catch - call: (symbol) @keyword) - -(import_macros_form - imports: (table_binding - (table_binding_pair - value: (symbol_binding) @function.macro))) - -; TODO: Highlight builtin methods (`table.unpack`, etc) as @function.builtin -([ - (symbol) @module.builtin - (multi_symbol - base: (symbol_fragment) @module.builtin) -] - (#any-of? @module.builtin - "vim" "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8")) - -([ - (symbol) @variable.builtin - (multi_symbol - . - (symbol_fragment) @variable.builtin) -] - (#eq? @variable.builtin "arg")) - -((symbol) @variable.builtin - (#eq? @variable.builtin "...")) - -((symbol) @constant.builtin - (#eq? @constant.builtin "_VERSION")) - -((symbol) @function.builtin - (#any-of? @function.builtin - "assert" "collectgarbage" "dofile" "error" "getmetatable" "ipairs" "load" "loadfile" "next" - "pairs" "pcall" "print" "rawequal" "rawget" "rawlen" "rawset" "require" "select" "setmetatable" - "tonumber" "tostring" "type" "warn" "xpcall" "module" "setfenv" "loadstring" "unpack")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/injections.scm deleted file mode 100644 index f6724d3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/injections.scm +++ /dev/null @@ -1,134 +0,0 @@ -((comment_body) @injection.content - (#set! injection.language "comment")) - -(list - call: (multi_symbol) @_vimcmd_identifier - (#any-of? @_vimcmd_identifier "vim.cmd" "vim.api.nvim_command" "vim.api.nvim_exec2") - . - item: (string - (string_content) @injection.content - (#set! injection.language "vim"))) - -; NOTE: Matches *exactly* `ffi.cdef` -(list - call: (multi_symbol) @_cdef_identifier - (#eq? @_cdef_identifier "ffi.cdef") - . - item: (string - (string_content) @injection.content - (#set! injection.language "c"))) - -(list - call: (multi_symbol) @_ts_query_identifier - (#any-of? @_ts_query_identifier "vim.treesitter.query.set" "vim.treesitter.query.parse") - . - item: (_) - . - item: (_) - . - item: (string - (string_content) @injection.content - (#set! injection.language "query"))) - -(list - call: (multi_symbol) @_vimcmd_identifier - (#eq? @_vimcmd_identifier "vim.api.nvim_create_autocmd") - . - item: (_) - . - item: (table - (table_pair - key: (string - (string_content) @_command - (#eq? @_command "command")) - value: (string - (string_content) @injection.content - (#set! injection.language "vim"))))) - -(list - call: (multi_symbol) @_user_cmd - (#eq? @_user_cmd "vim.api.nvim_create_user_command") - . - item: (_) - . - item: (string - (string_content) @injection.content - (#set! injection.language "vim"))) - -(list - call: (multi_symbol) @_user_cmd - (#eq? @_user_cmd "vim.api.nvim_buf_create_user_command") - . - item: (_) - . - item: (_) - . - item: (string - (string_content) @injection.content - (#set! injection.language "vim"))) - -(list - call: (multi_symbol) @_map - (#any-of? @_map "vim.api.nvim_set_keymap" "vim.keymap.set") - . - item: (_) - . - item: (_) - . - item: (string - (string_content) @injection.content - (#set! injection.language "vim"))) - -(list - call: (multi_symbol) @_map - (#eq? @_map "vim.api.nvim_buf_set_keymap") - . - item: (_) - . - item: (_) - . - item: (_) - . - item: (string - (string_content) @injection.content - (#set! injection.language "vim"))) - -; highlight string as query if starts with `; query` -(string - (string_content) @injection.content - (#lua-match? @injection.content "^%s*;+%s?query") - (#set! injection.language "query")) - -; (string.match "123" "%d+") -(list - call: (multi_symbol - member: (symbol_fragment) @_func - . - (#any-of? @_func "find" "match" "gmatch" "gsub")) - . - item: (_) - . - item: (string - (string_content) @injection.content - (#set! injection.language "luap") - (#set! injection.include-children))) - -; (my-string:match "%d+") -(list - call: (multi_symbol_method - method: (symbol_fragment) @_method - (#any-of? @_method "find" "match" "gmatch" "gsub")) - . - item: (string - (string_content) @injection.content - (#set! injection.language "luap") - (#set! injection.include-children))) - -; (string.format "pi = %.2f" 3.14159) -(list - call: (multi_symbol) @_func - (#eq? @_func "string.format") - . - item: (string - (string_content) @injection.content - (#set! injection.language "printf"))) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/locals.scm deleted file mode 100644 index be63e72..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fennel/locals.scm +++ /dev/null @@ -1,56 +0,0 @@ -(program) @local.scope - -(symbol) @local.reference - -[ - (let_form) - (fn_form) - (lambda_form) - (each_form) - (for_form) - (collect_form) - (icollect_form) - (accumulate_form) - (for_form) - (fcollect_form) - (faccumulate_form) - (case_form) - (match_form) - (case_try_form) - (match_try_form) - (if_form) -] @local.scope - -(list - call: (symbol) @_call - (#any-of? @_call "while" "when" "do")) @local.scope - -(fn_form - name: [ - (symbol) @local.definition.function - (multi_symbol - member: (symbol_fragment) @local.definition.function .) - ] - args: (sequence_arguments - (symbol_binding) @local.definition.parameter) - (#set! definition.function.scope "parent")) - -(lambda_form - name: [ - (symbol) @local.definition.function - (multi_symbol - member: (symbol_fragment) @local.definition.function .) - ] - args: (sequence_arguments - (symbol_binding) @local.definition.parameter) - (#set! definition.function.scope "parent")) - -(macro_form - name: [ - (symbol) @local.definition.function - (multi_symbol - member: (symbol_fragment) @local.definition.function .) - ] - args: (sequence_arguments - (symbol_binding) @local.definition.parameter) - (#set! definition.function.scope "parent")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/folds.scm deleted file mode 100644 index f524c45..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/folds.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (layout_declaration) - (protocol_declaration) - (resource_declaration) - (service_declaration) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/highlights.scm deleted file mode 100644 index f1960c6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/highlights.scm +++ /dev/null @@ -1,67 +0,0 @@ -[ - "ajar" - "alias" - "as" - "bits" - "closed" - "compose" - "const" - "error" - "flexible" - "library" - "open" - ; "optional" we did not specify a node for optional yet - "overlay" - "protocol" - "reserved" - "strict" - "using" -] @keyword - -[ - "enum" - "struct" - "table" - "union" - "resource" - "service" - "type" -] @keyword.type - -(primitives_type) @type.builtin - -(builtin_complex_type) @type.builtin - -(const_declaration - (identifier) @constant) - -[ - "=" - "|" - "&" - "->" -] @operator - -(attribute - "@" @attribute - (identifier) @attribute) - -(string_literal) @string - -(numeric_literal) @number - -[ - (true) - (false) -] @boolean - -(comment) @comment - -[ - "(" - ")" - "<" - ">" - "{" - "}" -] @punctuation.bracket diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fidl/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/folds.scm deleted file mode 100644 index 4c64e64..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/folds.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (circuit) - (module) - (when) - (else) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/highlights.scm deleted file mode 100644 index 0a90fa5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/highlights.scm +++ /dev/null @@ -1,198 +0,0 @@ -; Namespaces -(circuit - (identifier) @module) - -(module - (identifier) @module) - -; Types -((identifier) @type - (#lua-match? @type "^[A-Z][A-Za-z0-9_$]*$")) - -; Keywords -[ - "circuit" - "module" - "extmodule" - "flip" - "parameter" - "reset" - "wire" - "cmem" - "smem" - "mem" - "reg" - "with" - "mport" - "inst" - "of" - "node" - "is" - "invalid" - "skip" - "infer" - "read" - "write" - "rdwr" - "defname" -] @keyword - -; Qualifiers -(qualifier) @keyword.modifier - -; Storageclasses -[ - "input" - "output" -] @keyword.modifier - -; Conditionals -[ - "when" - "else" -] @keyword.conditional - -; Annotations -(info) @attribute - -; Builtins -[ - "stop" - "printf" - "assert" - "assume" - "cover" - "attach" - "mux" - "validif" -] @function.builtin - -[ - "UInt" - "SInt" - "Analog" - "Fixed" - "Clock" - "AsyncReset" - "Reset" -] @type.builtin - -; Fields -[ - "data-type" - "depth" - "read-latency" - "write-latency" - "read-under-write" - "reader" - "writer" - "readwriter" -] @variable.member - -((field_id) @variable.member - (#set! priority 105)) - -(port - (identifier) @variable.member) - -(wire - (identifier) @variable.member) - -(cmem - (identifier) @variable.member) - -(smem - (identifier) @variable.member) - -(memory - (identifier) @variable.member) - -(register - (identifier) @variable.member) - -; Parameters -(primitive_operation - (identifier) @variable.parameter) - -(mux - (identifier) @variable.parameter) - -(printf - (identifier) @variable.parameter) - -(reset - (identifier) @variable.parameter) - -(stop - (identifier) @variable.parameter) - -; Variables -(identifier) @variable - -; Operators -(primop) @keyword.operator - -[ - "+" - "-" - "=" - "=>" - "<=" - "<-" -] @operator - -; Literals -[ - (uint) - (number) -] @number - -(number_str) @string.special - -(double) @number.float - -(string) @string - -(escape_sequence) @string.escape - -[ - "old" - "new" - "undefined" -] @constant.builtin - -; Punctuation -[ - "{" - "}" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - "<" - ">" -] @punctuation.bracket - -[ - "(" - ")" -] @punctuation.bracket - -[ - "," - "." - ":" -] @punctuation.delimiter - -; Comments -(comment) @comment @spell - -[ - "=>" - "<=" - "=" -] @operator diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/indents.scm deleted file mode 100644 index e172e1e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/indents.scm +++ /dev/null @@ -1,12 +0,0 @@ -[ - (circuit) - (module) - (memory) - (when) - (else) -] @indent.begin - -[ - (ERROR) - (comment) -] @indent.auto diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/locals.scm deleted file mode 100644 index 97b7931..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/firrtl/locals.scm +++ /dev/null @@ -1,45 +0,0 @@ -; Scopes -[ - (source_file) - (circuit) - (module) - (else) - (when) -] @local.scope - -; References -(identifier) @local.reference - -; Definitions -(port - (identifier) @local.definition.field) - -(wire - (identifier) @local.definition.field) - -(cmem - (identifier) @local.definition.field) - -(smem - (identifier) @local.definition.field) - -(memory - (identifier) @local.definition.field) - -(register - (identifier) @local.definition.field) - -(circuit - (identifier) @local.definition.namespace) - -(module - (identifier) @local.definition.namespace) - -(parameter - (identifier) @local.definition.parameter) - -(rdwr - (identifier) @local.definition.var) - -(node - (identifier) @local.definition.var) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/folds.scm deleted file mode 100644 index 06363e1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/folds.scm +++ /dev/null @@ -1,8 +0,0 @@ -[ - (function_definition) - (if_statement) - (switch_statement) - (for_statement) - (while_statement) - (begin_statement) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/highlights.scm deleted file mode 100644 index a7c4511..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/highlights.scm +++ /dev/null @@ -1,204 +0,0 @@ -; Fish highlighting -; Operators -[ - "&&" - "||" - "|" - "&|" - "2>|" - "&" - ".." - "!" - (direction) - (stream_redirect) -] @operator - -; match operators of test command -(command - name: (word) @function.builtin - (#eq? @function.builtin "test") - argument: (word) @operator - (#match? @operator "^(!?\\=|-[a-zA-Z]+)$")) - -; match operators of [ command -(command - name: (word) @punctuation.bracket - (#eq? @punctuation.bracket "[") - argument: (word) @operator - (#match? @operator "^(!?\\=|-[a-zA-Z]+)$")) - -[ - "not" - "and" - "or" -] @keyword.operator - -; Conditionals -(if_statement - [ - "if" - "end" - ] @keyword.conditional) - -(switch_statement - [ - "switch" - "end" - ] @keyword.conditional) - -(case_clause - "case" @keyword.conditional) - -(else_clause - "else" @keyword.conditional) - -(else_if_clause - [ - "else" - "if" - ] @keyword.conditional) - -; Loops/Blocks -(while_statement - [ - "while" - "end" - ] @keyword.repeat) - -(for_statement - [ - "for" - "end" - ] @keyword.repeat) - -(begin_statement - [ - "begin" - "end" - ] @keyword.repeat) - -; Keywords -[ - "in" - (break) - (continue) -] @keyword - -"return" @keyword.return - -; Punctuation -[ - "[" - "]" - "{" - "}" - "(" - ")" -] @punctuation.bracket - -"," @punctuation.delimiter - -; Commands -(command - argument: [ - (word) @variable.parameter - (#lua-match? @variable.parameter "^[-]") - ]) - -(command_substitution - "$" @punctuation.special) - -; non-builtin command names -(command - name: (word) @function.call) - -; derived from builtin -n (fish 3.2.2) -(command - name: [ - (word) @function.builtin - (#any-of? @function.builtin - "." ":" "_" "alias" "argparse" "bg" "bind" "block" "breakpoint" "builtin" "cd" "command" - "commandline" "complete" "contains" "count" "disown" "echo" "emit" "eval" "exec" "exit" "fg" - "functions" "history" "isatty" "jobs" "math" "printf" "pwd" "random" "read" "realpath" "set" - "set_color" "source" "status" "string" "test" "time" "type" "ulimit" "wait") - ]) - -; Functions -(function_definition - [ - "function" - "end" - ] @keyword.function) - -(function_definition - name: [ - (word) - (concatenation) - ] @function) - -(function_definition - option: [ - (word) - (concatenation - (word)) - ] @variable.parameter - (#lua-match? @variable.parameter "^[-]")) - -; Strings -[ - (double_quote_string) - (single_quote_string) -] @string - -(escape_sequence) @string.escape - -; Variables -(variable_name) @variable - -(variable_expansion) @constant - -(variable_expansion - "$" @punctuation.special) @none - -; Reference: https://fishshell.com/docs/current/language.html#special-variables -((variable_name) @variable.builtin - (#any-of? @variable.builtin - "PATH" "CDPATH" "LANG" "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" "LC_MONETARY" "LC_NUMERIC" - "LC_TIME" "fish_color_normal" "fish_color_command" "fish_color_keyword" "fish_color_keyword" - "fish_color_redirection" "fish_color_end" "fish_color_error" "fish_color_param" - "fish_color_valid_path" "fish_color_option" "fish_color_comment" "fish_color_selection" - "fish_color_operator" "fish_color_escape" "fish_color_autosuggestion" "fish_color_cwd" - "fish_color_cwd_root" "fish_color_user" "fish_color_host" "fish_color_host_remote" - "fish_color_status" "fish_color_cancel" "fish_color_search_match" "fish_color_history_current" - "fish_pager_color_progress" "fish_pager_color_background" "fish_pager_color_prefix" - "fish_pager_color_completion" "fish_pager_color_description" - "fish_pager_color_selected_background" "fish_pager_color_selected_prefix" - "fish_pager_color_selected_completion" "fish_pager_color_selected_description" - "fish_pager_color_secondary_background" "fish_pager_color_secondary_prefix" - "fish_pager_color_secondary_completion" "fish_pager_color_secondary_description" - "fish_term24bit" "fish_term256" "fish_ambiguous_width" "fish_emoji_width" - "fish_autosuggestion_enabled" "fish_handle_reflow" "fish_key_bindings" "fish_escape_delay_ms" - "fish_sequence_key_delay_ms" "fish_complete_path" "fish_cursor_selection_mode" - "fish_function_path" "fish_greeting" "fish_history" "fish_trace" "FISH_DEBUG" - "FISH_DEBUG_OUTPUT" "fish_user_paths" "umask" "BROWSER" "_" "argv" "CMD_DURATION" "COLUMNS" - "LINES" "fish_kill_signal" "fish_killring" "fish_read_limit" "fish_pid" "history" "HOME" - "hostname" "IFS" "last_pid" "PWD" "pipestatus" "SHLVL" "status" "status_generation" "TERM" - "USER" "EUID" "version" "FISH_VERSION")) - -; Nodes -[ - (integer) - (float) -] @number - -(comment) @comment - -(comment) @spell - -((word) @boolean - (#any-of? @boolean "true" "false")) - -((program - . - (comment) @keyword.directive @nospell) - (#lua-match? @keyword.directive "^#!/")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/indents.scm deleted file mode 100644 index 4984c4c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/indents.scm +++ /dev/null @@ -1,18 +0,0 @@ -[ - (function_definition) - (while_statement) - (for_statement) - (if_statement) - (begin_statement) - (switch_statement) -] @indent.begin - -[ - "else" ; else and else if must both start the line with "else", so tag the string directly - "case" - "end" -] @indent.branch - -"end" @indent.end - -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/locals.scm deleted file mode 100644 index 904d568..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fish/locals.scm +++ /dev/null @@ -1,19 +0,0 @@ -; Scopes -[ - (command) - (function_definition) - (if_statement) - (for_statement) - (begin_statement) - (while_statement) - (switch_statement) -] @local.scope - -; Definitions -(function_definition - name: (word) @local.definition.function) - -; References -(variable_name) @local.reference - -(word) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/folds.scm deleted file mode 100644 index e05d0db..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/folds.scm +++ /dev/null @@ -1,8 +0,0 @@ -[ - (comment) - (list) - (dict_core) -] @fold - -(code - (code_body)* @fold) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/highlights.scm deleted file mode 100644 index 9c96f19..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/highlights.scm +++ /dev/null @@ -1,64 +0,0 @@ -; Comments -(comment) @comment @spell - -; Generic Key-value pairs and dictionary keywords -(key_value - keyword: (identifier) @function) - -(dict - key: (identifier) @type) - -; Macros -(macro - "$" @keyword.conditional - (prev_scope)* @keyword.conditional - (identifier)* @module) - -; Directives -"#" @keyword.conditional - -(preproc_call - directive: (identifier)* @keyword.conditional - argument: (identifier)* @module) - -((preproc_call - argument: (identifier)* @module) @keyword.conditional - (#eq? @keyword.conditional "ifeq")) - -((preproc_call) @keyword.conditional - (#any-of? @keyword.conditional "else" "endif")) - -; Literals -(number_literal) @number.float - -(string_literal) @string - -(escape_sequence) @string.escape - -(boolean) @boolean - -; Treat [m^2 s^-2] the same as if it was put in numbers format -(dimensions - dimension: (identifier) @number.float) - -; Punctuation -[ - "(" - ")" - "[" - "]" - "{" - "}" - "#{" - "#}" - "|-" - "-|" - "" - "$$" -] @punctuation.bracket - -";" @punctuation.delimiter - -((identifier) @constant.builtin - (#any-of? @constant.builtin "uniform" "non-uniform" "and" "or")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/indents.scm deleted file mode 100644 index be02b80..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/indents.scm +++ /dev/null @@ -1,11 +0,0 @@ -[ - "{" - "}" -] @indent.branch - -[ - (dict) - (key_value) -] @indent.begin - -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/injections.scm deleted file mode 100644 index b9f8f83..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/injections.scm +++ /dev/null @@ -1,23 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -; Pass code blocks to Cpp highlighter -(code - (code_body) @injection.content - (#set! injection.language "cpp")) - -; Pass identifiers to Go highlighter (Cheating I know) -; ((identifier) @injection.content -; (#set! injection.language "lua") -; Highlight regex syntax inside literal strings -((string_literal) @injection.content - (#set! injection.language "regex")) - -; Highlight PyFoam syntax as Python statements -(pyfoam_variable - code_body: (_) @injection.content - (#set! injection.language "python")) - -(pyfoam_expression - code_body: (_) @injection.content - (#set! injection.language "python")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/locals.scm deleted file mode 100644 index f3f6890..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/foam/locals.scm +++ /dev/null @@ -1,11 +0,0 @@ -(dict) @local.scope - -(dict - key: (_) @local.definition.type) - -(key_value - keyword: (_) @local.definition.parameter) - -(key_value - value: (macro - (identifier)*)* @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/folds.scm deleted file mode 100644 index 443abb3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/folds.scm +++ /dev/null @@ -1 +0,0 @@ -(word_definition) @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/highlights.scm deleted file mode 100644 index 1e72075..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/highlights.scm +++ /dev/null @@ -1,19 +0,0 @@ -(core) @function - -(operator) @operator - -(word) @variable - -((word) @constant - (#lua-match? @constant "^[A-Z_]+$")) - -(number) @number - -(string) @string - -[ - (start_definition) - (end_definition) -] @punctuation.delimiter - -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/indents.scm deleted file mode 100644 index 0677554..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/indents.scm +++ /dev/null @@ -1,3 +0,0 @@ -(word_definition) @indent.begin - -(end_definition) @indent.end @indent.branch diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/locals.scm deleted file mode 100644 index d91d3aa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/forth/locals.scm +++ /dev/null @@ -1,3 +0,0 @@ -(word) @local.reference - -(word_definition) @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/folds.scm deleted file mode 100644 index cedbdb6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/folds.scm +++ /dev/null @@ -1,11 +0,0 @@ -; by @oponkork -[ - (if_statement) - (where_statement) - (enum_statement) - (do_loop_statement) - (derived_type_definition) - (function) - (subroutine) - (interface) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/highlights.scm deleted file mode 100644 index 6a6dbba..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/highlights.scm +++ /dev/null @@ -1,319 +0,0 @@ -; Preprocs -(preproc_directive) @keyword.directive - -; Namespaces -(program_statement - (name) @module) - -(end_program_statement - (name) @module) - -(module_statement - (name) @module) - -(end_module_statement - (name) @module) - -(submodule_statement - (name) @module) - -(end_submodule_statement - (name) @module) - -; Includes -[ - "import" - "include" - "use" -] @keyword.import - -(import_statement - "," - [ - "all" - "none" - ] @keyword) - -; Attributes -[ - (none) - "implicit" - "intent" -] @attribute - -(implicit_statement - "type" @attribute) - -; Keywords -[ - "attributes" - "associate" - "block" - "classis" - "contains" - "default" - "dimension" - "endassociate" - "endselect" - "enumerator" - "equivalence" - "extends" - "goto" - "intrinsic" - "non_intrinsic" - "namelist" - "parameter" - "quiet" - "rank" - "save" - "selectcase" - "selectrank" - "selecttype" - "sequence" - "stop" - "target" - "typeis" -] @keyword - -[ - "class" - "enum" - "endenum" - "type" - "endtype" - "module" - "endmodule" - "submodule" - "endsubmodule" - "interface" - "endinterface" -] @keyword.type - -(default) @keyword - -; Types -(type_name) @type - -(intrinsic_type) @type.builtin - -; Qualifiers -[ - "abstract" - "allocatable" - "automatic" - "constant" - "contiguous" - "data" - "deferred" - "device" - "external" - "family" - "final" - "generic" - "global" - "grid_global" - "host" - "initial" - "local" - "local_init" - "managed" - "nopass" - "non_overridable" - "optional" - "pass" - "pinned" - "pointer" - "private" - "property" - "protected" - "public" - "shared" - "static" - "texture" - "value" - "volatile" - (procedure_qualifier) -] @keyword.modifier - -[ - "common" - "in" - "inout" - "out" -] @keyword.modifier - -; Labels -[ - (statement_label) - (statement_label_reference) -] @label - -[ - "call" - "endfunction" - "endprogram" - "endprocedure" - "endsubroutine" - "function" - "procedure" - "program" - "subroutine" -] @keyword.function - -[ - "result" - "return" -] @keyword.return - -; Functions -(function_statement - (name) @function) - -(end_function_statement - (name) @function) - -(subroutine_statement - (name) @function) - -(end_subroutine_statement - (name) @function) - -(module_procedure_statement - (name) @function) - -(end_module_procedure_statement - (name) @function) - -(subroutine_call - (identifier) @function.call) - -[ - "character" - "close" - "bind" - "format" - "open" - "print" - "read" - "write" -] @function.builtin - -; Exceptions -"error" @keyword.exception - -; Conditionals -[ - "else" - "elseif" - "elsewhere" - "endif" - "endwhere" - "if" - "then" - "where" -] @keyword.conditional - -; Repeats -[ - "do" - "concurrent" - "enddo" - "endforall" - "forall" - "while" - "continue" - "cycle" - "exit" -] @keyword.repeat - -; Variables -(identifier) @variable - -; Parameters -(keyword_argument - name: (identifier) @variable.parameter) - -(parameters - (identifier) @variable.parameter) - -; Properties -(derived_type_member_expression - (type_member) @variable.member) - -; Operators -[ - "+" - "-" - "*" - "**" - "/" - "=" - "<" - ">" - "<=" - ">=" - "==" - "/=" - "//" - (assumed_rank) -] @operator - -[ - "\\.and\\." - "\\.or\\." - "\\.eqv\\." - "\\.neqv\\." - "\\.lt\\." - "\\.gt\\." - "\\.le\\." - "\\.ge\\." - "\\.eq\\." - "\\.ne\\." - "\\.not\\." -] @keyword.operator - -; Punctuation -[ - "[" - "]" -] @punctuation.bracket - -[ - "(" - ")" -] @punctuation.bracket - -[ - "<<<" - ">>>" -] @punctuation.bracket - -(array_literal - [ - "(/" - "/)" - ] @punctuation.bracket) - -[ - ":" - "," - "/" - "%" - "::" - "=>" -] @punctuation.delimiter - -; Literals -(string_literal) @string - -(number_literal) @number - -(boolean_literal) @boolean - -(null_literal) @constant.builtin - -; Comments -(comment) @comment @spell - -((comment) @comment.documentation - (#lua-match? @comment.documentation "^!>")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/indents.scm deleted file mode 100644 index 86704c4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/indents.scm +++ /dev/null @@ -1,27 +0,0 @@ -[ - (module) - (program) - (subroutine) - (function) - ; (interface) - (if_statement) - (do_loop_statement) - (where_statement) - (derived_type_definition) - (enum) -] @indent.begin - -[ - (end_module_statement) - (end_program_statement) - (end_subroutine_statement) - (end_function_statement) - ; (end_interface_statement) - (end_if_statement) - (end_do_loop_statement) - (else_clause) - (elseif_clause) - (end_type_statement) - (end_enum_statement) - (end_where_statement) -] @indent.branch diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fortran/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsh/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsh/highlights.scm deleted file mode 100644 index 2354a20..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsh/highlights.scm +++ /dev/null @@ -1,97 +0,0 @@ -[ - "(" - ")" -] @punctuation.bracket - -[ - "^" - "=" - ":" -] @operator - -[ - "#" - ".." - "*" - "->" -] @punctuation.special - -; Entities -[ - "Profile" - "Alias" - "Extension" - "Invariant" - "Instance" - "ValueSet" - "CodeSystem" - "Mapping" - "Logical" - "Resource" - "RuleSet" -] @keyword - -; Metadata Keywords -[ - "Parent" - "Title" - "Description" - "Id" - "Severity" - "InstanceOf" - "Usage" - "Source" - "XPath" - "Target" -] @keyword - -; Rule Keywords -[ - "contentReference" - "insert" - "and" - "or" - "contains" - "named" - "only" - "obeys" - "valueset" - "codes" - "from" - "include" - "exclude" - "where" - "system" - "exactly" -] @keyword.operator - -; Types -[ - "Reference" - "Canonical" -] @type.builtin - -(sd_metadata - (parent - (name))) @type - -(target_type - (name)) @type - -; Strings -(string) @string - -(multiline_string) @string - -; Constants -(strength_value) @constant - -(bool) @boolean - -(flag) @constant - -; Special Params -(code_value) @variable.parameter - -; Extras -(fsh_comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsh/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsh/injections.scm deleted file mode 100644 index 7bf6d00..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsh/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((fsh_comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsharp/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsharp/highlights.scm deleted file mode 100644 index e400e35..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsharp/highlights.scm +++ /dev/null @@ -1,411 +0,0 @@ -[ - (line_comment) - (block_comment) -] @comment @spell - -((line_comment) @comment.documentation @spell - (#lua-match? @comment.documentation "^///")) - -(const - [ - (_) @constant - (unit) @constant.builtin - ]) - -(primary_constr_args - (_) @variable.parameter) - -(class_as_reference - (_) @variable.parameter.builtin) - -(type_name - type_name: (_) @type.definition) - -[ - (_type) - (atomic_type) -] @type - -(member_signature - . - (identifier) @function.method) - -(member_signature - (curried_spec - (arguments_spec - (argument_spec - (argument_name_spec - "?"? @character.special - name: (_) @variable.parameter))))) - -(union_type_case - (identifier) @constant) - -(rules - (rule - pattern: (_) @constant - block: (_))) - -(wildcard_pattern) @character.special - -(identifier_pattern - . - (_) @constant - . - (_) @variable) - -(optional_pattern - "?" @character.special) - -(fsi_directive_decl - . - (string) @module) - -(import_decl - . - (_) @module) - -(named_module - name: (_) @module) - -(namespace - name: (_) @module) - -(module_defn - (identifier) @module) - -(ce_expression - . - (_) @constant.macro) - -(field_initializer - field: (_) @property) - -(record_fields - (record_field - . - (identifier) @property)) - -(value_declaration_left - . - (_) @variable) - -(function_declaration_left - . - (_) @function) - -(argument_patterns - [ - (const) - (long_identifier) - (_pattern) - ] @variable.parameter) - -(argument_patterns - (typed_pattern - (_pattern) @variable.parameter - (_type) @type)) - -(argument_patterns - (record_pattern - (field_pattern - . - (long_identifier) @variable.parameter))) - -(argument_patterns - (array_pattern - (_pattern)? @variable.parameter)) - -(argument_patterns - (list_pattern - (_pattern)? @variable.parameter)) - -((argument_patterns - (long_identifier - (identifier) @character.special)) - (#lua-match? @character.special "^\_.*")) - -(member_defn - (method_or_prop_defn - [ - (property_or_ident) @function - (property_or_ident - instance: (identifier) @variable.parameter.builtin - method: (identifier) @function.method) - ] - args: (_)* @variable.parameter)) - -(dot_expression - . - (_) @variable.member - . - (_)) - -(application_expression - . - (_) @function.call - . - (_) @variable) - -((infix_expression - . - (_) - . - (infix_op) @operator - . - (_) @function.call) - (#eq? @operator "|>")) - -((infix_expression - . - (_) @function.call - . - (infix_op) @operator - . - (_)) - (#eq? @operator "<|")) - -[ - (xint) - (int) - (int16) - (uint16) - (int32) - (uint32) - (int64) - (uint64) - (nativeint) - (unativeint) -] @number - -[ - (ieee32) - (ieee64) - (float) - (decimal) -] @number.float - -(bool) @boolean - -[ - (string) - (triple_quoted_string) - (verbatim_string) - (char) -] @spell @string - -(compiler_directive_decl) @keyword.directive - -(preproc_line - "#line" @keyword.directive) - -(attribute - target: (identifier)? @keyword - (_type) @attribute) - -[ - "(" - ")" - "{" - "}" - ".[" - "[" - "]" - "[|" - "|]" - "{|" - "|}" -] @punctuation.bracket - -[ - "[<" - ">]" -] @punctuation.special - -(format_string_eval - [ - "{" - "}" - ] @punctuation.special) - -[ - "," - ";" - ":" - "." -] @punctuation.delimiter - -[ - "|" - "=" - ">" - "<" - "-" - "~" - "->" - "<-" - "&" - "&&" - "|" - "||" - ":>" - ":?>" - ".." - "*" - (infix_op) - (prefix_op) - (op_identifier) -] @operator - -(generic_type - [ - "<" - ">" - ] @punctuation.bracket) - -[ - "if" - "then" - "else" - "elif" - "when" - "match" - "match!" -] @keyword.conditional - -[ - "and" - "or" - "not" - "upcast" - "downcast" -] @keyword.operator - -[ - "return" - "return!" - "yield" - "yield!" -] @keyword.return - -[ - "for" - "while" - "downto" - "to" -] @keyword.repeat - -[ - "open" - "#r" - "#load" -] @keyword.import - -[ - "abstract" - "delegate" - "static" - "inline" - "mutable" - "override" - "rec" - "global" - (access_modifier) -] @keyword.modifier - -[ - "let" - "let!" - "use" - "use!" - "member" -] @keyword.function - -[ - "enum" - "type" - "inherit" - "interface" - "and" - "class" - "struct" -] @keyword.type - -((identifier) @keyword.exception - (#any-of? @keyword.exception "failwith" "failwithf" "raise" "reraise")) - -[ - "as" - "assert" - "begin" - "end" - "done" - "default" - "in" - "do" - "do!" - "fun" - "function" - "get" - "set" - "lazy" - "new" - "of" - "struct" - "val" - "module" - "namespace" - "with" -] @keyword - -[ - "null" - (unit) -] @constant.builtin - -(match_expression - "with" @keyword.conditional) - -(try_expression - [ - "try" - "with" - "finally" - ] @keyword.exception) - -(application_expression - (unit) @function.call) - -((_type - (long_identifier - (identifier) @type.builtin)) - (#any-of? @type.builtin - "bool" "byte" "sbyte" "int16" "uint16" "int" "uint" "int64" "uint64" "nativeint" "unativeint" - "decimal" "float" "double" "float32" "single" "char" "string" "unit")) - -(preproc_if - [ - "#if" @keyword.directive - "#endif" @keyword.directive - ] - condition: (_)? @keyword.directive) - -(preproc_else - "#else" @keyword.directive) - -((identifier) @module.builtin - (#any-of? @module.builtin - "Array" "Async" "Directory" "File" "List" "Option" "Path" "Map" "Set" "Lazy" "Seq" "Task" - "String" "Result")) - -((value_declaration - (attributes - (attribute - (_type - (long_identifier - (identifier) @attribute)))) - (function_or_value_defn - (value_declaration_left - . - (_) @constant))) - (#eq? @attribute "Literal")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsharp/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsharp/injections.scm deleted file mode 100644 index 211b263..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fsharp/injections.scm +++ /dev/null @@ -1,11 +0,0 @@ -([ - (line_comment) - (block_comment_content) -] @injection.content - (#set! injection.language "comment")) - -((line_comment) @injection.content - (#lua-match? @injection.content "^///") - (#offset! @injection.content 0 3 0 0) - (#set! injection.language "xml") - (#set! injection.combined)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/func/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/func/highlights.scm deleted file mode 100644 index 9fd6dd8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/func/highlights.scm +++ /dev/null @@ -1,167 +0,0 @@ -; Include -"#include" @keyword.import - -(include_path) @string - -; Preproc -"#pragma" @keyword.directive - -(pragma_directive - [ - "version" - "not-version" - "test-version-set" - ] @keyword.directive) - -; Keywords -[ - "asm" - "impure" - "inline" - "inline_ref" - "method_id" - "type" -] @keyword - -"return" @keyword.return - -; Conditionals -[ - "if" - "ifnot" - "else" - "elseif" - "elseifnot" - "until" -] @keyword.conditional - -; Exceptions -[ - "try" - "catch" -] @keyword.exception - -; Repeats -[ - "do" - "forall" - "repeat" - "while" -] @keyword.repeat - -; Qualifiers -[ - "const" - "global" - (var) -] @keyword.modifier - -; Variables -(identifier) @variable - -; Constants -(const_var_declarations - name: (identifier) @constant) - -; Functions/Methods -(function_definition - name: (function_name) @function) - -(function_application - function: (identifier) @function) - -(method_call - method_name: (identifier) @function.method.call) - -; Parameters -(parameter) @variable.parameter - -; Types -(type_identifier) @type - -(primitive_type) @type.builtin - -; Operators -[ - "=" - "+=" - "-=" - "*=" - "/=" - "~/=" - "^/=" - "%=" - "~%=" - "^%=" - "<<=" - ">>=" - "~>>=" - "^>>=" - "&=" - "|=" - "^=" - "==" - "<" - ">" - "<=" - ">=" - "!=" - "<=>" - "<<" - ">>" - "~>>" - "^>>" - "-" - "+" - "|" - "^" - "*" - "/" - "%" - "~/" - "^/" - "~%" - "^%" - "/%" - "&" - "~" -] @operator - -; Literals -[ - (string) - (asm_instruction) -] @string - -[ - (string_type) - (underscore) -] @character.special - -(number) @number - -; Punctuation -[ - "{" - "}" -] @punctuation.bracket - -[ - "(" - ")" - "()" -] @punctuation.bracket - -[ - "[" - "]" -] @punctuation.bracket - -[ - ";" - "," - "->" -] @punctuation.delimiter - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/func/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/func/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/func/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/folds.scm deleted file mode 100644 index 179fc16..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/folds.scm +++ /dev/null @@ -1,6 +0,0 @@ -[ - (comment) - (block) - (afx_comment) - (afx_element) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/highlights.scm deleted file mode 100644 index 7108e57..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/highlights.scm +++ /dev/null @@ -1,132 +0,0 @@ -(comment) @comment @spell - -(afx_comment) @comment @spell - -; identifiers afx -(afx_opening_element - (afx_identifier) @tag) - -(afx_closing_element - (afx_identifier) @tag) - -(afx_element_self_closing - (afx_identifier) @tag) - -(afx_attribute - (afx_property_identifier) @tag.attribute) - -(afx_text) @spell - -; identifiers eel -(eel_object_path - (eel_path_identifier) @variable.builtin - (#any-of? @variable.builtin "this" "props")) - -(eel_object_path - (eel_path_identifier) @variable) - -(eel_object_pair - key: (eel_property_name) @property) - -(eel_method_name) @function - -(eel_parameter) @variable - -; identifiers fusion -; ----------- -(path_part) @property - -(meta_property) @attribute - -(prototype_signature - "prototype" @keyword) - -(include_statement - "include" @keyword.import - (source_file) @string.special.url) - -(namespace_declaration - "namespace" @keyword.type - (alias_namespace) @module) - -(type - name: (type_name) @type) - -; tokens -; ------ -(afx_opening_element - [ - "<" - ">" - ] @punctuation.bracket) - -(afx_closing_element - [ - "<" - ">" - "/" - ] @punctuation.bracket) - -(afx_element_self_closing - [ - "<" - "/>" - ] @punctuation.bracket) - -[ - (package_name) - (alias_namespace) -] @module - -(namespace_declaration - "=" @operator) - -(assignment - "=" @operator) - -(copy - "<" @operator) - -(deletion) @operator - -(eel_binary_expression - operator: _ @operator) - -(eel_not_expression - [ - "!" - "not" - ] @operator) - -(string) @string - -(number) @number - -(boolean) @boolean - -(null) @constant.builtin - -(value_expression - start: _ @punctuation.special - end: _ @punctuation.special) - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @punctuation.bracket - -[ - ":" - "." - "?" -] @punctuation.delimiter - -(eel_ternary_expression - [ - "?" - ":" - ] @keyword.conditional.ternary) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/indents.scm deleted file mode 100644 index 0ba6cf7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/indents.scm +++ /dev/null @@ -1,24 +0,0 @@ -[ - (block) - (value_dsl) - (afx_element) - (afx_element_self_closing) - (eel_array) - (eel_object) -] @indent.begin - -(block - end: _ @indent.branch) - -(value_dsl - end: _ @indent.branch) - -(eel_array - end: _ @indent.branch) - -(eel_object - end: _ @indent.branch) - -(afx_closing_element) @indent.branch - -(comment) @indent.ignore diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/injections.scm deleted file mode 100644 index 085cdb4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -([ - (comment) - (afx_comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/locals.scm deleted file mode 100644 index d23e0ab..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/fusion/locals.scm +++ /dev/null @@ -1,23 +0,0 @@ -; Fusion base -(block) @local.scope - -(namespace_declaration - (alias_namespace) @local.definition.namespace) - -(property - (path - (path_part) @local.definition.field)) - -(type - namespace: (package_name)? @local.definition.namespace - name: (type_name) @local.definition.type) - -; Eel Expressions -(eel_arrow_function) @local.scope - -(eel_object) @local.scope - -(eel_parameter) @local.definition.parameter - -(eel_object_pair - key: (eel_property_name) @local.definition.field) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/folds.scm deleted file mode 100644 index 7cf0888..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/folds.scm +++ /dev/null @@ -1,12 +0,0 @@ -[ - (if_statement) - (elif_clause) - (else_clause) - (while_statement) - (repeat_statement) - (for_statement) - (atomic_statement) - (lambda) - (function) - (atomic_function) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/highlights.scm deleted file mode 100644 index 6c0c856..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/highlights.scm +++ /dev/null @@ -1,208 +0,0 @@ -(identifier) @variable - -; Functions -(assignment_statement - left: (identifier) @function - right: (function)) - -(assignment_statement - left: (identifier) @function - right: (atomic_function)) - -(assignment_statement - left: (identifier) @function - right: (lambda)) - -(call - function: (identifier) @function.call) - -((call - function: (identifier) @function.builtin) - (#any-of? @function.builtin "Assert" "Info" "IsBound" "Unbind" "TryNextMethod")) - -(parameters - (identifier) @variable.parameter) - -(qualified_parameters - (identifier) @variable.parameter) - -(qualified_parameters - (qualified_identifier - (identifier) @variable.parameter)) - -(lambda_parameters - (identifier) @variable.parameter) - -; arg is treated specially when it is the only parameter of a function -((parameters - . - (identifier) @variable.parameter.builtin .) - (#eq? @variable.parameter.builtin "arg")) - -((qualified_parameters - . - (identifier) @variable.parameter.builtin .) - (#eq? @variable.parameter.builtin "arg")) - -((qualified_parameters - . - (qualified_identifier - (identifier) @variable.parameter.builtin) .) - (#eq? @variable.parameter.builtin "arg")) - -((lambda_parameters - . - (identifier) @variable.parameter.builtin .) - (#eq? @variable.parameter.builtin "arg")) - -; Literals -(bool) @constant.builtin - -(integer) @number - -(float) @number.float - -(string) @string - -(char) @character - -(escape_sequence) @string.escape - -[ - (help_topic) - (help_book) -] @string.special - -(tilde) @variable.builtin - -; Record selectors -(record_entry - left: [ - (identifier) - (integer) - ] @variable.member) - -(record_selector - selector: [ - (identifier) - (integer) - ] @variable.member) - -(component_selector - selector: [ - (identifier) - (integer) - ] @variable.member) - -(function_call_option - [ - (identifier) - (record_entry ;Record entries specify global properties in function calls - left: [ - (identifier) - (integer) - ]) - ] @property) - -(help_statement - (help_selector) @property) - -; Operators -[ - "+" - "-" - "*" - "/" - "^" - "->" - ":=" - "<" - "<=" - "<>" - "=" - ">" - ">=" - ".." - (ellipsis) -] @operator - -(help_statement - (help_operator) @operator) - -; Keywords -[ - (break_statement) - (continue_statement) - "atomic" - (quit_statement) -] @keyword - -[ - "function" - "local" - "end" -] @keyword.function - -[ - "and" - "in" - "mod" - "not" - "or" -] @keyword.operator - -"rec" @keyword.type - -[ - "readonly" - "readwrite" -] @keyword.modifier - -(atomic_function - "atomic" @keyword.modifier) - -[ - "for" - "while" - "do" - "od" - "repeat" - "until" -] @keyword.repeat - -[ - "if" - "then" - "elif" - "else" - "fi" -] @keyword.conditional - -"return" @keyword.return - -(pragma) @keyword.directive - -;Punctuation -[ - "," - ";" - "." - "!." - ":" -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "![" - "]" - "{" - "}" -] @punctuation.bracket - -(help_statement - "?" @punctuation.special) - -;Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/locals.scm deleted file mode 100644 index d695d1f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gap/locals.scm +++ /dev/null @@ -1,43 +0,0 @@ -[ - (lambda) - (function) - (atomic_function) -] @local.scope - -(parameters - (identifier) @local.definition.parameter) - -(qualified_parameters - (identifier) @local.definition.parameter) - -(qualified_parameters - (qualified_identifier - (identifier) @local.definition.parameter)) - -(lambda_parameters - (identifier) @local.definition.parameter) - -(locals - (identifier) @local.definition.var) - -(record_entry - left: [ - (identifier) - (integer) - ] @local.definition.field) - -(assignment_statement - left: (identifier) @local.definition.var) - -(for_statement - identifier: (identifier) @local.definition.var) - -(assignment_statement - left: (identifier) @local.definition.function - right: [ - (lambda) - (function) - (atomic_function) - ]) - -(identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/folds.scm deleted file mode 100644 index 0ec72d1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/folds.scm +++ /dev/null @@ -1,7 +0,0 @@ -[ - (if_statement) - (else_clause) - (local_statement) - (exec_statement) - (test_case) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/highlights.scm deleted file mode 100644 index 22ab2d0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/highlights.scm +++ /dev/null @@ -1,19 +0,0 @@ -(output_line) @markup.raw.block - -[ - "#@local" - "#@exec" -] @keyword - -[ - "gap> " - "> " -] @keyword.debug - -[ - "#@if" - "#@else" - "#@fi" -] @keyword.conditional - -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/injections.scm deleted file mode 100644 index bdcba35..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gaptst/injections.scm +++ /dev/null @@ -1,9 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((gap_expression) @injection.content - (#set! injection.language "gap")) - -((input_line) @injection.content - (#set! injection.language "gap") - (#set! injection.combined)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/folds.scm deleted file mode 100644 index cda7090..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/folds.scm +++ /dev/null @@ -1,26 +0,0 @@ -[ - ; Body fold will "join" the next adjacent fold into a SUPER fold. - ; This is an issue with the grammar. - ; (body) - (if_statement) - (elif_clause) - (else_clause) - (for_statement) - (while_statement) - (class_definition) - (enum_definition) - (match_statement) - (pattern_section) - (function_definition) - (lambda) - (constructor_definition) -] @fold - -; It's nice to be able to fold the if/elif/else clauses and the entire -; if_statement. -(if_statement - (body) @fold) - -; Fold strings that are probably doc strings. -(expression_statement - (string) @fold) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/highlights.scm deleted file mode 100644 index cea9093..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/highlights.scm +++ /dev/null @@ -1,422 +0,0 @@ -; Basic -(identifier) @variable - -(name) @variable - -(type - (identifier) @type) - -(comment) @comment @spell - -(string_name) @string - -(string) @string - -(float) @number.float - -(integer) @number - -(null) @constant - -(setter) @function - -(getter) @function - -(set_body - "set" @keyword.function) - -(get_body - "get" @keyword.function) - -(static_keyword) @keyword.modifier - -(tool_statement) @keyword - -(breakpoint_statement) @keyword.debug - -(inferred_type) @operator - -[ - (true) - (false) -] @boolean - -[ - (get_node) - (node_path) -] @string.special.url - -(class_name_statement - (name) @type) @keyword - -(const_statement - "const" @keyword.modifier - (name) @constant) - -(expression_statement - (string) @comment @spell) - -; Functions -(constructor_definition - "_init" @constructor) - -(function_definition - (name) @function) - -(parameters - (identifier) @variable.parameter) - -(typed_parameter - (identifier) @variable.parameter) - -(default_parameter - (identifier) @variable.parameter) - -(typed_default_parameter - (identifier) @variable.parameter) - -(call - (identifier) @function.call) - -(call - (identifier) @keyword.import - (#any-of? @keyword.import "preload" "load")) - -; Properties and Methods -; We'll use @property since that's the term Godot uses. -; But, should (source (variable_statement (name))) be @property, too? Since a -; script file is a class in gdscript. -(class_definition - (body - (variable_statement - (name) @property))) - -; Same question but for methods? -(class_definition - (body - (function_definition - (name) @function.method))) - -(attribute_call - (identifier) @function.method.call) - -(attribute_subscript - (identifier) @property) - -(attribute - (_) - (identifier) @property) - -; Identifier naming conventions -; - Make sure the following query is below the attribute queries so that it -; takes precedence on a `(type (attribute (identifier)))` -((identifier) @type - (#lua-match? @type "^[A-Z]")) - -((identifier) @constant - (#lua-match? @constant "^[A-Z][A-Z_0-9]*$")) - -; Enums -(enumerator - left: (identifier) @constant) - -; Special Builtins -((identifier) @variable.builtin - (#any-of? @variable.builtin "self" "super")) - -(attribute_call - (identifier) @keyword.operator - (#eq? @keyword.operator "new")) - -; Match Pattern -[ - (underscore) - (pattern_open_ending) -] @character.special - -; Alternations -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -[ - "," - "." - ":" -] @punctuation.delimiter - -[ - "if" - "elif" - "else" - "match" -] @keyword.conditional - -(pattern_guard - "when" @keyword.conditional) - -[ - "for" - "while" - "break" - "continue" -] @keyword.repeat - -[ - "~" - "-" - "*" - "/" - "%" - "+" - "-" - "<<" - ">>" - "&" - "^" - "|" - "<" - ">" - "==" - "!=" - ">=" - "<=" - "!" - "&&" - "||" - "=" - "+=" - "-=" - "*=" - "/=" - "%=" - "&=" - "|=" - "->" -] @operator - -[ - "and" - "as" - "in" - "is" - "not" - "or" -] @keyword.operator - -[ - "pass" - "class_name" - "extends" - "signal" - "var" - "onready" - "setget" - "remote" - "master" - "puppet" - "remotesync" - "mastersync" - "puppetsync" -] @keyword - -"export" @keyword.import - -[ - "enum" - "class" -] @keyword.type - -"func" @keyword.function - -"return" @keyword.return - -"await" @keyword.coroutine - -(call - (identifier) @keyword.coroutine - (#eq? @keyword.coroutine "yield")) - -; Builtins -; generated from -; - godot commit: fb10e67fef -; - https://github.com/godotengine/godot/blob/fb10e67fef/doc/classes -; - https://github.com/godotengine/godot/blob/fb10e67fef/doc/classes/@GlobalScope.xml -; - https://github.com/godotengine/godot/blob/fb10e67fef/modules/gdscript/doc_classes/@GDScript.xml -; Built-in Annotations -((annotation - "@" @attribute - (identifier) @attribute) - (#any-of? @attribute - ; from modules/gdscript/doc_classes/@GDScript.xml - "export" "export_category" "export_color_no_alpha" "export_custom" "export_dir" "export_enum" - "export_exp_easing" "export_file" "export_flags" "export_flags_2d_navigation" - "export_flags_2d_physics" "export_flags_2d_render" "export_flags_3d_navigation" - "export_flags_3d_physics" "export_flags_3d_render" "export_flags_avoidance" "export_global_dir" - "export_global_file" "export_group" "export_multiline" "export_node_path" "export_placeholder" - "export_range" "export_storage" "export_subgroup" "icon" "onready" "rpc" "static_unload" "tool" - "warning_ignore")) - -; Builtin Types -((identifier) @type.builtin - (#any-of? @type.builtin - ; from doc/classes/*.xml - "AABB" "Array" "Basis" "Callable" "Color" "Dictionary" "NodePath" "PackedByteArray" - "PackedColorArray" "PackedFloat32Array" "PackedFloat64Array" "PackedInt32Array" - "PackedInt64Array" "PackedStringArray" "PackedVector2Array" "PackedVector3Array" "Plane" - "Projection" "Quaternion" "RID" "Rect2" "Rect2i" "Signal" "String" "StringName" "Transform2D" - "Transform3D" "Vector2" "Vector2i" "Vector3" "Vector3i" "Vector4" "Vector4i" "bool" "float" - "int" - ; from doc/classes/@GlobalScope.xml - "AudioServer" "CameraServer" "ClassDB" "DisplayServer" "EditorInterface" "Engine" - "EngineDebugger" "GDExtensionManager" "Geometry2D" "Geometry3D" "GodotSharp" "IP" "Input" - "InputMap" "JavaClassWrapper" "JavaScriptBridge" "Marshalls" "NavigationMeshGenerator" - "NavigationServer2D" "NavigationServer3D" "OS" "Performance" "PhysicsServer2D" - "PhysicsServer2DManager" "PhysicsServer3D" "PhysicsServer3DManager" "ProjectSettings" - "RenderingServer" "ResourceLoader" "ResourceSaver" "ResourceUID" "TextServerManager" "ThemeDB" - "Time" "TranslationServer" "WorkerThreadPool" "XRServer")) - -; Builtin Funcs -(call - (identifier) @function.builtin - (#any-of? @function.builtin - ; from doc/classes/@GlobalScope.xml - "abs" "absf" "absi" "acos" "acosh" "angle_difference" "asin" "asinh" "atan" "atan2" "atanh" - "bezier_derivative" "bezier_interpolate" "bytes_to_var" "bytes_to_var_with_objects" "ceil" - "ceilf" "ceili" "clamp" "clampf" "clampi" "cos" "cosh" "cubic_interpolate" - "cubic_interpolate_angle" "cubic_interpolate_angle_in_time" "cubic_interpolate_in_time" - "db_to_linear" "deg_to_rad" "ease" "error_string" "exp" "floor" "floorf" "floori" "fmod" - "fposmod" "hash" "instance_from_id" "inverse_lerp" "is_equal_approx" "is_finite" "is_inf" - "is_instance_id_valid" "is_instance_valid" "is_nan" "is_same" "is_zero_approx" "lerp" - "lerp_angle" "lerpf" "linear_to_db" "log" "max" "maxf" "maxi" "min" "minf" "mini" "move_toward" - "nearest_po2" "pingpong" "posmod" "pow" "print" "print_rich" "print_verbose" "printerr" - "printraw" "prints" "printt" "push_error" "push_warning" "rad_to_deg" "rand_from_seed" "randf" - "randf_range" "randfn" "randi" "randi_range" "randomize" "remap" "rid_allocate_id" - "rid_from_int64" "rotate_toward" "round" "roundf" "roundi" "seed" "sign" "signf" "signi" "sin" - "sinh" "smoothstep" "snapped" "snappedf" "snappedi" "sqrt" "step_decimals" "str" "str_to_var" - "tan" "tanh" "type_convert" "type_string" "typeof" "var_to_bytes" "var_to_bytes_with_objects" - "var_to_str" "weakref" "wrap" "wrapf" "wrapi" - ; from modules/gdscript/doc_classes/@GDScript.xml - "Color8" "assert" "char" "convert" "dict_to_inst" "get_stack" "inst_to_dict" "is_instance_of" - "len" "load" "preload" "print_debug" "print_stack" "range" "type_exists")) - -; Builtin Constants -((identifier) @constant.builtin - (#any-of? @constant.builtin - ; from modules/gdscript/doc_classes/@GDScript.xml - "INF" "NAN" "PI" "TAU" - ; from doc/classes/@GlobalScope.xml - "CLOCKWISE" "CORNER_BOTTOM_LEFT" "CORNER_BOTTOM_RIGHT" "CORNER_TOP_LEFT" "CORNER_TOP_RIGHT" - "COUNTERCLOCKWISE" "ERR_ALREADY_EXISTS" "ERR_ALREADY_IN_USE" "ERR_BUG" "ERR_BUSY" - "ERR_CANT_ACQUIRE_RESOURCE" "ERR_CANT_CONNECT" "ERR_CANT_CREATE" "ERR_CANT_FORK" "ERR_CANT_OPEN" - "ERR_CANT_RESOLVE" "ERR_COMPILATION_FAILED" "ERR_CONNECTION_ERROR" "ERR_CYCLIC_LINK" - "ERR_DATABASE_CANT_READ" "ERR_DATABASE_CANT_WRITE" "ERR_DOES_NOT_EXIST" "ERR_DUPLICATE_SYMBOL" - "ERR_FILE_ALREADY_IN_USE" "ERR_FILE_BAD_DRIVE" "ERR_FILE_BAD_PATH" "ERR_FILE_CANT_OPEN" - "ERR_FILE_CANT_READ" "ERR_FILE_CANT_WRITE" "ERR_FILE_CORRUPT" "ERR_FILE_EOF" - "ERR_FILE_MISSING_DEPENDENCIES" "ERR_FILE_NOT_FOUND" "ERR_FILE_NO_PERMISSION" - "ERR_FILE_UNRECOGNIZED" "ERR_HELP" "ERR_INVALID_DATA" "ERR_INVALID_DECLARATION" - "ERR_INVALID_PARAMETER" "ERR_LINK_FAILED" "ERR_LOCKED" "ERR_METHOD_NOT_FOUND" - "ERR_OUT_OF_MEMORY" "ERR_PARAMETER_RANGE_ERROR" "ERR_PARSE_ERROR" "ERR_PRINTER_ON_FIRE" - "ERR_QUERY_FAILED" "ERR_SCRIPT_FAILED" "ERR_SKIP" "ERR_TIMEOUT" "ERR_UNAUTHORIZED" - "ERR_UNAVAILABLE" "ERR_UNCONFIGURED" "EULER_ORDER_XYZ" "EULER_ORDER_XZY" "EULER_ORDER_YXZ" - "EULER_ORDER_YZX" "EULER_ORDER_ZXY" "EULER_ORDER_ZYX" "FAILED" "HORIZONTAL" - "HORIZONTAL_ALIGNMENT_CENTER" "HORIZONTAL_ALIGNMENT_FILL" "HORIZONTAL_ALIGNMENT_LEFT" - "HORIZONTAL_ALIGNMENT_RIGHT" "INLINE_ALIGNMENT_BASELINE_TO" "INLINE_ALIGNMENT_BOTTOM" - "INLINE_ALIGNMENT_BOTTOM_TO" "INLINE_ALIGNMENT_CENTER" "INLINE_ALIGNMENT_CENTER_TO" - "INLINE_ALIGNMENT_IMAGE_MASK" "INLINE_ALIGNMENT_TEXT_MASK" "INLINE_ALIGNMENT_TOP" - "INLINE_ALIGNMENT_TOP_TO" "INLINE_ALIGNMENT_TO_BASELINE" "INLINE_ALIGNMENT_TO_BOTTOM" - "INLINE_ALIGNMENT_TO_CENTER" "INLINE_ALIGNMENT_TO_TOP" "JOY_AXIS_INVALID" "JOY_AXIS_LEFT_X" - "JOY_AXIS_LEFT_Y" "JOY_AXIS_MAX" "JOY_AXIS_RIGHT_X" "JOY_AXIS_RIGHT_Y" "JOY_AXIS_SDL_MAX" - "JOY_AXIS_TRIGGER_LEFT" "JOY_AXIS_TRIGGER_RIGHT" "JOY_BUTTON_A" "JOY_BUTTON_B" "JOY_BUTTON_BACK" - "JOY_BUTTON_DPAD_DOWN" "JOY_BUTTON_DPAD_LEFT" "JOY_BUTTON_DPAD_RIGHT" "JOY_BUTTON_DPAD_UP" - "JOY_BUTTON_GUIDE" "JOY_BUTTON_INVALID" "JOY_BUTTON_LEFT_SHOULDER" "JOY_BUTTON_LEFT_STICK" - "JOY_BUTTON_MAX" "JOY_BUTTON_MISC1" "JOY_BUTTON_PADDLE1" "JOY_BUTTON_PADDLE2" - "JOY_BUTTON_PADDLE3" "JOY_BUTTON_PADDLE4" "JOY_BUTTON_RIGHT_SHOULDER" "JOY_BUTTON_RIGHT_STICK" - "JOY_BUTTON_SDL_MAX" "JOY_BUTTON_START" "JOY_BUTTON_TOUCHPAD" "JOY_BUTTON_X" "JOY_BUTTON_Y" - "KEY_0" "KEY_1" "KEY_2" "KEY_3" "KEY_4" "KEY_5" "KEY_6" "KEY_7" "KEY_8" "KEY_9" "KEY_A" - "KEY_ALT" "KEY_AMPERSAND" "KEY_APOSTROPHE" "KEY_ASCIICIRCUM" "KEY_ASCIITILDE" "KEY_ASTERISK" - "KEY_AT" "KEY_B" "KEY_BACK" "KEY_BACKSLASH" "KEY_BACKSPACE" "KEY_BACKTAB" "KEY_BAR" - "KEY_BRACELEFT" "KEY_BRACERIGHT" "KEY_BRACKETLEFT" "KEY_BRACKETRIGHT" "KEY_C" "KEY_CAPSLOCK" - "KEY_CLEAR" "KEY_CODE_MASK" "KEY_COLON" "KEY_COMMA" "KEY_CTRL" "KEY_D" "KEY_DELETE" "KEY_DOLLAR" - "KEY_DOWN" "KEY_E" "KEY_END" "KEY_ENTER" "KEY_EQUAL" "KEY_ESCAPE" "KEY_EXCLAM" "KEY_F" "KEY_F1" - "KEY_F10" "KEY_F11" "KEY_F12" "KEY_F13" "KEY_F14" "KEY_F15" "KEY_F16" "KEY_F17" "KEY_F18" - "KEY_F19" "KEY_F2" "KEY_F20" "KEY_F21" "KEY_F22" "KEY_F23" "KEY_F24" "KEY_F25" "KEY_F26" - "KEY_F27" "KEY_F28" "KEY_F29" "KEY_F3" "KEY_F30" "KEY_F31" "KEY_F32" "KEY_F33" "KEY_F34" - "KEY_F35" "KEY_F4" "KEY_F5" "KEY_F6" "KEY_F7" "KEY_F8" "KEY_F9" "KEY_FAVORITES" "KEY_FORWARD" - "KEY_G" "KEY_GLOBE" "KEY_GREATER" "KEY_H" "KEY_HELP" "KEY_HOME" "KEY_HOMEPAGE" "KEY_HYPER" - "KEY_I" "KEY_INSERT" "KEY_J" "KEY_JIS_EISU" "KEY_JIS_KANA" "KEY_K" "KEY_KEYBOARD" "KEY_KP_0" - "KEY_KP_1" "KEY_KP_2" "KEY_KP_3" "KEY_KP_4" "KEY_KP_5" "KEY_KP_6" "KEY_KP_7" "KEY_KP_8" - "KEY_KP_9" "KEY_KP_ADD" "KEY_KP_DIVIDE" "KEY_KP_ENTER" "KEY_KP_MULTIPLY" "KEY_KP_PERIOD" - "KEY_KP_SUBTRACT" "KEY_L" "KEY_LAUNCH0" "KEY_LAUNCH1" "KEY_LAUNCH2" "KEY_LAUNCH3" "KEY_LAUNCH4" - "KEY_LAUNCH5" "KEY_LAUNCH6" "KEY_LAUNCH7" "KEY_LAUNCH8" "KEY_LAUNCH9" "KEY_LAUNCHA" - "KEY_LAUNCHB" "KEY_LAUNCHC" "KEY_LAUNCHD" "KEY_LAUNCHE" "KEY_LAUNCHF" "KEY_LAUNCHMAIL" - "KEY_LAUNCHMEDIA" "KEY_LEFT" "KEY_LESS" "KEY_LOCATION_LEFT" "KEY_LOCATION_RIGHT" - "KEY_LOCATION_UNSPECIFIED" "KEY_M" "KEY_MASK_ALT" "KEY_MASK_CMD_OR_CTRL" "KEY_MASK_CTRL" - "KEY_MASK_GROUP_SWITCH" "KEY_MASK_KPAD" "KEY_MASK_META" "KEY_MASK_SHIFT" "KEY_MEDIANEXT" - "KEY_MEDIAPLAY" "KEY_MEDIAPREVIOUS" "KEY_MEDIARECORD" "KEY_MEDIASTOP" "KEY_MENU" "KEY_META" - "KEY_MINUS" "KEY_MODIFIER_MASK" "KEY_N" "KEY_NONE" "KEY_NUMBERSIGN" "KEY_NUMLOCK" "KEY_O" - "KEY_OPENURL" "KEY_P" "KEY_PAGEDOWN" "KEY_PAGEUP" "KEY_PARENLEFT" "KEY_PARENRIGHT" "KEY_PAUSE" - "KEY_PERCENT" "KEY_PERIOD" "KEY_PLUS" "KEY_PRINT" "KEY_Q" "KEY_QUESTION" "KEY_QUOTEDBL" - "KEY_QUOTELEFT" "KEY_R" "KEY_REFRESH" "KEY_RIGHT" "KEY_S" "KEY_SCROLLLOCK" "KEY_SEARCH" - "KEY_SECTION" "KEY_SEMICOLON" "KEY_SHIFT" "KEY_SLASH" "KEY_SPACE" "KEY_SPECIAL" "KEY_STANDBY" - "KEY_STOP" "KEY_SYSREQ" "KEY_T" "KEY_TAB" "KEY_U" "KEY_UNDERSCORE" "KEY_UNKNOWN" "KEY_UP" - "KEY_V" "KEY_VOLUMEDOWN" "KEY_VOLUMEMUTE" "KEY_VOLUMEUP" "KEY_W" "KEY_X" "KEY_Y" "KEY_YEN" - "KEY_Z" "METHOD_FLAGS_DEFAULT" "METHOD_FLAG_CONST" "METHOD_FLAG_EDITOR" "METHOD_FLAG_NORMAL" - "METHOD_FLAG_OBJECT_CORE" "METHOD_FLAG_STATIC" "METHOD_FLAG_VARARG" "METHOD_FLAG_VIRTUAL" - "MIDI_MESSAGE_ACTIVE_SENSING" "MIDI_MESSAGE_AFTERTOUCH" "MIDI_MESSAGE_CHANNEL_PRESSURE" - "MIDI_MESSAGE_CONTINUE" "MIDI_MESSAGE_CONTROL_CHANGE" "MIDI_MESSAGE_NONE" - "MIDI_MESSAGE_NOTE_OFF" "MIDI_MESSAGE_NOTE_ON" "MIDI_MESSAGE_PITCH_BEND" - "MIDI_MESSAGE_PROGRAM_CHANGE" "MIDI_MESSAGE_QUARTER_FRAME" "MIDI_MESSAGE_SONG_POSITION_POINTER" - "MIDI_MESSAGE_SONG_SELECT" "MIDI_MESSAGE_START" "MIDI_MESSAGE_STOP" - "MIDI_MESSAGE_SYSTEM_EXCLUSIVE" "MIDI_MESSAGE_SYSTEM_RESET" "MIDI_MESSAGE_TIMING_CLOCK" - "MIDI_MESSAGE_TUNE_REQUEST" "MOUSE_BUTTON_LEFT" "MOUSE_BUTTON_MASK_LEFT" - "MOUSE_BUTTON_MASK_MB_XBUTTON1" "MOUSE_BUTTON_MASK_MB_XBUTTON2" "MOUSE_BUTTON_MASK_MIDDLE" - "MOUSE_BUTTON_MASK_RIGHT" "MOUSE_BUTTON_MIDDLE" "MOUSE_BUTTON_NONE" "MOUSE_BUTTON_RIGHT" - "MOUSE_BUTTON_WHEEL_DOWN" "MOUSE_BUTTON_WHEEL_LEFT" "MOUSE_BUTTON_WHEEL_RIGHT" - "MOUSE_BUTTON_WHEEL_UP" "MOUSE_BUTTON_XBUTTON1" "MOUSE_BUTTON_XBUTTON2" "OK" "OP_ADD" "OP_AND" - "OP_BIT_AND" "OP_BIT_NEGATE" "OP_BIT_OR" "OP_BIT_XOR" "OP_DIVIDE" "OP_EQUAL" "OP_GREATER" - "OP_GREATER_EQUAL" "OP_IN" "OP_LESS" "OP_LESS_EQUAL" "OP_MAX" "OP_MODULE" "OP_MULTIPLY" - "OP_NEGATE" "OP_NOT" "OP_NOT_EQUAL" "OP_OR" "OP_POSITIVE" "OP_POWER" "OP_SHIFT_LEFT" - "OP_SHIFT_RIGHT" "OP_SUBTRACT" "OP_XOR" "PROPERTY_HINT_ARRAY_TYPE" - "PROPERTY_HINT_COLOR_NO_ALPHA" "PROPERTY_HINT_DIR" "PROPERTY_HINT_ENUM" - "PROPERTY_HINT_ENUM_SUGGESTION" "PROPERTY_HINT_EXPRESSION" "PROPERTY_HINT_EXP_EASING" - "PROPERTY_HINT_FILE" "PROPERTY_HINT_FLAGS" "PROPERTY_HINT_GLOBAL_DIR" - "PROPERTY_HINT_GLOBAL_FILE" "PROPERTY_HINT_GLOBAL_SAVE_FILE" - "PROPERTY_HINT_HIDE_QUATERNION_EDIT" "PROPERTY_HINT_INT_IS_OBJECTID" - "PROPERTY_HINT_INT_IS_POINTER" "PROPERTY_HINT_LAYERS_2D_NAVIGATION" - "PROPERTY_HINT_LAYERS_2D_PHYSICS" "PROPERTY_HINT_LAYERS_2D_RENDER" - "PROPERTY_HINT_LAYERS_3D_NAVIGATION" "PROPERTY_HINT_LAYERS_3D_PHYSICS" - "PROPERTY_HINT_LAYERS_3D_RENDER" "PROPERTY_HINT_LAYERS_AVOIDANCE" "PROPERTY_HINT_LINK" - "PROPERTY_HINT_LOCALE_ID" "PROPERTY_HINT_LOCALIZABLE_STRING" "PROPERTY_HINT_MAX" - "PROPERTY_HINT_MULTILINE_TEXT" "PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" - "PROPERTY_HINT_NODE_PATH_VALID_TYPES" "PROPERTY_HINT_NODE_TYPE" "PROPERTY_HINT_NONE" - "PROPERTY_HINT_OBJECT_ID" "PROPERTY_HINT_OBJECT_TOO_BIG" "PROPERTY_HINT_PASSWORD" - "PROPERTY_HINT_PLACEHOLDER_TEXT" "PROPERTY_HINT_RANGE" "PROPERTY_HINT_RESOURCE_TYPE" - "PROPERTY_HINT_SAVE_FILE" "PROPERTY_HINT_TYPE_STRING" "PROPERTY_USAGE_ALWAYS_DUPLICATE" - "PROPERTY_USAGE_ARRAY" "PROPERTY_USAGE_CATEGORY" "PROPERTY_USAGE_CHECKABLE" - "PROPERTY_USAGE_CHECKED" "PROPERTY_USAGE_CLASS_IS_BITFIELD" "PROPERTY_USAGE_CLASS_IS_ENUM" - "PROPERTY_USAGE_DEFAULT" "PROPERTY_USAGE_DEFERRED_SET_RESOURCE" "PROPERTY_USAGE_EDITOR" - "PROPERTY_USAGE_EDITOR_BASIC_SETTING" "PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" - "PROPERTY_USAGE_GROUP" "PROPERTY_USAGE_HIGH_END_GFX" "PROPERTY_USAGE_INTERNAL" - "PROPERTY_USAGE_KEYING_INCREMENTS" "PROPERTY_USAGE_NEVER_DUPLICATE" - "PROPERTY_USAGE_NIL_IS_VARIANT" "PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" "PROPERTY_USAGE_NONE" - "PROPERTY_USAGE_NO_EDITOR" "PROPERTY_USAGE_NO_INSTANCE_STATE" "PROPERTY_USAGE_READ_ONLY" - "PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" "PROPERTY_USAGE_RESTART_IF_CHANGED" - "PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" "PROPERTY_USAGE_SCRIPT_VARIABLE" "PROPERTY_USAGE_SECRET" - "PROPERTY_USAGE_STORAGE" "PROPERTY_USAGE_STORE_IF_NULL" "PROPERTY_USAGE_SUBGROUP" - "PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" "SIDE_BOTTOM" "SIDE_LEFT" "SIDE_RIGHT" "SIDE_TOP" - "TYPE_AABB" "TYPE_ARRAY" "TYPE_BASIS" "TYPE_BOOL" "TYPE_CALLABLE" "TYPE_COLOR" "TYPE_DICTIONARY" - "TYPE_FLOAT" "TYPE_INT" "TYPE_MAX" "TYPE_NIL" "TYPE_NODE_PATH" "TYPE_OBJECT" - "TYPE_PACKED_BYTE_ARRAY" "TYPE_PACKED_COLOR_ARRAY" "TYPE_PACKED_FLOAT32_ARRAY" - "TYPE_PACKED_FLOAT64_ARRAY" "TYPE_PACKED_INT32_ARRAY" "TYPE_PACKED_INT64_ARRAY" - "TYPE_PACKED_STRING_ARRAY" "TYPE_PACKED_VECTOR2_ARRAY" "TYPE_PACKED_VECTOR3_ARRAY" "TYPE_PLANE" - "TYPE_PROJECTION" "TYPE_QUATERNION" "TYPE_RECT2" "TYPE_RECT2I" "TYPE_RID" "TYPE_SIGNAL" - "TYPE_STRING" "TYPE_STRING_NAME" "TYPE_TRANSFORM2D" "TYPE_TRANSFORM3D" "TYPE_VECTOR2" - "TYPE_VECTOR2I" "TYPE_VECTOR3" "TYPE_VECTOR3I" "TYPE_VECTOR4" "TYPE_VECTOR4I" "VERTICAL" - "VERTICAL_ALIGNMENT_BOTTOM" "VERTICAL_ALIGNMENT_CENTER" "VERTICAL_ALIGNMENT_FILL" - "VERTICAL_ALIGNMENT_TOP")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/indents.scm deleted file mode 100644 index 36b989f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/indents.scm +++ /dev/null @@ -1,78 +0,0 @@ -[ - (lambda) - (function_definition) - (constructor_definition) - (for_statement) - (while_statement) - (if_statement) - (class_definition) - (match_statement) - (pattern_section) - (setget) - (match_body) - (set_body) - (get_body) -] @indent.begin - -[ - (elif_clause) - (else_clause) -] @indent.branch - -[ - (string) - (comment) - (array) - (dictionary) - (parenthesized_expression) - (ERROR) -] @indent.auto - -[ - (pass_statement) - (continue_statement) - (break_statement) - (return_statement) -] @indent.dedent - -[ - (ERROR - "[") - (ERROR - "(") - (ERROR - "{") -] @indent.begin - -; This only works with expanded tabs. -; ((parameters) @indent.align (#set! indent.open_delimiter "(") (#set! indent.close_delimiter ")")) -; ((arguments) @indent.align (#set! indent.open_delimiter "(") (#set! indent.close_delimiter ")")) -; The following queries either do not agree with the current body parsing or are -; attempted workarounds. Specifically as the last statement of a body. Opening -; a new line in between statements works well. -; -; The overall experience is poor, so I've opted for @indent.auto. -; -; The gdscript parser will need to be patched to accommodate more interactive -; edits. As far as I can tell the parser greedily consumes whitespace -; as a zero-width token which causes trouble when inserting indents. -; This indents correctly with tabs. -; (arguments) @indent.begin -; (parameters) @indent.begin -; (array) @indent.begin -; (dictionary) @indent.begin -; (parenthesized_expression) @indent.begin -; Partial workaround for when the cursor is on the bracket character and a newline -; is created with . Without this the newline is opened with extra -; indentation. -; (body (_ (array "]" @indent.end) ) _) -; Problematic behaviors occur at the last statement of a body. -; with @dedent: -; - [ | ] i will dedent ] to 0. -; - [ -; ]| o will open new line at correct indentation. -; with @auto: -; - [ | ] i same -; - [ -; ]| o will open new line with extra indent. -;(body (_ (array "]" @indent.auto) ) .) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/locals.scm deleted file mode 100644 index 62166e6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdscript/locals.scm +++ /dev/null @@ -1,121 +0,0 @@ -; Scopes -[ - (if_statement) - (elif_clause) - (else_clause) - (for_statement) - (while_statement) - (function_definition) - (constructor_definition) - (class_definition) - (match_statement) - (pattern_section) - (lambda) - (get_body) - (set_body) -] @local.scope - -; Parameters -(parameters - (identifier) @local.definition.parameter) - -(default_parameter - (identifier) @local.definition.parameter) - -(typed_parameter - (identifier) @local.definition.parameter) - -(typed_default_parameter - (identifier) @local.definition.parameter) - -; Signals -; Can gdscript 2 signals be considered fields? -(signal_statement - (name) @local.definition.field) - -; Variable Definitions -(const_statement - (name) @local.definition.constant) - -; onready and export variations are only properties. -(variable_statement - (name) @local.definition.var) - -(setter) @local.reference - -(getter) @local.reference - -; Function Definition -((function_definition - (name) @local.definition.function) - (#set! definition.function.scope "parent")) - -; Lambda -; lambda names are not accessible and are only for debugging. -(lambda - (name) @local.definition.function) - -; Source -(class_name_statement - (name) @local.definition.type) - -(source - (variable_statement - (name) @local.definition.field)) - -(source - (onready_variable_statement - (name) @local.definition.field)) - -(source - (export_variable_statement - (name) @local.definition.field)) - -; Class -((class_definition - (name) @local.definition.type) - (#set! definition.type.scope "parent")) - -(class_definition - (body - (variable_statement - (name) @local.definition.field))) - -(class_definition - (body - (onready_variable_statement - (name) @local.definition.field))) - -(class_definition - (body - (export_variable_statement - (name) @local.definition.field))) - -(class_definition - (body - (signal_statement - (name) @local.definition.field))) - -; Although a script is also a class, let's only define functions in an inner class as -; methods. -((class_definition - (body - (function_definition - (name) @local.definition.method))) - (#set! definition.method.scope "parent")) - -; Enum -(enum_definition - (name) @local.definition.enum) - -; Repeat -(for_statement - . - (identifier) @local.definition.var) - -; Match Statement -(pattern_binding - (identifier) @local.definition.var) - -; References -(identifier) @local.reference diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdshader/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdshader/highlights.scm deleted file mode 100644 index c93fd47..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdshader/highlights.scm +++ /dev/null @@ -1,142 +0,0 @@ -[ - "render_mode" - "shader_type" - "group_uniforms" - "global" - "instance" - "const" - "varying" - "uniform" -] @keyword - -"struct" @keyword.type - -[ - (precision_qualifier) - (interpolation_qualifier) -] @keyword.modifier - -[ - "in" - "out" - "inout" -] @keyword.modifier - -[ - "while" - "for" -] @keyword.repeat - -[ - "continue" - "break" - "return" -] @keyword.return - -[ - "if" - "else" - "switch" - "case" - "default" -] @keyword.conditional - -[ - "#" - "include" -] @keyword.directive - -(string) @string - -[ - "=" - "+=" - "-=" - "!" - "~" - "+" - "-" - "*" - "/" - "%" - "||" - "&&" - "|" - "^" - "&" - "==" - "!=" - ">" - ">=" - "<=" - "<" - "<<" - ">>" - "++" - "--" -] @operator - -(boolean) @boolean - -(integer) @number - -(float) @number.float - -[ - "." - "," - ";" -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -(builtin_type) @type.builtin - -(ident_type) @type.definition - -[ - (shader_type) - (render_mode) - (hint_name) -] @attribute - -(builtin_variable) @constant.builtin - -(builtin_function) @function.builtin - -(group_uniforms_declaration - group_name: (ident) @property - subgroup_name: (ident) @property) - -(struct_declaration - name: (ident) @type) - -(struct_member - name: (ident) @property) - -(function_declaration - name: (ident) @function) - -(parameter - name: (ident) @variable.parameter) - -(member_expr - member: (ident) @property) - -(call_expr - function: [ - (ident) - (builtin_type) - ] @function) - -(call_expr - function: (builtin_type) @function.call) - -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdshader/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdshader/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gdshader/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/folds.scm deleted file mode 100644 index cb376d5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/folds.scm +++ /dev/null @@ -1,2 +0,0 @@ -((section) @fold - (#trim! @fold)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/highlights.scm deleted file mode 100644 index 6b37e90..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/highlights.scm +++ /dev/null @@ -1,59 +0,0 @@ -; Sections -(section_name) @markup.heading - -((section_name) @keyword.import - (#eq? @keyword.import "include")) - -((section_header - (section_name) @keyword.import - (subsection_name)) - (#eq? @keyword.import "includeIf")) - -(variable - (name) @property) - -; Operators -"=" @operator - -; Literals -(integer) @number - -[ - (true) - (false) -] @boolean - -(string) @string - -(escape_sequence) @string.escape - -((string) @string.special.path - (#lua-match? @string.special.path "^[.]?[.]?[/]")) - -((string) @string.special.path - (#lua-match? @string.special.path "^[~]")) - -(section_header - [ - "\"" - (subsection_name) - ] @string.special) - -((section_header - (section_name) @_name - (subsection_name) @string.special.url) - (#any-of? @_name "credential" "url")) - -((variable - (name) @_name - value: (string) @string.special.url) - (#eq? @_name "insteadOf")) - -; Punctuation -[ - "[" - "]" -] @punctuation.bracket - -; Comments -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/injections.scm deleted file mode 100644 index 7bda697..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_config/injections.scm +++ /dev/null @@ -1,69 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((variable - (name) @_name - value: (string) @injection.content) - (#any-of? @_name "cmd" "command" "textconv" "sendmailCmd") - (#set! injection.language "bash")) - -(section - (variable - (name) @_name - value: (string) @injection.content) - (#eq? @_name "tool") - (#set! injection.language "bash")) - -(section - (section_header - (section_name) @_pager) - (variable - value: (string) @injection.content) - (#eq? @_pager "pager") - (#set! injection.language "bash")) - -(section - (section_header - (section_name) @_interactive) - (variable - (name) @_name - value: (string) @injection.content) - (#eq? @_interactive "interactive") - (#eq? @_name "diffFilter") - (#set! injection.language "bash")) - -; https://github.com/git-lfs/git-lfs -; git lfs install -(section - (section_header - (section_name) @_filter - (subsection_name) @_lfs) - (variable - (name) @_name - value: (string) @injection.content) - (#eq? @_filter "filter") - (#eq? @_lfs "lfs") - (#any-of? @_name "smudge" "process" "clean") - (#set! injection.language "bash")) - -(section - (section_header - (section_name) @_alias) - (variable - value: (string) @injection.content) - (#eq? @_alias "alias") - (#lua-match? @injection.content "^!") - (#offset! @injection.content 0 1 0 0) - (#set! injection.language "bash")) - -(section - (section_header - (section_name) @_alias) - (variable - value: (string - "\"" - "\"") @injection.content) - (#eq? @_alias "alias") - (#lua-match? @injection.content "^\"!") - (#offset! @injection.content 0 2 0 -1) - (#set! injection.language "bash")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_rebase/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_rebase/highlights.scm deleted file mode 100644 index 248366e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_rebase/highlights.scm +++ /dev/null @@ -1,7 +0,0 @@ -((command) @keyword - (label)? @constant - (message)? @none @spell) - -(option) @operator - -(comment) @comment diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_rebase/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_rebase/injections.scm deleted file mode 100644 index c831594..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/git_rebase/injections.scm +++ /dev/null @@ -1,8 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -((operation - (command) @_command - (message) @injection.content) - (#set! injection.language "bash") - (#any-of? @_command "exec" "x")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/highlights.scm deleted file mode 100644 index aec7750..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/highlights.scm +++ /dev/null @@ -1,55 +0,0 @@ -(dir_sep) @punctuation.delimiter - -(quoted_pattern - "\"" @punctuation.special) - -(range_notation) @string.special - -(range_notation - [ - "[" - "]" - ] @punctuation.bracket) - -(wildcard) @character.special - -(range_negation) @operator - -(character_class) @constant - -(class_range - "-" @operator) - -[ - (ansi_c_escape) - (escaped_char) -] @string.escape - -(attribute - (attr_name) @variable.parameter) - -(attribute - (builtin_attr) @variable.builtin) - -[ - (attr_reset) - (attr_unset) - (attr_set) -] @operator - -(boolean_value) @boolean - -(string_value) @string - -(macro_tag) @keyword.directive - -(macro_def - macro_name: (_) @property) - -; we do not lint syntax errors -; [ -; (pattern_negation) -; (redundant_escape) -; (trailing_slash) -; ] @error -(comment) @comment @spell diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/locals.scm deleted file mode 100644 index 2471b8b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitattributes/locals.scm +++ /dev/null @@ -1,8 +0,0 @@ -(macro_def - (attr_name) @local.definition.macro) - -(attribute - (attr_name) @local.reference) - -(attribute - (builtin_attr) @local.reference) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitcommit/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitcommit/highlights.scm deleted file mode 100644 index b096056..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitcommit/highlights.scm +++ /dev/null @@ -1,49 +0,0 @@ -(comment) @comment - -(generated_comment) @comment - -(title) @markup.heading - -; (text) @none -(branch) @markup.link - -(change) @keyword - -(filepath) @string.special.path - -(arrow) @punctuation.delimiter - -(subject) @markup.heading @spell - -(subject - (subject_prefix) @function @nospell) - -(prefix - (type) @keyword @nospell) - -(prefix - (scope) @variable.parameter @nospell) - -(prefix - [ - "(" - ")" - ":" - ] @punctuation.delimiter) - -(prefix - "!" @punctuation.special) - -(message) @spell - -(trailer - (token) @label) - -; (trailer (value) @none) -(breaking_change - (token) @comment.error) - -(breaking_change - (value) @none @spell) - -(scissor) @comment diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitcommit/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitcommit/injections.scm deleted file mode 100644 index 5613d7e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitcommit/injections.scm +++ /dev/null @@ -1,5 +0,0 @@ -((diff) @injection.content - (#set! injection.language "diff")) - -((rebase_command) @injection.content - (#set! injection.language "git_rebase")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitignore/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitignore/highlights.scm deleted file mode 100644 index aafbe54..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitignore/highlights.scm +++ /dev/null @@ -1,36 +0,0 @@ -(comment) @comment @spell - -(pattern_char) @string.special.path - -[ - (directory_separator) - (directory_separator_escaped) -] @punctuation.delimiter - -[ - (wildcard_char_single) - (wildcard_chars) - (wildcard_chars_allow_slash) -] @character.special - -[ - (pattern_char_escaped) - (bracket_char_escaped) -] @string.escape - -(negation) @punctuation.special - -(bracket_negation) @operator - -; bracket expressions -[ - "[" - "]" -] @punctuation.bracket - -(bracket_char) @constant - -(bracket_range - "-" @operator) - -(bracket_char_class) @constant.builtin diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitignore/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitignore/injections.scm deleted file mode 100644 index 2f0e58e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gitignore/injections.scm +++ /dev/null @@ -1,2 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/folds.scm deleted file mode 100644 index b4cd225..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/folds.scm +++ /dev/null @@ -1,7 +0,0 @@ -; Folds -[ - (case) - (function) - (anonymous_function) - (type_definition) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/highlights.scm deleted file mode 100644 index f80bda2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/highlights.scm +++ /dev/null @@ -1,200 +0,0 @@ -; Keywords -[ - "as" - "let" - "panic" - "todo" - "use" - "echo" -] @keyword - -"type" @keyword.type - -; Function Keywords -"fn" @keyword.function - -; Imports -"import" @keyword.import - -; Conditionals -[ - "case" - "if" -] @keyword.conditional - -; Exceptions -"assert" @keyword.exception - -; Punctuation -[ - "(" - ")" - "<<" - ">>" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -[ - "," - "." - ":" - "->" -] @punctuation.delimiter - -"#" @punctuation.special - -; Operators -[ - "%" - "&&" - "*" - "*." - "+" - "+." - "-" - "-." - ".." - "/" - "/." - "<" - "<." - "<=" - "<=." - "=" - "==" - ">" - ">." - ">=" - ">=." - "|>" - "||" -] @operator - -; Identifiers -(identifier) @variable - -; Comments -(comment) @comment @spell - -[ - (module_comment) - (statement_comment) -] @comment.documentation @spell - -; Unused Identifiers -[ - (discard) - (hole) -] @comment - -; Modules & Imports -(module) @module - -(import - alias: ((identifier) @module)?) - -(remote_type_identifier - module: (identifier) @module) - -(unqualified_import - name: (identifier) @function) - -; Strings -(string) @string - -; Bit Strings -(bit_string_segment) @string.special - -; Numbers -(integer) @number - -(float) @number.float - -; Function Parameter Labels -(function_call - arguments: (arguments - (argument - label: (label) @label))) - -(function_parameter - label: (label)? @label - name: (identifier) @variable.parameter) - -; Records -(record - arguments: (arguments - (argument - label: (label) @variable.member)?)) - -(record_pattern_argument - label: (label) @variable.member) - -(record_update_argument - label: (label) @variable.member) - -(field_access - record: (identifier) @variable - field: (label) @variable.member) - -(data_constructor_argument - (label) @variable.member) - -; Types -[ - (type_identifier) - (type_parameter) - (type_var) -] @type - -; Type Qualifiers -[ - "const" - "external" - (opacity_modifier) - (visibility_modifier) -] @keyword.modifier - -; Tuples -(tuple_access - index: (integer) @operator) - -; Functions -(function - name: (identifier) @function) - -(function_call - function: (identifier) @function.call) - -(function_call - function: (field_access - field: (label) @function.call)) - -; External Functions -(external_function - name: (identifier) @function) - -(external_function_body - (string) @module - . - (string) @function) - -; Constructors -(constructor_name) @type @constructor - -([ - (type_identifier) - (constructor_name) -] @constant.builtin - (#any-of? @constant.builtin "Ok" "Error")) - -; Booleans -((constructor_name) @boolean - (#any-of? @boolean "True" "False")) - -; Pipe Operator -(binary_expression - operator: "|>" - right: (identifier) @function) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/indents.scm deleted file mode 100644 index 3a44ea4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/indents.scm +++ /dev/null @@ -1,30 +0,0 @@ -; Gleam indents similar to Rust and JavaScript -[ - (anonymous_function) - (assert) - (case) - (case_clause) - (constant) - (external_function) - (function) - (let) - (list) - (constant) - (function) - (type_definition) - (type_alias) - (todo) - (tuple) - (unqualified_imports) -] @indent.begin - -[ - ")" - "]" - "}" -] @indent.end @indent.branch - -; Gleam pipelines are not indented, but other binary expression chains are -((binary_expression - operator: _ @_operator) @indent.begin - (#not-eq? @_operator "|>")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/injections.scm deleted file mode 100644 index 11d4f5d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/injections.scm +++ /dev/null @@ -1,7 +0,0 @@ -; Comments -([ - (module_comment) - (statement_comment) - (comment) -] @injection.content - (#set! injection.language "comment")) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/locals.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/locals.scm deleted file mode 100644 index 0058b66..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/gleam/locals.scm +++ /dev/null @@ -1,31 +0,0 @@ -; Let Binding Definition -(let - pattern: (identifier) @local.definition) - -; List Pattern Definitions -(list_pattern - (identifier) @local.definition) - -(list_pattern - assign: (identifier) @local.definition) - -; Tuple Pattern Definition -(tuple_pattern - (identifier) @local.definition) - -; Record Pattern Definition -(record_pattern_argument - pattern: (identifier) @local.definition) - -; Function Parameter Definition -(function_parameter - name: (identifier) @local.definition) - -; References -(identifier) @local.reference - -; Block Scope -(block) @local.scope - -; Case Scope -(case_clause) @local.scope diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/folds.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/folds.scm deleted file mode 100644 index 6502455..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/folds.scm +++ /dev/null @@ -1,5 +0,0 @@ -[ - (element_node - (element_node_start)) - (block_statement) -] @fold diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/highlights.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/highlights.scm deleted file mode 100644 index 9f11468..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/highlights.scm +++ /dev/null @@ -1,117 +0,0 @@ -; === Tag Names === -; Tags that start with a lower case letter are HTML tags -; We'll also use this highlighting for named blocks (which start with `:`) -((tag_name) @tag - (#lua-match? @tag "^:?[%l]")) - -; Tags that start with a capital letter are Glimmer components -((tag_name) @constructor - (#lua-match? @constructor "^%u")) - -(attribute_name) @attribute - -(string_literal) @string - -(number_literal) @number - -(boolean_literal) @boolean - -(concat_statement) @string - -; === Block Statements === -; Highlight the brackets -(block_statement_start) @tag.delimiter - -(block_statement_end) @tag.delimiter - -; Highlight `if`/`each`/`let` -(block_statement_start - path: (identifier) @keyword.conditional) - -(block_statement_end - path: (identifier) @keyword.conditional) - -((mustache_statement - (identifier) @keyword.conditional) - (#lua-match? @keyword.conditional "else")) - -; == Mustache Statements === -; Highlight the whole statement, to color brackets and separators -(mustache_statement) @tag.delimiter - -; An identifier in a mustache expression is a variable -((mustache_statement - [ - (path_expression - (identifier) @variable) - (identifier) @variable - ]) - (#not-any-of? @variable "yield" "outlet" "this" "else")) - -; As are arguments in a block statement -(block_statement_start - argument: [ - (path_expression - (identifier) @variable) - (identifier) @variable - ]) - -; As is an identifier in a block param -(block_params - (identifier) @variable) - -; As are helper arguments -((helper_invocation - argument: [ - (path_expression - (identifier) @variable) - (identifier) @variable - ]) - (#not-eq? @variable "this")) - -; `this` should be highlighted as a built-in variable -((identifier) @variable.builtin - (#eq? @variable.builtin "this")) - -; If the identifier is just "yield" or "outlet", it's a keyword -((mustache_statement - (identifier) @keyword) - (#any-of? @keyword "yield" "outlet")) - -; Helpers are functions -((helper_invocation - helper: [ - (path_expression - (identifier) @function) - (identifier) @function - ]) - (#not-any-of? @function "if" "yield")) - -((helper_invocation - helper: (identifier) @keyword.conditional) - (#eq? @keyword.conditional "if")) - -((helper_invocation - helper: (identifier) @keyword) - (#eq? @keyword "yield")) - -(hash_pair - key: (identifier) @property) - -(comment_statement) @comment @spell - -(attribute_node - "=" @operator) - -(block_params - "as" @keyword) - -(block_params - "|" @operator) - -[ - "<" - ">" - "" -] @tag.delimiter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/indents.scm b/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/indents.scm deleted file mode 100644 index c1ef130..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/queries/glimmer/indents.scm +++ /dev/null @@ -1,34 +0,0 @@ -[ - (element_node - (element_node_start)) - (element_node_void) - (block_statement - (block_statement_start)) - (mustache_statement) -] @indent.begin - -(element_node - (element_node_end - ">" @indent.end)) - -(element_node_void - "/>" @indent.end) - -[ - ">" - "/>" - " tags -((element_node - (element_node_start - (tag_name) @_tag_name - (#eq? @_tag_name "style"))) @injection.content - (#offset! @injection.content 0 7 0 -8) - (#set! injection.language "css") - (#set! injection.include-children)) - -; - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/html/self_closing_tag.html b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/html/self_closing_tag.html deleted file mode 100644 index 79376b8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/html/self_closing_tag.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - -
- - - - {switch state { - | Active => - switch ReactDOM.querySelector("body") { - | Some(element) => - ReactDOM.createPortal( - scrollY} - transformItems={transformItems} - hitComponent=hit - /> - element, - ) - | None => React.null - } - | Inactive => React.null - }} - -} - -let comparable = (type key, ~cmp) => { - module N = MakeComparable({ - type t = key - let cmp = cmp - }) - module(N: Comparable with type t = key) -} - - - - {description->React.string} - children - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rescript/conditional.res b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rescript/conditional.res deleted file mode 100644 index db8328f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rescript/conditional.res +++ /dev/null @@ -1,104 +0,0 @@ -include UseClient -include UseQuery -include UseMutation -include UseSubscription - -type hookResponse<'ret> = Types.Hooks.hookResponse<'ret> = { - operation: Types.operation, - fetching: bool, - data: option<'ret>, - error: option, - response: Types.Hooks.response<'ret>, - extensions: option, - stale: bool, -} - -Js.Array2.slice(~start=0, ~end_=Js.Array2.length(moduleRoute) - 1) - -let pathModule = Path.join([dir, version, `${moduleName}.json`]) - -let {Api.LocMsg.row: row, column, shortMsg} = locMsg - -let message = `${"error"->red}: failed to compile examples from ${kind} ${test.id->cyan}\n${errorMessage}` - -let version = (evt->ReactEvent.Form.target)["value"] - -let rehypePlugins = - [Rehype.WithOptions([Plugin(Rehype.slug), SlugOption({prefix: slugPrefix ++ "-"})])]->Some - -module Item = { - type t = { - name: string, - sellIn: int, - quality: int, - } - - let make = (~name, ~sellIn, ~quality): t => { - name, - sellIn, - quality, - } -} - -let updateQuality = (items: array) => { - items->Js.Array2.map(item => { - let newItem = ref(item) - - call( - asdf, - asdf - ) - - if ( - newItem.contents.name != "Aged Brie" && 5 > 2 && - newItem.contents.name != "Backstage passes to a TAFKAL80ETC concert" - ) { - if newItem.contents.quality > 0 { - if newItem.contents.name != "Sulfuras, Hand of Ragnaros" { - newItem := {...newItem.contents, quality: newItem.contents.quality - 1} - } - } - } else if newItem.contents.quality < 50 { - newItem := {...newItem.contents, quality: newItem.contents.quality + 1} - - if newItem.contents.name == "Backstage passes to a TAFKAL80ETC concert" { - if newItem.contents.sellIn < 11 { - if newItem.contents.quality < 50 { - newItem := {...newItem.contents, quality: newItem.contents.quality + 1} - } - } - - if newItem.contents.sellIn < 6 { - if newItem.contents.quality < 50 { - newItem := {...newItem.contents, quality: newItem.contents.quality + 1} - } - } - } - } - - if newItem.contents.name != "Sulfuras, Hand of Ragnaros" { - newItem := {...newItem.contents, sellIn: newItem.contents.sellIn - 1} - } - - if newItem.contents.sellIn < 0 { - if newItem.contents.name != "Aged Brie" { - if newItem.contents.name != "Backstage passes to a TAFKAL80ETC concert" { - if newItem.contents.quality > 0 { - if newItem.contents.name != "Sulfuras, Hand of Ragnaros" { - newItem := {...newItem.contents, quality: newItem.contents.quality - 1} - } - } - } else { - newItem := { - ...newItem.contents, - quality: newItem.contents.quality - newItem.contents.quality, - } - } - } else if newItem.contents.quality < 50 { - newItem := {...newItem.contents, quality: newItem.contents.quality + 1} - } - } - - newItem.contents - }) -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rescript_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rescript_spec.lua deleted file mode 100644 index 5b1f06a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rescript_spec.lua +++ /dev/null @@ -1,33 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/rescript", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 0, - expandtab = true, -}) - -describe("indent ReScript:", function() - describe("whole file:", function() - run:whole_file(".", {}) - end) - - describe("new line:", function() - run:new_line("basic.res", { on_line = 5, text = "x", indent = 0 }) - run:new_line("basic.res", { on_line = 9, text = '"another": here,', indent = 2 }) - run:new_line("basic.res", { on_line = 10, text = "}", indent = 0 }) - run:new_line("basic.res", { on_line = 14, text = "~test: test,", indent = 2 }) - run:new_line("basic.res", { on_line = 18, text = "x", indent = 0 }) - - run:new_line("complex.res", { on_line = 3, text = "x", indent = 2 }) - run:new_line("complex.res", { on_line = 5, text = "x", indent = 4 }) - run:new_line("complex.res", { on_line = 17, text = "|", indent = 10 }) - run:new_line("complex.res", { on_line = 25, text = "x", indent = 2 }) - run:new_line("complex.res", { on_line = 60, text = "x", indent = 6 }) - run:new_line("complex.res", { on_line = 120, text = "x", indent = 14 }) - run:new_line("complex.res", { on_line = 136, text = "x", indent = 2 }) - - run:new_line("conditional.res", { on_line = 6, text = "test: bool,", indent = 2 }) - run:new_line("conditional.res", { on_line = 95, text = "x", indent = 10 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-assignment.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-assignment.rb deleted file mode 100644 index d0ae21e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-assignment.rb +++ /dev/null @@ -1,2 +0,0 @@ -ret = - 2 diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-brackets.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-brackets.rb deleted file mode 100644 index ba16536..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-brackets.rb +++ /dev/null @@ -1,5 +0,0 @@ -def indent_brackets - { - {} - } -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-ensure.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-ensure.rb deleted file mode 100644 index fce2779..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-ensure.rb +++ /dev/null @@ -1,2 +0,0 @@ -begin -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-parens.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-parens.rb deleted file mode 100644 index 821743e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-parens.rb +++ /dev/null @@ -1,5 +0,0 @@ -def indent_parens - ( - () - ) -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-parenthesized-statements.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-parenthesized-statements.rb deleted file mode 100644 index 72873dd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-parenthesized-statements.rb +++ /dev/null @@ -1,2 +0,0 @@ -( -) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-rescue.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-rescue.rb deleted file mode 100644 index fce2779..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-rescue.rb +++ /dev/null @@ -1,2 +0,0 @@ -begin -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-square-brackets.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-square-brackets.rb deleted file mode 100644 index 8746d22..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-square-brackets.rb +++ /dev/null @@ -1,5 +0,0 @@ -def indent_square_brackets - [ - [] - ] -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-unless.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-unless.rb deleted file mode 100644 index 50bc2b4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/indent-unless.rb +++ /dev/null @@ -1,2 +0,0 @@ -unless true -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/period-issue-3364.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/period-issue-3364.rb deleted file mode 100644 index 6582750..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby/period-issue-3364.rb +++ /dev/null @@ -1,7 +0,0 @@ -class User < ApplicationRecord - def foo - if true - self. - end - end -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby_spec.lua deleted file mode 100644 index b669b89..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/ruby_spec.lua +++ /dev/null @@ -1,22 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/ruby", { - shiftwidth = 2, - expandtab = true, -}) - -describe("indent Ruby:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = { "./period-issue-3364.rb" }, - }) - end) - - describe("new line:", function() - run:new_line("indent-unless.rb", { on_line = 1, text = "stmt", indent = 2 }) - run:new_line("indent-assignment.rb", { on_line = 1, text = "1 +", indent = 2 }) - run:new_line("indent-parenthesized-statements.rb", { on_line = 1, text = "stmt", indent = 2 }) - run:new_line("indent-rescue.rb", { on_line = 1, text = "rescue", indent = 0 }) - run:new_line("indent-ensure.rb", { on_line = 1, text = "ensure", indent = 0 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/array.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/array.rs deleted file mode 100644 index 68344e0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/array.rs +++ /dev/null @@ -1,11 +0,0 @@ -const X: [i32; 2] = [ - 1, - 2, -]; - -fn foo() { - let _x = [ - 1, - 2, - ]; -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/comment.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/comment.rs deleted file mode 100644 index 8f59213..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/comment.rs +++ /dev/null @@ -1,13 +0,0 @@ -/// Function foo -/// -/// Description of -/// function foo. -fn foo(x: i32, y: i32) -> i32 { - x + y -} - -impl A { - /// Do some stuff!! (put cursor here and press enter) - fn a(); -} - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/cond.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/cond.rs deleted file mode 100644 index eb96a48..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/cond.rs +++ /dev/null @@ -1,17 +0,0 @@ -fn foo(mut x: i32) -> i32 { - if x > 10 { - return 10; - } else if x == 10 { - return 9; - } else { - x += 10; - } - - if x < 0 { - if x == -1 { - return 0; - } - } - - 0 -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/enum.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/enum.rs deleted file mode 100644 index 996f07d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/enum.rs +++ /dev/null @@ -1,11 +0,0 @@ -enum Foo { - X, - Y( - char, - char, - ), - Z { - x: u32, - y: u32, - }, -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/func.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/func.rs deleted file mode 100644 index 4c9d40b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/func.rs +++ /dev/null @@ -1,10 +0,0 @@ -fn foo() -> i32 { - 1 -} - -fn foo( - x: i32, - y: i32 -) -> i32 { - x + y -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/if_let_cond.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/if_let_cond.rs deleted file mode 100644 index 0d6e2ef..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/if_let_cond.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn foo() -> i32 { - if let Some(v) = Some(2) { - 1 - } else { - 2 - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/impl.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/impl.rs deleted file mode 100644 index 2525c2e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/impl.rs +++ /dev/null @@ -1,7 +0,0 @@ -struct Foo; - -impl Foo { - fn foo() -> i32 { - 1 - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/loop.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/loop.rs deleted file mode 100644 index eb845bc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/loop.rs +++ /dev/null @@ -1,19 +0,0 @@ -fn foo(mut x: i32) { - while x > 0 { - x -= 1; - } - - for i in 0..3 { - x += 1; - } - - loop { - x += 1; - - if x < 100 { - continue; - } - - break; - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/macro.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/macro.rs deleted file mode 100644 index e42cf13..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/macro.rs +++ /dev/null @@ -1,13 +0,0 @@ -macro_rules! foo { - ($a:ident, $b:ident, $c:ident) => { - struct a { value: $a }; - struct b { value: $b }; - }; - ($a:ident) => { - struct a { value: $a }; - }; -} - -foo! { - A -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/match.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/match.rs deleted file mode 100644 index 438ba6d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/match.rs +++ /dev/null @@ -1,11 +0,0 @@ -fn foo(x: i32) -> i32 { - match x { - 0 => 1, - 1 => { - 2 - }, - 2 | 3 => { - 4 - } - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/mod.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/mod.rs deleted file mode 100644 index cc7f2c8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -mod foo { - const X: i32 = 1; - - mod bar { - - const Y: i32 = 1; - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/string.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/string.rs deleted file mode 100644 index 4d60663..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/string.rs +++ /dev/null @@ -1,12 +0,0 @@ -fn foo() { - let a = "hello -world"; - - let b = "hello\ - world"; - - let c = r#" - hello - world - "#; -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/struct.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/struct.rs deleted file mode 100644 index f382897..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/struct.rs +++ /dev/null @@ -1,4 +0,0 @@ -struct Foo { - x: u32, - y: u32, -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/trait.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/trait.rs deleted file mode 100644 index fb5fc7e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/trait.rs +++ /dev/null @@ -1,11 +0,0 @@ -struct Foo; - -trait Bar { - fn bar(); -} - -impl Bar for Foo { - fn bar() { - - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/tuple.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/tuple.rs deleted file mode 100644 index 9001f77..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/tuple.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn foo() { - for ( - a, - b - ) in c.iter() { - // ... - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/where.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/where.rs deleted file mode 100644 index 08c1b19..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust/where.rs +++ /dev/null @@ -1,21 +0,0 @@ -fn foo(t: T) -> i32 -where - T: Debug, -{ - 1 -} - -fn foo(t: T) -> i32 where - T: Debug, -{ - 1 -} - -struct Foo(T); - -impl Write for Foo -where - T: Debug, -{ - -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust_spec.lua deleted file mode 100644 index 795765b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/rust_spec.lua +++ /dev/null @@ -1,66 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/rust", { - tabstop = 4, - shiftwidth = 4, - softtabstop = 0, - expandtab = true, -}) - -describe("indent Rust:", function() - describe("whole file:", function() - run:whole_file "." - end) - - describe("new line:", function() - run:new_line("array.rs", { on_line = 2, text = "0,", indent = 4 }) - run:new_line("array.rs", { on_line = 8, text = "0,", indent = 8 }) - run:new_line("comment.rs", { on_line = 3, text = "a", indent = "/// " }) - run:new_line("comment.rs", { on_line = 10, text = "a", indent = " /// " }) - run:new_line("cond.rs", { on_line = 11, text = "x += 1;", indent = 12 }) - run:new_line("cond.rs", { on_line = 2, text = "x += 1;", indent = 8 }) - run:new_line("cond.rs", { on_line = 4, text = "x += 1;", indent = 8 }) - run:new_line("cond.rs", { on_line = 6, text = "x += 1;", indent = 8 }) - run:new_line("cond.rs", { on_line = 8, text = "x += 1;", indent = 4 }) - run:new_line("if_let_cond.rs", { on_line = 2, text = "let a = 1;", indent = 8 }) - run:new_line("if_let_cond.rs", { on_line = 4, text = "let a = 1;", indent = 8 }) - run:new_line("if_let_cond.rs", { on_line = 6, text = "let a = 1;", indent = 4 }) - run:new_line("enum.rs", { on_line = 2, text = "Q,", indent = 4 }) - run:new_line("enum.rs", { on_line = 4, text = "i32,", indent = 8 }) - run:new_line("enum.rs", { on_line = 8, text = "z: u32,", indent = 8 }) - run:new_line("enum.rs", { on_line = 11, text = "let _x = 1;", indent = 0 }) - run:new_line("func.rs", { on_line = 1, text = "let _x = 1;", indent = 4 }) - run:new_line("func.rs", { on_line = 3, text = "let _x = 1;", indent = 0 }) - run:new_line("func.rs", { on_line = 6, text = "z: i32,", indent = 4 }) - run:new_line("impl.rs", { on_line = 3, text = "const FOO: u32 = 1;", indent = 4 }) - run:new_line("impl.rs", { on_line = 4, text = "let _x = 1;", indent = 8 }) - run:new_line("impl.rs", { on_line = 6, text = "let _x = 1;", indent = 4 }) - run:new_line("impl.rs", { on_line = 7, text = "let _x = 1;", indent = 0 }) - run:new_line("loop.rs", { on_line = 10, text = "x += 1;", indent = 8 }) - run:new_line("loop.rs", { on_line = 2, text = "x += 1;", indent = 8 }) - run:new_line("loop.rs", { on_line = 6, text = "x += 1;", indent = 8 }) - run:new_line("macro.rs", { on_line = 1, text = "() => {},", indent = 4 }) - run:new_line("macro.rs", { on_line = 12, text = "B C", indent = 4 }) - run:new_line("macro.rs", { on_line = 2, text = "struct $c;", indent = 8 }) - run:new_line("match.rs", { on_line = 2, text = "-1 => -1,", indent = 8 }) - run:new_line("match.rs", { on_line = 7, text = "let y = 1;", indent = 12 }) - run:new_line("match.rs", { on_line = 10, text = "let y = 1;", indent = 4 }) - run:new_line("mod.rs", { on_line = 1, text = "const Z: i32 = 1;", indent = 4 }) - run:new_line("mod.rs", { on_line = 2, text = "const Z: i32 = 1;", indent = 4 }) - run:new_line("mod.rs", { on_line = 6, text = "const Z: i32 = 1;", indent = 8 }) - run:new_line("mod.rs", { on_line = 7, text = "const Z: i32 = 1;", indent = 4 }) - run:new_line("string.rs", { on_line = 2, text = "brave new", indent = 0 }) - run:new_line("string.rs", { on_line = 5, text = "brave new \\", indent = 8 }) - run:new_line("string.rs", { on_line = 9, text = "brave new \\", indent = 8 }) - run:new_line("struct.rs", { on_line = 1, text = "z: i32,", indent = 4 }) - run:new_line("struct.rs", { on_line = 2, text = "z: i32,", indent = 4 }) - run:new_line("struct.rs", { on_line = 4, text = "let y = 1;", indent = 0 }) - run:new_line("trait.rs", { on_line = 4, text = "fn baz();", indent = 4 }) - run:new_line("trait.rs", { on_line = 5, text = "let y = 1;", indent = 0 }) - run:new_line("trait.rs", { on_line = 7, text = "fn baz();", indent = 4 }) - run:new_line("trait.rs", { on_line = 8, text = "()", indent = 8 }) - run:new_line("where.rs", { on_line = 17, text = "T: Debug,", indent = 4 }) - run:new_line("where.rs", { on_line = 2, text = "T: Debug,", indent = 4 }) - run:new_line("where.rs", { on_line = 9, text = "T: Debug,", indent = 4 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/array_and_switch.smali b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/array_and_switch.smali deleted file mode 100644 index 3ee3f6d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/array_and_switch.smali +++ /dev/null @@ -1,58 +0,0 @@ -.class public Lbaksmali/test/class; -.super Ljava/lang/Object; - -.source "baksmali_test_class.smali" - -.method public testMethod(ILjava/lang/String;)Ljava/lang/String; - .registers 3 - .annotation runtime Lorg/junit/Test; - .end annotation - .annotation system Lyet/another/annotation; - somevalue = 1234 - anothervalue = 3.14159 - .end annotation - - const-string v0, "testing\n123" - - goto switch: - - sget v0, Lbaksmali/test/class;->staticField:I - - switch: - packed-switch v0, pswitch: - - try_start: - const/4 v0, 7 - const v0, 10 - nop - try_end: - .catch Ljava/lang/Exception; {try_start: .. try_end:} handler: - .catchall {try_start: .. try_end:} handler2: - - handler: - - Label10: - Label11: - Label12: - Label13: - return-object v0 - - - - .array-data 4 - 1 2 3 4 5 6 200 - .end array-data - - pswitch: - .packed-switch 10 - Label10: - Label11: - Label12: - Label13: - .end packed-switch - - handler2: - - return-void - -.end method diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/field.smali b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/field.smali deleted file mode 100644 index ae48b7b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/field.smali +++ /dev/null @@ -1,12 +0,0 @@ -.class public Lbaksmali/test/class; -.super Ljava/lang/Object; - -.source "baksmali_test_class.smali" - -.field public static annotationStaticField:Lsome/annotation; = .subannotation Lsome/annotation; - value1 = "test" - value2 = .subannotation Lsome/annotation; - value1 = "test2" - value2 = Lsome/enum; - .end subannotation -.end subannotation diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/method.smali b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/method.smali deleted file mode 100644 index 2c139b0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/method.smali +++ /dev/null @@ -1,8 +0,0 @@ -.class public Lbaksmali/test/class; -.super Ljava/lang/Object; - -.source "baksmali_test_class.smali" - -.method public debugTest(IIIII)V - .registers 10 -.end method diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/parameter.smali b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/parameter.smali deleted file mode 100644 index 2e54da2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali/parameter.smali +++ /dev/null @@ -1,55 +0,0 @@ -.class public Lbaksmali/test/class; -.super Ljava/lang/Object; - -.source "baksmali_test_class.smali" - -.method public debugTest(IIIII)V - .registers 10 - - .parameter "Blah" - .parameter - .parameter "BlahWithAnnotations" - .annotation runtime Lsome/annotation; - something = "some value" - somethingelse = 1234 - .end annotation - .annotation runtime La/second/annotation; - .end annotation - .end parameter - .parameter - .annotation runtime Lsome/annotation; - something = "some value" - somethingelse = 1234 - .end annotation - .end parameter - .parameter "LastParam" - - .prologue - - nop - nop - - .source "somefile.java" - .line 101 - - nop - - - .line 50 - - .local v0, aNumber:I - const v0, 1234 - .end local v0 - - .source "someotherfile.java" - .line 900 - - const-string v0, "1234" - - .restart local v0 - const v0, 6789 - .end local v0 - - .epilogue - -.end method diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali_spec.lua deleted file mode 100644 index cddc4f9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/smali_spec.lua +++ /dev/null @@ -1,25 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/smali", { - tabstop = 4, - shiftwidth = 4, - expandtab = false, -}) - -describe("indent Smali:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("field.smali", { on_line = 7, text = 'value1 = "test"', indent = 1 }) - run:new_line("field.smali", { on_line = 10, text = "value2 = Lsome/enum;", indent = 2 }) - run:new_line("array_and_switch.smali", { on_line = 43, text = "1 2 3 4 5 6 200", indent = 2 }) - run:new_line("array_and_switch.smali", { on_line = 48, text = "Label10:", indent = 2 }) - run:new_line("method.smali", { on_line = 7, text = ".registers 10", indent = 1 }) - run:new_line("parameter.smali", { on_line = 20, text = ".annotation runtime Lsome/annotation;", indent = 3 }) - run:new_line("parameter.smali", { on_line = 21, text = 'something = "some value"', indent = 3 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/case.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/case.sql deleted file mode 100644 index eee85a3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/case.sql +++ /dev/null @@ -1,8 +0,0 @@ -select - case - when a = 1 then '1' - when a = 2 then '2' - when a = 3 then '3' - else '0' - end as stmt1 -from tab; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/compound.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/compound.sql deleted file mode 100644 index e645c6e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/compound.sql +++ /dev/null @@ -1,3 +0,0 @@ -begin - create table foo (bar int); -end; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/create.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/create.sql deleted file mode 100644 index 9773884..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/create.sql +++ /dev/null @@ -1,4 +0,0 @@ -create table my_table ( - id bigint, - date date -); diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/cte.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/cte.sql deleted file mode 100644 index 55426cc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/cte.sql +++ /dev/null @@ -1,7 +0,0 @@ -with data as ( - select - a, - b - from tab -) -select * from data; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/insert.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/insert.sql deleted file mode 100644 index 36fa7c0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/insert.sql +++ /dev/null @@ -1,5 +0,0 @@ -insert into mytable - (column1, column2) -values - ('john', 123), - ('jane', 124); diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/select.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/select.sql deleted file mode 100644 index 85f0cc5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/select.sql +++ /dev/null @@ -1,4 +0,0 @@ -select - a, - b -from tab; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/subquery.sql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/subquery.sql deleted file mode 100644 index a559d7e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql/subquery.sql +++ /dev/null @@ -1,9 +0,0 @@ -select - id -from foo -where id < ( - select - id - from bar - limit 1 -); diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql_spec.lua deleted file mode 100644 index 2fdfc9b..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sql_spec.lua +++ /dev/null @@ -1,19 +0,0 @@ -local Runner = require("tests.indent.common").Runner ---local XFAIL = require("tests.indent.common").XFAIL - -local run = Runner:new(it, "tests/indent/sql", { - tabstop = 4, - shiftwidth = 4, - softtabstop = 0, - expandtab = true, -}) - -describe("indent SQL:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sway/main.sw b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sway/main.sw deleted file mode 100644 index d917895..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sway/main.sw +++ /dev/null @@ -1,345 +0,0 @@ -library; - -use ::alloc::{alloc, realloc}; -use ::assert::assert; -use ::option::Option::{self, *}; -use ::convert::From; -use ::iterator::*; - -struct RawVec { - ptr: raw_ptr, - cap: u64, -} - -pub fn tx_witness_data(index: u64) -> Option { - if index >= tx_witnesses_count() { - return None - } - - let length = match tx_witness_data_length(index) { - Some(len) => len, - None => return None, - }; - - if __is_reference_type::() { - let witness_data_ptr = __gtf::(index, GTF_WITNESS_DATA); - let new_ptr = alloc_bytes(length); - witness_data_ptr.copy_bytes_to(new_ptr, length); - - Some(asm(ptr: new_ptr) { - ptr: T - }) - } else { - // u8 is the only value type that is less than 8 bytes and should be handled separately - if __size_of::() == 1 { - Some(__gtf::(index, GTF_WITNESS_DATA).add::(7).read::()) - } else { - Some(__gtf::(index, GTF_WITNESS_DATA).read::()) - } - } -} - -impl RawVec { - pub fn new() -> Self { - Self { - ptr: alloc::(0), - cap: 0, - } - } - - pub fn with_capacity(capacity: u64) -> Self { - Self { - ptr: alloc::(capacity), - cap: capacity, - } - } - - pub fn ptr(self) -> raw_ptr { - self.ptr - } - - pub fn capacity(self) -> u64 { - self::cap() - } - - pub fn grow(ref mut self) { - let new_cap = if self.cap == 0 { 1 } else { 2 * self.cap }; - - self.ptr = realloc::(self.ptr, self.cap, new_cap); - self.cap = new_cap; - } -} - -impl From for RawVec { - fn from(slice: raw_slice) -> Self { - let cap = slice.len::(); - let ptr = alloc::(cap); - if cap > 0 { - slice.ptr().copy_to::(ptr, cap); - } - Self { ptr, cap } - } -} - -pub struct Vec { - buf: RawVec, - len: u64, -} - -impl Vec { - pub fn new() -> Self { - 'hey: while true { - - } - Self { - buf: RawVec::new(), - len: 0, - } - } - - pub fn with_capacity(capacity: u64) -> Self { - Self { - buf: RawVec::with_capacity(capacity), - len: 0, - } - } - - pub fn push(ref mut self, value: T) { - // If there is insufficient capacity, grow the buffer. - if self.len == self.buf.capacity() { - self.buf.grow(); - }; - - // Get a pointer to the end of the buffer, where the new element will - // be inserted. - let end = self.buf.ptr().add::(self.len); - - // Write `value` at pointer `end` - end.write::(value); - - // Increment length. - self.len += 1; - } - - pub fn capacity(self) -> u64 { - self.buf.capacity() - } - - pub fn clear(ref mut self) { - self.len = 0; - } - - pub fn get(self, index: u64) -> Option { - // First check that index is within bounds. - if self.len <= index { - return None; - }; - - // Get a pointer to the desired element using `index` - let ptr = self.buf.ptr().add::(index); - - // Read from `ptr` - Some(ptr.read::()) - } - - pub fn len(self) -> u64 { - self.len - } - - pub fn is_empty(self) -> bool { - self.len == 0 - } - - pub fn remove(ref mut self, index: u64) -> T { - assert(index < self.len); - - let buf_start = self.buf.ptr(); - - // Read the value at `index` - let ptr = buf_start.add::(index); - let ret = ptr.read::(); - - // Shift everything down to fill in that spot. - let mut i = index; - if self.len > 1 { - while i < self.len - 1 { - let ptr = buf_start.add::(i); - ptr.add::(1).copy_to::(ptr, 1); - i += 1; - } - } - - // Decrease length. - self.len -= 1; - ret - } - - pub fn insert(ref mut self, index: u64, element: T) { - assert(index <= self.len); - - // If there is insufficient capacity, grow the buffer. - if self.len == self.buf.capacity() { - self.buf.grow(); - } - - let buf_start = self.buf.ptr(); - - // The spot to put the new value - let index_ptr = buf_start.add::(index); - - // Shift everything over to make space. - let mut i = self.len; - while i > index { - let ptr = buf_start.add::(i); - ptr.sub::(1).copy_to::(ptr, 1); - i -= 1; - } - - // Write `element` at pointer `index` - index_ptr.write::(element); - - // Increment length. - self.len += 1; - } - - pub fn pop(ref mut self) -> Option { - if self.len == 0 { - return None; - } - self.len -= 1; - Some(self.buf.ptr().add::(self.len).read::()) - } - - pub fn swap(ref mut self, element1_index: u64, element2_index: u64) { - assert(element1_index < self.len); - assert(element2_index < self.len); - - if element1_index == element2_index { - return; - } - - let element1_ptr = self.buf.ptr().add::(element1_index); - let element2_ptr = self.buf.ptr().add::(element2_index); - - let element1_val: T = element1_ptr.read::(); - element2_ptr.copy_to::(element1_ptr, 1); - element2_ptr.write::(element1_val); - } - - pub fn set(ref mut self, index: u64, value: T) { - assert(index < self.len); - - let index_ptr = self.buf.ptr().add::(index); - - index_ptr.write::(value); - } - - pub fn iter(self) -> VecIter { - VecIter { - values: self, - index: 0, - } - } - - pub fn ptr(self) -> raw_ptr { - self.buf.ptr() - } -} - -impl AsRawSlice for Vec { - fn as_raw_slice(self) -> raw_slice { - raw_slice::from_parts::(self.buf.ptr(), self.len) - } -} - -impl From for Vec { - fn from(slice: raw_slice) -> Self { - Self { - buf: RawVec::from(slice), - len: slice.len::(), - } - } -} - -impl From> for raw_slice { - fn from(vec: Vec) -> Self { - asm(ptr: (vec.ptr(), vec.len())) { - ptr: raw_slice - } - } - - pub fn sha256(self) -> b256 { - let mut result_buffer = b256::min(); - asm( - hash: result_buffer, - ptr: p, - bytes: p, - ) { - s256 hash ptr bytes; - hash: b256 - } - } -} - -impl AbiEncode for Vec -where - T: AbiEncode, -{ - fn abi_encode(self, buffer: Buffer) -> Buffer { - let len = self.len(); - let mut buffer = len.abi_encode(buffer); - - let mut i = 0; - while i < len { - let item = self.get(i).unwrap(); - buffer = item.abi_encode(buffer); - i += 1; - } - - buffer - } -} - -impl AbiDecode for Vec -where - T: AbiDecode, -{ - fn abi_decode(ref buffer: BufferReader) -> Vec { - let len = u64::abi_decode(buffer); - - let mut v = Vec::with_capacity(len); - - let mut i = 0; - while i < len { - let item = T::abi_decode(buffer); - v.push(item); - i += 1; - } - - yield 5; - - v - } -} - -pub struct VecIter { - values: Vec, - index: u64, -} - -impl Iterator for VecIter { - type Item = T; - fn next(ref mut self) -> Option { - if self.index >= self.values.len()? { - return None - } - - self.index += 1; - self.values.get(self.index - 1) - } -} - -fn hello(hi: T) { - println("{}", hi); -} -// vim: ft=sway diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sway_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sway_spec.lua deleted file mode 100644 index d37573a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/sway_spec.lua +++ /dev/null @@ -1,20 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/sway", { - tabstop = 4, - shiftwidth = 4, - softtabstop = 4, - expandtab = true, -}) - -describe("indent Sway:", function() - describe("whole file:", function() - run:whole_file(".", {}) - end) - describe("new line:", function() - run:new_line("main.sw", { on_line = 12, text = "const CONST: u32 = 2;", indent = 0 }) - run:new_line("main.sw", { on_line = 14, text = "let hi = 5;", indent = 4 }) - run:new_line("main.sw", { on_line = 15, text = "let hi = 5;", indent = 8 }) - run:new_line("main.sw", { on_line = 92, text = "let hi = 5;", indent = 12 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/declarations.swift b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/declarations.swift deleted file mode 100644 index 67a7e55..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/declarations.swift +++ /dev/null @@ -1,56 +0,0 @@ -@wrapper -@modifier( - * -) -class EquilateralTriangle: NamedShape { - var sideLength: Double = 0.0 - - @attr - init( - sideLength: Double, - name: String - ) { - self.sideLength = sideLength - } - deinit { - } - - var perimeter: Double { - willSet { - } - didSet { - - } - } - - @funcattr - override func simpleDescription(a: int, b: int) -> String { - return "An equilateral triangle with sides of length \(sideLength)." - } -} - -@attr -protocol ExampleProtocol { - var simpleDescription: String { get } - mutating func adjust() -} - -@available(*) -func test() { - -} - -@attr(*) -typealias Foo = Bar - -@attr -struct Foo< - Bar -> { - @Provider - var test = 1 - - subscript(index: Int) -> Int { - var foo = 2 - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/expressions.swift b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/expressions.swift deleted file mode 100644 index 4f7292a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/expressions.swift +++ /dev/null @@ -1,17 +0,0 @@ -func Test() { - (1 + 2) - - [ - 1, - 2, - 3, - 4, - 5 - ].split() - - let x = [ - 1: 2, - 3: 4, - ] - -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/statements.swift b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/statements.swift deleted file mode 100644 index df6e46c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift/statements.swift +++ /dev/null @@ -1,34 +0,0 @@ -func Test() { - if true { - return - } else if true { - return - } - - switch x { - case "1": - print("x") - default: - print("y") - @unknown default: - print("z") - } - - for a in b { - } - - while true{ - } - - repeat { - - } while (true) - - guard let name = person["name"] else { - return - } - - return ( - x + 1 - ) -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift_spec.lua deleted file mode 100644 index 501cbfa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/swift_spec.lua +++ /dev/null @@ -1,22 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/swift", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 2, - expandtab = true, -}) - -describe("indent Swift:", function() - describe("whole file:", function() - run:whole_file(".", {}) - end) - describe("new line:", function() - run:new_line("declarations.swift", { on_line = 6, text = "var x = 1", indent = 2 }) - run:new_line("declarations.swift", { on_line = 12, text = "var textInsideInit = true", indent = 4 }) - run:new_line("declarations.swift", { on_line = 19, text = "var textInsideWillSet = 1", indent = 6 }) - run:new_line("declarations.swift", { on_line = 22, text = "var textInsideDidSet = 1", indent = 6 }) - run:new_line("declarations.swift", { on_line = 27, text = "var textInsideOverrideFunc", indent = 4 }) - run:new_line("declarations.swift", { on_line = 33, text = "var InsideProtocol: String { get }", indent = 2 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/if_block.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/if_block.cmm deleted file mode 100644 index 4bda7c6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/if_block.cmm +++ /dev/null @@ -1,49 +0,0 @@ -IF &a - STOP - -IF (TRUE()) -( - BREAK -) - -IF (&b+CouNT()) -( - continue -) - -IF FOUND() - STOP -ELSE - CONTinue - -IF &c - CONTinue -ELSE IF FALSE() - Break -ELSE - stop - -IF &d -( - STOP -) -ELSE IF &e -; comment A -( - CONTINUE -) -ELSE -; comment B -( - BREAK -) - -IF &f - IF &g - stop - ELSE - IF &h - ( - continue - ) - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/repeat_block.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/repeat_block.cmm deleted file mode 100644 index 6384183..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/repeat_block.cmm +++ /dev/null @@ -1,27 +0,0 @@ -RePeaT 10. PRINT "A" - -RePeaT &a - print - -REPEAT 0xaAfF09 -( - cont -) - -RPT -( - b -) - -rpt -( - s -) -WHILE &a - -REPEAT TRUE() -; comment -( - cont -) - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/subroutine_block.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/subroutine_block.cmm deleted file mode 100644 index 24891c6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/subroutine_block.cmm +++ /dev/null @@ -1,23 +0,0 @@ -printA: -( - PRINT "A" - RETURN -) - -sUBROUtINE printB -( - ENTRY &in - - PRINT "&in" - RETURN -) - -SUBROUTINE printC -// comment -( - PARAMETERS &a &b - - PRINT "&a"+"&b" - ENDDO -) - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/while_block.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/while_block.cmm deleted file mode 100644 index bfcbd45..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32/while_block.cmm +++ /dev/null @@ -1,14 +0,0 @@ -WHILE &a - Step - -WHILE (sYmbol.EXIT(main)) -( - Step - Break -) - -WHILE (FALSE()) -// comment -( - ECHO "test" -) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32_spec.lua deleted file mode 100644 index 88d2661..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/t32_spec.lua +++ /dev/null @@ -1,138 +0,0 @@ -local Runner = require("tests.indent.common").Runner -local XFAIL = require("tests.indent.common").XFAIL - -local runner = Runner:new(it, "tests/indent/t32", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 0, - expandtab = true, -}) - -describe("indent t32:", function() - describe("whole file:", function() - runner:whole_file "." - end) - - describe("new line:", function() - runner:new_line("if_block.cmm", { on_line = 2, text = "GOTO start", indent = 0 }, "command after IF", XFAIL) - - runner:new_line("if_block.cmm", { on_line = 5, text = "GOTO start", indent = 2 }, "command in IF then block") - - runner:new_line("if_block.cmm", { on_line = 4, text = "(", indent = 0 }, "block after IF") - - for ii, test in ipairs { - { 1, 2 }, - { 14, 2 }, - { 19, 2 }, - { 21, 2 }, - { 41, 2 }, - { 42, 4 }, - } do - runner:new_line( - "if_block.cmm", - { on_line = test[1], text = "&x=1.", indent = test[2] }, - "command in IF then[" .. ii .. "]" - ) - end - - -- Insertion of a command right before the existing block results in - -- incorrect syntax. The parse either detect an error or incorrectly - -- assumes "ELSE IF" is a command. - for ii, test in ipairs { - { 26, 2 }, - { 30, 2 }, - } do - runner:new_line( - "if_block.cmm", - { on_line = test[1], text = 'PRINT ""', indent = test[2] }, - "displace block in IF then[" .. ii .. "]", - XFAIL - ) - end - - runner:new_line("if_block.cmm", { on_line = 45, text = "&x=1.", indent = 6 }, "command in IF then", XFAIL) - - for ii, test in ipairs { - { 16, 2 }, - { 21, 2 }, - { 23, 2 }, - { 44, 4 }, - } do - runner:new_line( - "if_block.cmm", - { on_line = test[1], text = "CONTinue\n", indent = test[2] }, - "command in IF else[" .. ii .. "]" - ) - end - - runner:new_line("while_block.cmm", { on_line = 2, text = "&x=1.", indent = 2 }, "command after WHILE") - - runner:new_line("while_block.cmm", { on_line = 4, text = "&x=1.", indent = 0 }, "command after WHILE") - - runner:new_line("while_block.cmm", { on_line = 1, text = "(\n", indent = 0 }, "block in WHILE then") - - for ii, test in ipairs { - { 5, 2 }, - { 12, 2 }, - } do - runner:new_line( - "while_block.cmm", - { on_line = test[1], text = "&x=1.", indent = test[2] }, - "command in WHILE then block[" .. ii .. "]" - ) - end - - for ii, test in ipairs { - { 1, 0 }, - { 4, 2 }, - } do - runner:new_line( - "repeat_block.cmm", - { on_line = test[1], text = "&x=1.", indent = test[2] }, - "command after RePeaT[" .. ii .. "]" - ) - end - - runner:new_line("repeat_block.cmm", { on_line = 3, text = "(\n", indent = 0 }, "block in RePeaT then") - - for ii, test in ipairs { - { 7, 2 }, - { 18, 2 }, - { 24, 2 }, - } do - runner:new_line( - "repeat_block.cmm", - { on_line = test[1], text = "&x=1.", indent = test[2] }, - "command in RePeaT then block [" .. ii .. "]" - ) - end - - runner:new_line("subroutine_block.cmm", { on_line = 1, text = "(\n", indent = 0 }, "block after call label") - - for ii, test in ipairs { - { 2, 2 }, - { 3, 2 }, - { 8, 2 }, - { 12, 2 }, - { 19, 2 }, - } do - runner:new_line( - "subroutine_block.cmm", - { on_line = test[1], text = "&x=1.", indent = test[2] }, - "command in subroutine block[" .. ii .. "]" - ) - end - - for ii, test in ipairs { - { 5, 2 }, - { 13, 2 }, - { 23, 2 }, - } do - runner:new_line( - "subroutine_block.cmm", - { on_line = test[1], text = "&x=1.", indent = test[2] }, - "command after subroutine block[" .. ii .. "]" - ) - end - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/function_call.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/function_call.tf deleted file mode 100644 index 44c477e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/function_call.tf +++ /dev/null @@ -1,6 +0,0 @@ -test { - x = f( - a, - b, - ) -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/indent-in-multiline-objects.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/indent-in-multiline-objects.tf deleted file mode 100644 index 00ee9c9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/indent-in-multiline-objects.tf +++ /dev/null @@ -1,6 +0,0 @@ -test { - x = { - 1: "foo", - 2: "bar", - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/indent-in-multiline-tuples.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/indent-in-multiline-tuples.tf deleted file mode 100644 index 4024878..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/indent-in-multiline-tuples.tf +++ /dev/null @@ -1,6 +0,0 @@ -test { - x = [ - 1, - 2, - ] -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiline-comments.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiline-comments.tf deleted file mode 100644 index 494aaba..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiline-comments.tf +++ /dev/null @@ -1,7 +0,0 @@ -test { - /* - foo - bar - baz - */ -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiple-attributes.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiple-attributes.tf deleted file mode 100644 index da6a85f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiple-attributes.tf +++ /dev/null @@ -1,4 +0,0 @@ -test { - x = ["foo", "bar"] - y = {"fizz": "buzz"} -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiple-blocks.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiple-blocks.tf deleted file mode 100644 index b9826c8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/multiple-blocks.tf +++ /dev/null @@ -1,6 +0,0 @@ -test { - x = "foo" -} -test { - y = "bar" -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/nested_blocks.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/nested_blocks.tf deleted file mode 100644 index 7be6492..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/nested_blocks.tf +++ /dev/null @@ -1,5 +0,0 @@ -test { - nest { - x = "bar" - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/no-indent-after-brace.tf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/no-indent-after-brace.tf deleted file mode 100644 index e670ad8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform/no-indent-after-brace.tf +++ /dev/null @@ -1,4 +0,0 @@ -# Issue #2590 -locals { - titles = ["test0", "test1"] -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform_spec.lua deleted file mode 100644 index 49fa22c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/terraform_spec.lua +++ /dev/null @@ -1,35 +0,0 @@ -local Runner = require("tests.indent.common").Runner ---local XFAIL = require("tests.indent.common").XFAIL - -local run = Runner:new(it, "tests/indent/terraform", { - tabstop = 2, - shiftwidth = 2, - expandtab = true, -}) - -describe("indent Terraform:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("no-indent-after-brace.tf", { on_line = 4, text = "# Wow, no indent here please", indent = 0 }) - run:new_line("indent-in-multiline-tuples.tf", { on_line = 4, text = "3,", indent = 4 }) - run:new_line("indent-in-multiline-tuples.tf", { on_line = 3, text = "# as elements", indent = 4 }) - run:new_line("indent-in-multiline-tuples.tf", { on_line = 5, text = "# as outer block", indent = 2 }) - run:new_line("indent-in-multiline-tuples.tf", { on_line = 1, text = "# as outer block", indent = 2 }) - run:new_line("indent-in-multiline-objects.tf", { on_line = 4, text = '3: "baz",', indent = 4 }) - run:new_line("indent-in-multiline-objects.tf", { on_line = 3, text = "# as elements", indent = 4 }) - run:new_line("indent-in-multiline-objects.tf", { on_line = 5, text = "# as outer block", indent = 2 }) - run:new_line("indent-in-multiline-objects.tf", { on_line = 1, text = "# as outer block", indent = 2 }) - run:new_line("multiple-attributes.tf", { on_line = 2, text = "a = 1", indent = 2 }) - run:new_line("multiple-attributes.tf", { on_line = 3, text = "a = 1", indent = 2 }) - run:new_line("multiple-attributes.tf", { on_line = 4, text = "a = 1", indent = 0 }) - run:new_line("nested_blocks.tf", { on_line = 3, text = "a = 1", indent = 4 }) - run:new_line("nested_blocks.tf", { on_line = 4, text = "a = 1", indent = 2 }) - run:new_line("function_call.tf", { on_line = 4, text = "c,", indent = 4 }) - run:new_line("function_call.tf", { on_line = 5, text = "a = 1", indent = 2 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/classes.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/classes.tig deleted file mode 100644 index 542a40e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/classes.tig +++ /dev/null @@ -1,14 +0,0 @@ -class A { - var a := 12 - - method method() : int = 1 -} - -type B = class extends A { - var b := 27 - - method another_method() = ( - print("called"); - self.b + self.method() - ) -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/control-flow.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/control-flow.tig deleted file mode 100644 index abbadfa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/control-flow.tig +++ /dev/null @@ -1,22 +0,0 @@ -( - if - 12 - then - 27 - else - 42 - ; - - for - i := 12 - to - 27 - do - 42 - ; - - while - 0 - do - break -) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/functions.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/functions.tig deleted file mode 100644 index 22ce051..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/functions.tig +++ /dev/null @@ -1,14 +0,0 @@ -primitive long_parameter_list( - a: int, - b: string, - c: type -) - -function f() = - ( - long_parameter_list( - 1, - "2", - nil - ) - ) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/groupings.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/groupings.tig deleted file mode 100644 index 870e0da..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/groupings.tig +++ /dev/null @@ -1,10 +0,0 @@ -let - var a := 42 -in - ( - 12; - 27; - 42 - ); - a -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/values-and-expressions.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/values-and-expressions.tig deleted file mode 100644 index 5131c30..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger/values-and-expressions.tig +++ /dev/null @@ -1,30 +0,0 @@ -let - type array_of_int = array of int - - type record = { - a: int, - b: string, - c: type - } - - var a := - "a string" -in - array[ - 12 - ] - ; - - array_of_int[ - 27 - ] - of - 42 - ; - - record { - a = 1, - b = "2", - c = nil - } -end diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger_spec.lua deleted file mode 100644 index c1f252f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/tiger_spec.lua +++ /dev/null @@ -1,113 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local runner = Runner:new(it, "tests/indent/tiger", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 0, - expandtab = true, -}) - -describe("indent Tiger:", function() - describe("whole file:", function() - runner:whole_file "." - end) - - describe("new line:", function() - runner:new_line("classes.tig", { on_line = 1, text = "var a := 0", indent = 2 }, "class declaration beginning") - runner:new_line("classes.tig", { on_line = 2, text = "var a := 0", indent = 2 }, "class declaration after field") - runner:new_line("classes.tig", { on_line = 4, text = "var a := 0", indent = 2 }, "class declaration after method") - runner:new_line("classes.tig", { on_line = 5, text = "var a := 0", indent = 0 }, "after class declaration") - runner:new_line("classes.tig", { on_line = 7, text = "var a := 0", indent = 2 }, "class type beginning") - runner:new_line("classes.tig", { on_line = 8, text = "var a := 0", indent = 2 }, "class type after field") - runner:new_line("classes.tig", { on_line = 10, text = "self.a := 0", indent = 4 }, "inside method") - runner:new_line("classes.tig", { on_line = 13, text = "var a := 0", indent = 2 }, "class type after method") - runner:new_line("classes.tig", { on_line = 14, text = "var a := 0", indent = 0 }, "after class type") - - runner:new_line("control-flow.tig", { on_line = 2, text = "true", indent = 4 }, "if condition") - runner:new_line("control-flow.tig", { on_line = 4, text = "true", indent = 4 }, "if consequence") - runner:new_line("control-flow.tig", { on_line = 4, text = "true", indent = 4 }, "if alternative") - runner:new_line("control-flow.tig", { on_line = 10, text = "start := 0", indent = 4 }, "for index start") - runner:new_line("control-flow.tig", { on_line = 12, text = "the_end", indent = 4 }, "for index end") - runner:new_line("control-flow.tig", { on_line = 14, text = "break", indent = 4 }, "for body") - runner:new_line("control-flow.tig", { on_line = 18, text = "true", indent = 4 }, "while condition") - runner:new_line("control-flow.tig", { on_line = 20, text = "break", indent = 4 }, "while body") - - runner:new_line("functions.tig", { on_line = 1, text = "parameter: int,", indent = 2 }, "parameter list beginning") - runner:new_line("functions.tig", { on_line = 2, text = "parameter: int,", indent = 2 }, "parameter list middle") - runner:new_line("functions.tig", { on_line = 4, text = ",parameter: int", indent = 2 }, "parameter list end") - runner:new_line("functions.tig", { on_line = 5, text = "var a := 0", indent = 0 }, "after parameter list") - runner:new_line("functions.tig", { on_line = 7, text = "print(a)", indent = 2 }, "function body") - runner:new_line("functions.tig", { on_line = 9, text = "a,", indent = 6 }, "function call beginning") - runner:new_line("functions.tig", { on_line = 10, text = "a,", indent = 6 }, "function call middle") - runner:new_line("functions.tig", { on_line = 12, text = ",a", indent = 6 }, "function call end") - runner:new_line("functions.tig", { on_line = 13, text = "; print(a)", indent = 4 }, "after function call") - runner:new_line("functions.tig", { on_line = 14, text = "var a := 12", indent = 0 }, "after function declaration") - - runner:new_line("groupings.tig", { on_line = 2, text = "var b := 0", indent = 2 }, "let declarations") - runner:new_line("groupings.tig", { on_line = 3, text = "a := a + 1", indent = 2 }, "after 'in'") - runner:new_line("groupings.tig", { on_line = 4, text = "a := a + 1;", indent = 4 }, "sequence") - runner:new_line("groupings.tig", { on_line = 8, text = "a := a + 1;", indent = 2 }, "after sequence") - runner:new_line("groupings.tig", { on_line = 10, text = "+ 1", indent = 0 }, "after 'end'") - - runner:new_line( - "values-and-expressions.tig", - { on_line = 4, text = "field: record,", indent = 4 }, - "record type beginning" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 5, text = "field: record,", indent = 4 }, - "record type middle" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 7, text = ",field: record", indent = 4 }, - "record type end" - ) - runner:new_line("values-and-expressions.tig", { on_line = 8, text = "var a := 0", indent = 2 }, "after record type") - runner:new_line( - "values-and-expressions.tig", - { on_line = 10, text = "0", indent = 4 }, - "variable declaration init value" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 11, text = "+ a", indent = 4 }, - "variable declaration init follow-up" - ) - runner:new_line("values-and-expressions.tig", { on_line = 13, text = "a", indent = 4 }, "array index") - runner:new_line("values-and-expressions.tig", { on_line = 14, text = "+ a", indent = 4 }, "array index follow-up") - runner:new_line("values-and-expressions.tig", { on_line = 15, text = "+ a", indent = 2 }, "after array value") - runner:new_line("values-and-expressions.tig", { on_line = 18, text = "a", indent = 4 }, "array expression size") - runner:new_line( - "values-and-expressions.tig", - { on_line = 20, text = "of", indent = 4 }, - "array expression after size" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 21, text = "a", indent = 4 }, - "array expression init value" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 25, text = "field = 0,", indent = 4 }, - "record expression beginning" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 26, text = "field = 0,", indent = 4 }, - "record expression middle" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 28, text = ",field = 0", indent = 4 }, - "record expression end" - ) - runner:new_line( - "values-and-expressions.tig", - { on_line = 29, text = "a := 0", indent = 2 }, - "after record expression" - ) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/usd/prim.usd b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/usd/prim.usd deleted file mode 100644 index 4bfbff9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/usd/prim.usd +++ /dev/null @@ -1,6 +0,0 @@ -#usda 1.0 - -def "foo" ( -) -{ -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/usd_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/usd_spec.lua deleted file mode 100644 index c4e8198..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/usd_spec.lua +++ /dev/null @@ -1,21 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/usd", { - tabstop = 4, - shiftwidth = 4, - softtabstop = 4, - expandtab = true, -}) - -describe("indent USD:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("prim.usd", { on_line = 3, text = "active = false", indent = 4 }) - run:new_line("prim.usd", { on_line = 5, text = "custom int foo = 10", indent = 4 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/vue/template_indent.vue b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/vue/template_indent.vue deleted file mode 100644 index 95d891f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/vue/template_indent.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/vue_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/vue_spec.lua deleted file mode 100644 index 09527e4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/vue_spec.lua +++ /dev/null @@ -1,24 +0,0 @@ -local Runner = require("tests.indent.common").Runner --- local XFAIL = require("tests.indent.common").XFAIL - -local run = Runner:new(it, "tests/indent", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 0, - expandtab = true, -}) - -describe("indent Vue:", function() - describe("whole file:", function() - run:whole_file({ "vue/" }, {}) - end) - - describe("new line:", function() - for _, info in ipairs { - { 1, 2 }, - { 3, 0 }, - } do - run:new_line("vue/template_indent.vue", { on_line = info[1], text = "Foo", indent = info[2] }, info[3], info[4]) - end - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl/basic.wgsl b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl/basic.wgsl deleted file mode 100644 index ccf29a3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl/basic.wgsl +++ /dev/null @@ -1,60 +0,0 @@ -struct Vertex { - @location(0) position: vec3, - @location(1) color: vec4, -}; - -@vertex -fn vertex(vertex: Vertex) -> VertexOutput { - var out: VertexOutput; - out.a = 1; - if (1) { - out.a = 3; - } - if (2) { - dsa; - } - - loop { - if (i >= 4) { break; } - } - out.b = 2; - return out; -} - -@vertex -fn vertex(vertex: Vertex, - foo: dso, - foo: dsa -) -> VertexOutput { - var out: VertexOutput; - out.a = 1; - out.b = 2; - return out; -} - -@vertex -fn vertex(vertex: Vertex, - foo: dso, - foo: dsa) -> VertexOutput { - var out: VertexOutput; - out.a = 1; - out.b = 2; - return out; -} - -fn foo( - a: u32, - b: u32, -) { - return a; -} - -fn bar( -) {} - -fn baz( - a: u32, -) {} - -fn qux( -) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl/type_constructor_or_function_call_expression.wgsl b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl/type_constructor_or_function_call_expression.wgsl deleted file mode 100644 index dff667e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl/type_constructor_or_function_call_expression.wgsl +++ /dev/null @@ -1,11 +0,0 @@ -fn f() { - let a = foo( - b, - c, - ); - - let a = Foo( - b, - c, - ); -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl_spec.lua deleted file mode 100644 index e1bf618..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/wgsl_spec.lua +++ /dev/null @@ -1,44 +0,0 @@ -local Runner = require("tests.indent.common").Runner ---local XFAIL = require("tests.indent.common").XFAIL - -local run = Runner:new(it, "tests/indent/wgsl", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 0, - expandtab = true, -}) - -describe("indent WGSL:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("basic.wgsl", { on_line = 47, text = "c: u32,", indent = 2 }) - run:new_line("basic.wgsl", { on_line = 52, text = "c: u32,", indent = 2 }) - run:new_line("basic.wgsl", { on_line = 56, text = "c: u32,", indent = 2 }) - run:new_line("basic.wgsl", { on_line = 59, text = "c: u32,", indent = 2 }) - run:new_line("type_constructor_or_function_call_expression.wgsl", { - on_line = 3, - text = "b", - indent = 4, - }) - run:new_line("type_constructor_or_function_call_expression.wgsl", { - on_line = 4, - text = "c", - indent = 4, - }) - run:new_line("type_constructor_or_function_call_expression.wgsl", { - on_line = 8, - text = "b", - indent = 4, - }) - run:new_line("type_constructor_or_function_call_expression.wgsl", { - on_line = 9, - text = "c", - indent = 4, - }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml/autoindent-mapping-pair.yaml b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml/autoindent-mapping-pair.yaml deleted file mode 100644 index 8dadeee..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml/autoindent-mapping-pair.yaml +++ /dev/null @@ -1,2 +0,0 @@ -- key1: value1 - key2: value2 diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml/indent-sequence-items.yaml b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml/indent-sequence-items.yaml deleted file mode 100644 index 8dadeee..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml/indent-sequence-items.yaml +++ /dev/null @@ -1,2 +0,0 @@ -- key1: value1 - key2: value2 diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml_spec.lua deleted file mode 100644 index 91c60c2..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yaml_spec.lua +++ /dev/null @@ -1,20 +0,0 @@ -local Runner = require("tests.indent.common").Runner ---local XFAIL = require("tests.indent.common").XFAIL - -local run = Runner:new(it, "tests/indent/yaml", { - shiftwidth = 2, - expandtab = true, -}) - -describe("indent YAML:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("indent-sequence-items.yaml", { on_line = 2, text = "key3: value3", indent = 2 }) - run:new_line("autoindent-mapping-pair.yaml", { on_line = 1, text = "key3: value3", indent = 2 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yang/module.yang b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yang/module.yang deleted file mode 100644 index 29c911f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yang/module.yang +++ /dev/null @@ -1,58 +0,0 @@ -module test-module { - yang-version 1.1; - namespace "http://example.com"; - prefix test; - - import ietf-inet-types { prefix inet; } - import tailf-ncs { - prefix ncs; - } - - description "Multi-line strings has indentation - aligned with the first line."; - - typedef foo { - type enumeration { - enum "foo"; - enum "bar"; - } - } - - ncs:plan-outline test-nano-service { - description "Testing indentation of extension statements."; - - ncs:component-type "ncs:self" { - ncs:state "ncs:init" { - ncs:create { - ncs:nano-callback; - } - } - ncs:state "ncs:ready"; - } - - ncs:component-type "alloc:resource-allocator" { - ncs:state "ncs:init"; - ncs:state "alloc:resources-allocated"; - ncs:state "ncs:ready"; - } - } - - container test { - } - - augment /alloc:resource-allocator { - description "Augmentation for the resource allocator mock services."; - - list test-nano-service { - key "id"; - - leaf id { - type string; - description - "I'm a multi-line string - - Starting on the next line from the statement."; - } - } - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yang_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yang_spec.lua deleted file mode 100644 index 618d260..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yang_spec.lua +++ /dev/null @@ -1,23 +0,0 @@ -local Runner = require("tests.indent.common").Runner - -local run = Runner:new(it, "tests/indent/yang", { - tabstop = 2, - shiftwidth = 2, - softtabstop = 0, - expandtab = true, -}) - -describe("indent YANG:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("module.yang", { on_line = 12, text = "// Aligned indentation ended", indent = 2 }) - run:new_line("module.yang", { on_line = 37, text = "// Test", indent = 4 }) - run:new_line("module.yang", { on_line = 40, text = "// Test", indent = 4 }) - run:new_line("module.yang", { on_line = 52, text = "Aligned string!", indent = 11 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yuck/indent.yuck b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yuck/indent.yuck deleted file mode 100644 index c224548..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yuck/indent.yuck +++ /dev/null @@ -1,17 +0,0 @@ -(defwidget name - :widget parameter - (box one - :box1 parameter - (box two - :box2 parameter - ) - ) -) - -(defwidget name - :widget parameter - (box one - ) -) - -(defwidget name diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yuck_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yuck_spec.lua deleted file mode 100644 index 6ce15de..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/yuck_spec.lua +++ /dev/null @@ -1,19 +0,0 @@ -local Runner = require("tests.indent.common").Runner -local run = Runner:new(it, "tests/indent/yuck", { - tabstop = 2, - shiftwidth = 2, - expandtab = true, -}) - -describe("indent yuck", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new line:", function() - run:new_line("indent.yuck", { on_line = 13, text = ":box1 parameter", indent = 4 }) - run:new_line("indent.yuck", { on_line = 17, text = ")", indent = 0 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/zig/pr-3269.zig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/zig/pr-3269.zig deleted file mode 100644 index 65b6b64..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/zig/pr-3269.zig +++ /dev/null @@ -1,10 +0,0 @@ -// https://github.com/nvim-treesitter/nvim-treesitter/pull/3269 -const std = @import("std"); - -pub fn main() anyerror!void { - std.log.info("All your codebase are belong to us.", .{}); -} - -test "basic test" { - try std.testing.expectEqual(10, 3 + 7); -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/zig_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/zig_spec.lua deleted file mode 100644 index c064d9a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/indent/zig_spec.lua +++ /dev/null @@ -1,22 +0,0 @@ -local Runner = require("tests.indent.common").Runner ---local XFAIL = require("tests.indent.common").XFAIL - -local run = Runner:new(it, "tests/indent/zig", { - tabstop = 4, - shiftwidth = 4, - softtabstop = 4, - expandtab = true, -}) - -describe("indent Zig:", function() - describe("whole file:", function() - run:whole_file(".", { - expected_failures = {}, - }) - end) - - describe("new lines:", function() - run:new_line("pr-3269.zig", { on_line = 5, text = "return;", indent = 4 }) - run:new_line("pr-3269.zig", { on_line = 6, text = "", indent = 0 }) - end) -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/bash/double-parens.sh b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/bash/double-parens.sh deleted file mode 100644 index 8d841d1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/bash/double-parens.sh +++ /dev/null @@ -1,6 +0,0 @@ -if (( $(tree-sitter parse test/Petalisp/**/*.lisp -q | wc -l) > 2 )); then -# ^ @punctuation.special -# ^ @punctuation.special -# ^ @punctuation.bracket - exit 1 -fi diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/c/enums-as-constants.c b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/c/enums-as-constants.c deleted file mode 100644 index 8e64744..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/c/enums-as-constants.c +++ /dev/null @@ -1,21 +0,0 @@ -enum Foo{ - a, -// ^ @constant - aa, -// ^ @constant - C, -}; - -void foo(enum Foo f){ - switch ( f ) { - case a: - // ^ @constant - break; - case aa: - // ^ @constant - break; - case C: - break; - default: - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/capnp/test.capnp b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/capnp/test.capnp deleted file mode 100644 index b70e913..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/capnp/test.capnp +++ /dev/null @@ -1,633 +0,0 @@ -# Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors -# Licensed under the MIT License: -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -@0xd508eebdc2dc42b8; -# <- @keyword.directive -# ^ @punctuation.delimiter - -using Cxx = import "c++.capnp"; -# <- @keyword.import -# ^^^ @type -# ^ @operator -# ^^^^^^ @keyword.import -# ^^^^^^^^^^^ @string.special.path - -# Use a namespace likely to cause trouble if the generated code doesn't use fully-qualified -# names for stuff in the capnproto namespace. -$Cxx.namespace("capnproto_test::capnp::test"); - -enum TestEnum { -# <- @keyword.type -# ^^^^^^^^ @type - foo @0; -# ^^^ @constant -# ^^ @label - bar @1; - baz @2; - qux @3; - quux @4; - corge @5; - grault @6; - garply @7; -} -# <- @punctuation.bracket - -struct TestAllTypes { -# <- @keyword.type - voidField @0 : Void; -# ^^^^^^^^^ @variable.member -# ^ @punctuation.special -# ^^^^ @type.builtin - boolField @1 : Bool; - int8Field @2 : Int8; - int16Field @3 : Int16; - int32Field @4 : Int32; - int64Field @5 : Int64; - uInt8Field @6 : UInt8; - uInt16Field @7 : UInt16; - uInt32Field @8 : UInt32; - uInt64Field @9 : UInt64; - float32Field @10 : Float32; - float64Field @11 : Float64; - textField @12 : Text; - dataField @13 : Data; - structField @14 : TestAllTypes; - enumField @15 : TestEnum; - interfaceField @16 : Void; # TODO - - voidList @17 : List(Void); - boolList @18 : List(Bool); - int8List @19 : List(Int8); - int16List @20 : List(Int16); - int32List @21 : List(Int32); - int64List @22 : List(Int64); - uInt8List @23 : List(UInt8); - uInt16List @24 : List(UInt16); - uInt32List @25 : List(UInt32); - uInt64List @26 : List(UInt64); - float32List @27 : List(Float32); - float64List @28 : List(Float64); - textList @29 : List(Text); - dataList @30 : List(Data); - structList @31 : List(TestAllTypes); - enumList @32 : List(TestEnum); - interfaceList @33 : List(Void); # TODO -} - -struct TestInterleavedGroups { - group1 :group { - foo @0 :UInt32; - bar @2 :UInt64; - union { -# ^^^^^ @keyword.type - qux @4 :UInt16; - corge :group { -# ^^^^^ @type - grault @6 :UInt64; - garply @8 :UInt16; - plugh @14 :Text; - xyzzy @16 :Text; - } - - fred @12 :Text; - } - - waldo @10 :Text; - } - - group2 :group { -# ^^^^^ @keyword.type - foo @1 :UInt32; - bar @3 :UInt64; - union { - qux @5 :UInt16; - corge :group { - grault @7 :UInt64; - garply @9 :UInt16; - plugh @15 :Text; - xyzzy @17 :Text; - } - - fred @13 :Text; - } - - waldo @11 :Text; - } -} - -struct TestUnionDefaults { - s16s8s64s8Set @0 :TestUnion = - (union0 = (u0f0s16 = 321), union1 = (u1f0s8 = 123), union2 = (u2f0s64 = 12345678901234567), -# ^^^ @number - union3 = (u3f0s8 = 55)); - s0sps1s32Set @1 :TestUnion = - (union0 = (u0f1s0 = void), union1 = (u1f0sp = "foo"), union2 = (u2f0s1 = true), -# ^^^^^ @string -# ^^^^ @boolean - union3 = (u3f0s32 = 12345678)); - - unnamed1 @2 :TestUnnamedUnion = (foo = 123); - unnamed2 @3 :TestUnnamedUnion = (bar = 321, before = "foo", after = "bar"); -} - -struct TestUsing { - using OuterNestedEnum = TestNestedTypes.NestedEnum; -# ^^^^^ @keyword.import - using TestNestedTypes.NestedStruct.NestedEnum; - - outerNestedEnum @1 :OuterNestedEnum = bar; - innerNestedEnum @0 :NestedEnum = quux; -} - -struct TestListDefaults { - lists @0 :TestLists = ( - list0 = [(f = void), (f = void)], -# ^^^^ @constant.builtin - list1 = [(f = true), (f = false), (f = true), (f = true)], - list8 = [(f = 123), (f = 45)], - list16 = [(f = 12345), (f = 6789)], - list32 = [(f = 123456789), (f = 234567890)], - list64 = [(f = 1234567890123456), (f = 2345678901234567)], - listP = [(f = "foo"), (f = "bar")], - int32ListList = [[1, 2, 3], [4, 5], [12341234]], - textListList = [["foo", "bar"], ["baz"], ["qux", "corge"]], - structListList = [[(int32Field = 123), (int32Field = 456)], [(int32Field = 789)]]); -} - -struct TestWholeFloatDefault { - # At one point, these failed to compile in C++ because it would produce literals like "123f", - # which is not valid; it needs to be "123.0f". - field @0 :Float32 = 123; - bigField @1 :Float32 = 2e30; - const constant :Float32 = 456; - const bigConstant :Float32 = 4e30; -# ^^^^ @number.float -} - -struct TestGenerics(Foo, Bar) { - foo @0 :Foo; - rev @1 :TestGenerics(Bar, Foo); - - union { - uv @2:Void; - ug :group { - ugfoo @3:Int32; - } - } - - list @4 :List(Inner); - # At one time this failed to compile with MSVC due to poor expression SFINAE support. - - struct Inner { - foo @0 :Foo; - bar @1 :Bar; - } - - struct Inner2(Baz) { - bar @0 :Bar; - baz @1 :Baz; - innerBound @2 :Inner; - innerUnbound @3 :TestGenerics.Inner; - - struct DeepNest(Qux) { - foo @0 :Foo; - bar @1 :Bar; - baz @2 :Baz; - qux @3 :Qux; - - interface DeepNestInterface(Quux) { -# ^^^^^^^^^ @keyword.type - # At one time this failed to compile. - call @0 () -> (); -# ^^^^ @function.method -# ^^ @punctuation.delimiter - } - } - } - - interface Interface(Qux) { - call @0 Inner2(Text) -> (qux :Qux, gen :TestGenerics(TestAllTypes, TestAnyPointer)); -# ^^^ @variable.parameter -# ^^^ @variable.parameter - } - - annotation ann(struct) :Foo; -# ^^^^^^^^^^ @keyword.type -# ^^^ @function.method -# ^^^^^^ @variable.parameter.builtin - - using AliasFoo = Foo; - using AliasInner = Inner; - using AliasInner2 = Inner2; - using AliasInner2Text = Inner2(Text); - using AliasRev = TestGenerics(Bar, Foo); - - struct UseAliases { - foo @0 :AliasFoo; - inner @1 :AliasInner; - inner2 @2 :AliasInner2; - inner2Bind @3 :AliasInner2(Text); - inner2Text @4 :AliasInner2Text; - revFoo @5 :AliasRev.AliasFoo; - } -} - -struct BoxedText { text @0 :Text; } -using BrandedAlias = TestGenerics(BoxedText, Text); - -struct TestGenericsWrapper(Foo, Bar) { - value @0 :TestGenerics(Foo, Bar); -} - -struct TestGenericsWrapper2 { - value @0 :TestGenericsWrapper(Text, TestAllTypes); -} - -interface TestImplicitMethodParams { - call @0 [T, U] (foo :T, bar :U) -> TestGenerics(T, U); -# ^ @type -# ^ @type -} - -interface TestImplicitMethodParamsInGeneric(V) { - call @0 [T, U] (foo :T, bar :U) -> TestGenerics(T, U); -} - -struct TestGenericsUnion(Foo, Bar) { - # At one point this failed to compile. - - union { - foo @0 :Foo; - bar @1 :Bar; - } -} - -struct TestUseGenerics $TestGenerics(Text, Data).ann("foo") { -# ^ @punctuation.special -# ^^^^^^^^^^^^ @attribute -# ^ @punctuation.delimiter -# ^^^ @attribute - basic @0 :TestGenerics(TestAllTypes, TestAnyPointer); - inner @1 :TestGenerics(TestAllTypes, TestAnyPointer).Inner; - inner2 @2 :TestGenerics(TestAllTypes, TestAnyPointer).Inner2(Text); - unspecified @3 :TestGenerics; - unspecifiedInner @4 :TestGenerics.Inner2(Text); - wrapper @8 :TestGenericsWrapper(TestAllTypes, TestAnyPointer); - cap @18 :TestGenerics(TestInterface, Text); - genericCap @19 :TestGenerics(TestAllTypes, List(UInt32)).Interface(Data); - - default @5 :TestGenerics(TestAllTypes, Text) = - (foo = (int16Field = 123), rev = (foo = "text", rev = (foo = (int16Field = 321)))); - defaultInner @6 :TestGenerics(TestAllTypes, Text).Inner = - (foo = (int16Field = 123), bar = "text"); - defaultUser @7 :TestUseGenerics = (basic = (foo = (int16Field = 123))); - defaultWrapper @9 :TestGenericsWrapper(Text, TestAllTypes) = - (value = (foo = "text", rev = (foo = (int16Field = 321)))); - defaultWrapper2 @10 :TestGenericsWrapper2 = - (value = (value = (foo = "text", rev = (foo = (int16Field = 321))))); - - aliasFoo @11 :TestGenerics(TestAllTypes, TestAnyPointer).AliasFoo = (int16Field = 123); - aliasInner @12 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner - = (foo = (int16Field = 123)); - aliasInner2 @13 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2 - = (innerBound = (foo = (int16Field = 123))); - aliasInner2Bind @14 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2(List(UInt32)) - = (baz = [12, 34], innerBound = (foo = (int16Field = 123))); - aliasInner2Text @15 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2Text - = (baz = "text", innerBound = (foo = (int16Field = 123))); - aliasRev @16 :TestGenerics(TestAnyPointer, Text).AliasRev.AliasFoo = "text"; - - useAliases @17 :TestGenerics(TestAllTypes, List(UInt32)).UseAliases = ( - foo = (int16Field = 123), - inner = (foo = (int16Field = 123)), - inner2 = (innerBound = (foo = (int16Field = 123))), - inner2Bind = (baz = "text", innerBound = (foo = (int16Field = 123))), - inner2Text = (baz = "text", innerBound = (foo = (int16Field = 123))), - revFoo = [12, 34, 56]); -} - -struct TestEmptyStruct {} - -struct TestConstants { - const voidConst :Void = void; -# ^^^^^ @keyword.modifier - const boolConst :Bool = true; - const int8Const :Int8 = -123; - const int16Const :Int16 = -12345; - const int32Const :Int32 = -12345678; - const int64Const :Int64 = -123456789012345; - const uint8Const :UInt8 = 234; - const uint16Const :UInt16 = 45678; - const uint32Const :UInt32 = 3456789012; - const uint64Const :UInt64 = 12345678901234567890; - const float32Const :Float32 = 1234.5; - const float64Const :Float64 = -123e45; - const textConst :Text = "foo"; - const dataConst :Data = "bar"; - const structConst :TestAllTypes = ( - voidField = void, - boolField = true, - int8Field = -12, - int16Field = 3456, - int32Field = -78901234, - int64Field = 56789012345678, - uInt8Field = 90, - uInt16Field = 1234, - uInt32Field = 56789012, - uInt64Field = 345678901234567890, - float32Field = -1.25e-10, - float64Field = 345, - textField = "baz", - dataField = "qux", - structField = ( - textField = "nested", - structField = (textField = "really nested")), - enumField = baz, - # interfaceField can't have a default - - voidList = [void, void, void], - boolList = [false, true, false, true, true], - int8List = [12, -34, -0x80, 0x7f], - int16List = [1234, -5678, -0x8000, 0x7fff], - int32List = [12345678, -90123456, -0x80000000, 0x7fffffff], - int64List = [123456789012345, -678901234567890, -0x8000000000000000, 0x7fffffffffffffff], - uInt8List = [12, 34, 0, 0xff], - uInt16List = [1234, 5678, 0, 0xffff], - uInt32List = [12345678, 90123456, 0, 0xffffffff], - uInt64List = [123456789012345, 678901234567890, 0, 0xffffffffffffffff], - float32List = [0, 1234567, 1e37, -1e37, 1e-37, -1e-37], - float64List = [0, 123456789012345, 1e306, -1e306, 1e-306, -1e-306], - textList = ["quux", "corge", "grault"], - dataList = ["garply", "waldo", "fred"], - structList = [ - (textField = "x " "structlist" - " 1"), - (textField = "x structlist 2"), - (textField = "x structlist 3")], - enumList = [qux, bar, grault] - # interfaceList can't have a default - ); - const enumConst :TestEnum = corge; - - const voidListConst :List(Void) = [void, void, void, void, void, void]; - const boolListConst :List(Bool) = [true, false, false, true]; - const int8ListConst :List(Int8) = [111, -111]; - const int16ListConst :List(Int16) = [11111, -11111]; - const int32ListConst :List(Int32) = [111111111, -111111111]; - const int64ListConst :List(Int64) = [1111111111111111111, -1111111111111111111]; - const uint8ListConst :List(UInt8) = [111, 222] ; - const uint16ListConst :List(UInt16) = [33333, 44444]; - const uint32ListConst :List(UInt32) = [3333333333]; - const uint64ListConst :List(UInt64) = [11111111111111111111]; - const float32ListConst :List(Float32) = [5555.5, inf, -inf, nan]; - const float64ListConst :List(Float64) = [7777.75, inf, -inf, nan]; - const textListConst :List(Text) = ["plugh", "xyzzy", "thud"]; - const dataListConst :List(Data) = ["oops", "exhausted", "rfc3092"]; - const structListConst :List(TestAllTypes) = [ - (textField = "structlist 1"), - (textField = "structlist 2"), - (textField = "structlist 3")]; - const enumListConst :List(TestEnum) = [foo, garply]; -} - -const globalInt :UInt32 = 12345; -const globalText :Text = "foobar"; -const globalStruct :TestAllTypes = (int32Field = 54321); -const globalPrintableStruct :TestPrintInlineStructs = (someText = "foo"); -const derivedConstant :TestAllTypes = ( - uInt32Field = .globalInt, - textField = TestConstants.textConst, - structField = TestConstants.structConst, - int16List = TestConstants.int16ListConst, - structList = TestConstants.structListConst); - -const genericConstant :TestGenerics(TestAllTypes, Text) = - (foo = (int16Field = 123), rev = (foo = "text", rev = (foo = (int16Field = 321)))); - -const embeddedData :Data = embed "testdata/packed"; -# ^^^^^ @keyword.import -const embeddedText :Text = embed "testdata/short.txt"; -const embeddedStruct :TestAllTypes = embed "testdata/binary"; - -const nonAsciiText :Text = "♫ é ✓"; - -const blockText :Text = - `foo bar baz - `"qux" `corge` 'grault' - "regular\"quoted\"line" - `garply\nwaldo\tfred\"plugh\"xyzzy\'thud - ; - -struct TestAnyPointerConstants { - anyKindAsStruct @0 :AnyPointer; - anyStructAsStruct @1 :AnyStruct; - anyKindAsList @2 :AnyPointer; - anyListAsList @3 :AnyList; -} - -const anyPointerConstants :TestAnyPointerConstants = ( - anyKindAsStruct = TestConstants.structConst, - anyStructAsStruct = TestConstants.structConst, - anyKindAsList = TestConstants.int32ListConst, - anyListAsList = TestConstants.int32ListConst, -); - -interface TestInterface { - foo @0 (i :UInt32, j :Bool) -> (x :Text); -# ^ @variable.parameter - bar @1 () -> (); - baz @2 (s: TestAllTypes); -} - -interface TestExtends extends(TestInterface) { -# ^^^^^^^ @keyword - qux @0 (); - corge @1 TestAllTypes -> (); - grault @2 () -> TestAllTypes; -} - -interface TestTailCallee $Cxx.allowCancellation { - struct TailResult { - i @0 :UInt32; - t @1 :Text; - c @2 :TestCallOrder; - } - - foo @0 (i :Int32, t :Text) -> TailResult; -} - -interface TestTailCaller { - foo @0 (i :Int32, callee :TestTailCallee) -> TestTailCallee.TailResult; -} - -interface TestStreaming $Cxx.allowCancellation { - doStreamI @0 (i :UInt32) -> stream; - doStreamJ @1 (j :UInt32) -> stream; - finishStream @2 () -> (totalI :UInt32, totalJ :UInt32); - # Test streaming. finishStream() returns the totals of the values streamed to the other calls. -} - -interface TestHandle {} - -interface TestMoreStuff extends(TestCallOrder) { - # Catch-all type that contains lots of testing methods. - - callFoo @0 (cap :TestInterface) -> (s: Text); - # Call `cap.foo()`, check the result, and return "bar". - - callFooWhenResolved @1 (cap :TestInterface) -> (s: Text); - # Like callFoo but waits for `cap` to resolve first. - - neverReturn @2 (cap :TestInterface) -> (capCopy :TestInterface) $Cxx.allowCancellation; - # Doesn't return. You should cancel it. - - hold @3 (cap :TestInterface) -> (); - # Returns immediately but holds on to the capability. - - callHeld @4 () -> (s: Text); - # Calls the capability previously held using `hold` (and keeps holding it). - - getHeld @5 () -> (cap :TestInterface); - # Returns the capability previously held using `hold` (and keeps holding it). - - echo @6 (cap :TestCallOrder) -> (cap :TestCallOrder); - # Just returns the input cap. - - expectCancel @7 (cap :TestInterface) -> () $Cxx.allowCancellation; - # evalLater()-loops forever, holding `cap`. Must be canceled. - - methodWithDefaults @8 (a :Text, b :UInt32 = 123, c :Text = "foo") -> (d :Text, e :Text = "bar"); - - methodWithNullDefault @12 (a :Text, b :TestInterface = null); - - getHandle @9 () -> (handle :TestHandle); - # Get a new handle. Tests have an out-of-band way to check the current number of live handles, so - # this can be used to test garbage collection. - - getNull @10 () -> (nullCap :TestMoreStuff); - # Always returns a null capability. - - getEnormousString @11 () -> (str :Text); - # Attempts to return an 100MB string. Should always fail. - - writeToFd @13 (fdCap1 :TestInterface, fdCap2 :TestInterface) - -> (fdCap3 :TestInterface, secondFdPresent :Bool); - # Expects fdCap1 and fdCap2 wrap socket file descriptors. Writes "foo" to the first and "bar" to - # the second. Also creates a socketpair, writes "baz" to one end, and returns the other end. - - throwException @14 (); - throwRemoteException @15 (); -} - -interface TestMembrane { - makeThing @0 () -> (thing :Thing); - callPassThrough @1 (thing :Thing, tailCall :Bool) -> Result; - callIntercept @2 (thing :Thing, tailCall :Bool) -> Result; - loopback @3 (thing :Thing) -> (thing :Thing); - - waitForever @4 () $Cxx.allowCancellation; - - interface Thing { - passThrough @0 () -> Result; - intercept @1 () -> Result; - } - - struct Result { - text @0 :Text; - } -} - -struct TestNameAnnotation $Cxx.name("RenamedStruct") { - union { - badFieldName @0 :Bool $Cxx.name("goodFieldName"); - bar @1 :Int8; - } - - enum BadlyNamedEnum $Cxx.name("RenamedEnum") { - foo @0; - bar @1; - baz @2 $Cxx.name("qux"); - } - - anotherBadFieldName @2 :BadlyNamedEnum $Cxx.name("anotherGoodFieldName"); - - struct NestedStruct $Cxx.name("RenamedNestedStruct") { - badNestedFieldName @0 :Bool $Cxx.name("goodNestedFieldName"); - anotherBadNestedFieldName @1 :NestedStruct $Cxx.name("anotherGoodNestedFieldName"); - - enum DeeplyNestedEnum $Cxx.name("RenamedDeeplyNestedEnum") { - quux @0; - corge @1; - grault @2 $Cxx.name("garply"); - } - } - - badlyNamedUnion :union $Cxx.name("renamedUnion") { - badlyNamedGroup :group $Cxx.name("renamedGroup") { - foo @3 :Void; - bar @4 :Void; - } - baz @5 :NestedStruct $Cxx.name("qux"); - } -} - -interface TestNameAnnotationInterface $Cxx.name("RenamedInterface") { - badlyNamedMethod @0 (badlyNamedParam :UInt8 $Cxx.name("renamedParam")) $Cxx.name("renamedMethod"); -} - -struct TestImpliedFirstField { - struct TextStruct { - text @0 :Text; - i @1 :UInt32 = 321; - } - - textStruct @0 :TextStruct = "foo"; - textStructList @1 :List(TextStruct); - - intGroup :group { - i @2 :UInt32; - str @3 :Text = "corge"; - } -} - -const testImpliedFirstField :TestImpliedFirstField = ( - textStruct = "bar", - textStructList = ["baz", (text = "qux", i = 123)], - intGroup = 123 -); - -struct TestCycleANoCaps { - foo @0 :TestCycleBNoCaps; -} - -struct TestCycleBNoCaps { - foo @0 :List(TestCycleANoCaps); - bar @1 :TestAllTypes; -} - -struct TestCycleAWithCaps { - foo @0 :TestCycleBWithCaps; -} - -struct TestCycleBWithCaps { - foo @0 :List(TestCycleAWithCaps); - bar @1 :TestInterface; -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/clojure/test.clj b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/clojure/test.clj deleted file mode 100644 index 7401019..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/clojure/test.clj +++ /dev/null @@ -1,114 +0,0 @@ -(ns test {:clj-kondo/ignore true}) -; <- @punctuation.bracket -; ^ @keyword.import -; ^ @module - - ; asdf -;^^^^^^ @comment - - #_ abc -;^^^^^^ @comment - -(func obj) -;^^^^ @function.call -; ^^^ @variable - - #(+ % %1 %& %a) -;^ @punctuation.special -; ^ @function.call -; ^ ^^ ^^ @variable.builtin -; ^^ @variable - - abc# -;^^^^ @variable - - & -;^ @variable.parameter - - ->abc -;^^^^^ @constructor - - ->>abc -;^^^^^^ @variable - - *1 *2 *3 *e -;^^ ^^ ^^ ^^ @variable.builtin - - .method -;^^^^^^^ @function.method - -(.method foo) -;^^^^^^^ @function.method - -(.-field foo) -;^^^^^^^ @variable.member - - Abc/member -;^^^^^^^^^^ @variable.member - -(Abc/method) -;^^^^^^^^^^ @function.method - - Abc -;^^^ @type - - abc. -;^^^^ @type - - ^abc -;^ @punctuation.special - -^java.io.File file -; <- @punctuation.special -;^^^^^^^^^^^^ @type -; ^^^^ @variable - -^java.io.File java.io.File. -; <- @punctuation.special -;^^^^^^^^^^^^ @type -; ^^^^ @variable - -^java.io.File file. -; <- @punctuation.special -;^^^^^^^^^^^^ @type -; ^^^^ @variable - -(^java.io.File file) -;^ @punctuation.special -; ^^^^^^^^^^^^ @type -; ^^^^ @function.call - -(^java.io.File .file foo) -;^ @punctuation.special -; ^^^^^^^^^^^^ @type -; ^^^^ @function.method -; ^^^@variable - -(^java.io.File .-file foo) -;^ @punctuation.special -; ^^^^^^^^^^^^ @type -; ^^^^ @variable.member -; ^^^@variable - -(^java.io.File Abc/method foo) -;^ @punctuation.special -; ^^^^^^^^^^^^ @type -; ^^^^^^^^^^ @function.method -; ^^^ @variable - - (defn foo [arg1] (+ arg1 1)) -;^ ^ ^ ^ ^^ @punctuation.bracket -; ^^^^ @keyword.function -; ^^^ @function -; ^^^^ ^^^^ @variable -; ^ @operator -; ^ @number - - clojure.core/dfn -;^^^^^^^^^^^^^^^^ @variable - - clojure.core/defn -;^^^^^^^^^^^^^^^^ @keyword.function - - any-ns/defn -;^^^^^^^^^^^ @keyword.function diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/concepts.cpp b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/concepts.cpp deleted file mode 100644 index 3189813..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/concepts.cpp +++ /dev/null @@ -1,22 +0,0 @@ - -template -concept Derived = std::is_base_of::value; -// ^ @keyword.type -// ^ @type.definition - -template -concept Hashable = requires(T a) { -// ^ @keyword -// ^ @variable.parameter -// ^ @type - { std::hash{}(a) } -> std::convertible_to; - typename CommonType; // CommonType is valid and names a type - { CommonType{std::forward(t)} }; - { CommonType{std::forward(u)} }; -}; - - -template - requires requires (T x) { x + x; } // ad-hoc constraint, note keyword used twice -// ^ @keyword -T add(T a, T b) { return a + b; } diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/enums-as-constants.cpp b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/enums-as-constants.cpp deleted file mode 100644 index d6b93d5..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/enums-as-constants.cpp +++ /dev/null @@ -1,25 +0,0 @@ -enum class Foo{ - a, -// ^ @constant - aa, -// ^ @constant - C, -// ^ @constant -}; - -void foo(Foo f){ - switch ( f ) { - case Foo::a: - // ^ @type - // ^ @module - // ^ @constant - break; - case Foo::aa: - // ^ @constant - break; - case Foo::C: - // ^ @constant - break; - default: - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/static-namespace-functions.cpp b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/static-namespace-functions.cpp deleted file mode 100644 index 3d16c43..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/static-namespace-functions.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Issue #2396 - -int main() -{ - B::foo(); - // ^ @function.call - Foo::A::foo(); - // ^ @function.call - Foo::a::A::foo(); - // ^ @function.call - Foo::a::A::B::foo(); - // ^ @function.call - return 0; -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/test.cpp b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/test.cpp deleted file mode 100644 index 4a4c623..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/cpp/test.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -// ^ @keyword.import -// ^ @string - -auto main( int argc, char** argv ) -> int -// ^ @type.builtin - // ^ @variable.parameter - // ^ @type.builtin - // ^ @type.builtin - // ^ @operator -{ - std::cout << "Hello world!" << std::endl; - // ^ @punctuation.delimiter - - return EXIT_SUCCESS; - // ^ @keyword.return - // ^ @constant -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/ecma/const.js b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/ecma/const.js deleted file mode 100644 index 2b778fd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/ecma/const.js +++ /dev/null @@ -1,13 +0,0 @@ -_FOO = 4 -// <- @constant -__A__ = 2 -// <- @constant -_ = 2 -// <- @variable -A_B_C = 4 -// <- @constant -_1 = 1 -// <- @variable - -const A = 2 -// ^ @constant diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/ecma/test.ts b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/ecma/test.ts deleted file mode 100644 index fa926f9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/ecma/test.ts +++ /dev/null @@ -1,32 +0,0 @@ -class H { - pub_field = "Hello"; - // ^ @variable.member - - #priv_field = "World!"; - // ^ @variable.member - - #private_method() { - // ^ @function.method - return `${this.pub_field} -- ${this.#priv_field}`; - // ^ @variable.member - // ^ @variable.member - } - - public_method() { - // ^ @function.method - return this.#private_method(); - // ^ @function.method.call - } - - ok() { - return this.public_method(); - // ^ @function.method.call - } -} - -function doSomething(options) { - const { - enable: on, - // ^ @punctuation.delimiter - } = options -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/afx.fusion b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/afx.fusion deleted file mode 100644 index 4ccb817..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/afx.fusion +++ /dev/null @@ -1,17 +0,0 @@ -property = afx` - - - -
text
- - - - - - - true} /> - - - - -` diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/basic.fusion b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/basic.fusion deleted file mode 100644 index 5f3cc34..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/basic.fusion +++ /dev/null @@ -1,60 +0,0 @@ -include: SomeFile.fusion -//<- @keyword.import -// ^ @string.special.url - -namespace: ns = Neos.Fusion.Space -//<- @keyword.type -// ^ @module -// ^ @operator -// ^ @module - -prototype(MyType) < prototype(ns:SuperType) { -//<-keyword -// ^ @punctuation.bracket -// ^ @type -// ^ @punctuation.bracket -// ^ @operator -// ^ @module -// ^ @type - - deleteProp > - // ^ @operator - - string = 'value' - //<- @property - // ^ @operator - // ^ @string - - number = 10.2 - // ^ @number - - null = null - // ^ @constant.builtin - - boolean = true - // ^ @boolean - - property.inner = "value" - //<- @property - // ^ @property - - property.@meta = "value" - //<- @property - // ^ @attribute - - property.type = SomeType - //<- @property - // ^ @type - - property.aliasedType = ns:SomeType - //<- @property - // ^ @module - // ^ @type - - property.fullQualifiedType = SomeNamespace:SomeType - //<- @property - // ^ @module - // ^ @type - -} - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/expressions.fusion b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/expressions.fusion deleted file mode 100644 index b1822dd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/fusion/expressions.fusion +++ /dev/null @@ -1,82 +0,0 @@ -string = ${'foo'} -// ^string - -string = ${'foo \'bar\' baz'} -// ^string - -string = ${"foo"} -// ^string - -string = ${"foo ${test}"} -// ^string - -boolean = ${true} -// ^boolean - -number = ${1} -// ^number - -number = ${1.2} -// ^number - -propertyPath = ${property.path} -// ^variable -// ^variable - -thisorProps = ${this.path} -// ^variable.builtin -// ^variable - -thisorProps = ${props.path} -// ^variable.builtin -// ^variable - -array = ${[]} -// ^punctuation.bracket - -array = ${[true, 'string', 1, [true]]} -// ^punctuation.bracket -// ^boolean -// ^string -// ^number -// ^punctuation.bracket -// ^boolean - -object = ${{}} -// ^punctuation.bracket - -object = ${{first: 'value', second: true, third: [], fourth: object.path }} -// ^property -// ^string -// ^property -// ^boolean -// ^property -// ^punctuation.bracket -// ^property -// ^variable - -result = ${methodCall()} -// ^function - -result = ${Some.methodCall(param, param)} -// ^function -// ^variable -// ^variable - -arrowFunction = ${map(foo, (bar, buz) => bar * buz)} -// ^function -// ^variable -// ^variable - -logic = ${!foo && !(bar || baz) and not 'string'} -// ^operator -// ^operator -// ^operator -// ^operator -// ^operator - -ternary = ${ check ? true : false} -// ^@keyword.conditional.ternary -// ^@keyword.conditional.ternary - - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gitattributes/test.gitattributes b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gitattributes/test.gitattributes deleted file mode 100644 index 4595b94..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gitattributes/test.gitattributes +++ /dev/null @@ -1,37 +0,0 @@ -[attr]nodiff -diff -merge -# <- @keyword.directive -# ^^^^^^ @property -# ^ @operator -# ^^^^ @variable.builtin -# ^ @operator -# ^^^^^ @variable.builtin - -vendor/** linguist-vendored=true -# ^ @punctuation.delimiter -# ^^ @character.special -# ^^^^^^^^^^^^^^^^^ @variable.parameter -# ^ @operator -# ^^^^ @boolean - - [^._]-[[:lower:]] !something -# ^ @punctuation.bracket -# ^ @operator -# ^^ @string.special -# ^ @punctuation.bracket -# ^ @punctuation.bracket -# ^^^^^^^^^ @constant -# ^ @punctuation.bracket -# ^ @operator -# ^^^^^^^^^^ @variable.parameter - -"_\u4E00\t\56txt" encoding=UTF-16 -# <- @punctuation.special -# ^^^^^^ @string.escape -# ^^ @string.escape -# ^^^ @string.escape -# ^ @punctuation.special -# ^^^^^^^^ @variable.builtin -# ^ @operator -# ^^^^^^ @string - -# vim:ft=gitattributes: diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/assert.gleam b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/assert.gleam deleted file mode 100644 index 8be3992..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/assert.gleam +++ /dev/null @@ -1,13 +0,0 @@ -pub fn main() { - assert Ok(i) = parse_int("123") - // <- @keyword.exception - // ^^ @constructor - // ^ @punctuation.bracket - // ^ @variable - // ^ @punctuation.bracket - // ^ @operator - // ^^^^^^^^^ @function.call - // ^ @punctuation.bracket - // ^^^^^ @string - // ^ @punctuation.bracket -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/function.gleam b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/function.gleam deleted file mode 100644 index 15fc5cc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/function.gleam +++ /dev/null @@ -1,127 +0,0 @@ -pub fn add(x: Int, y: Int) -> Int { -// <- @keyword.modifier -// ^^ @keyword.function -// ^^^ @function -// ^ @punctuation.bracket -// ^ @variable.parameter -// ^ @punctuation.delimiter -// ^^^ @type -// ^ @punctuation.delimiter -// ^ @variable.parameter -// ^ @punctuation.delimiter -// ^^^ @type -// ^ @punctuation.bracket -// ^ @punctuation.delimiter -// ^^^ @type -// ^ @punctuation.bracket -} -// <- @punctuation.bracket - -pub fn twice(f: fn(t) -> t, x: t) -> t { -// <- @keyword.modifier -// ^ @keyword.function -// ^^^^^ @function -// ^ @punctuation.bracket -// ^ @variable.parameter -// ^ @punctuation.delimiter -// ^^ @keyword.function -// ^ @punctuation.bracket -// ^ @type -// ^ @punctuation.bracket -// ^^ @punctuation.delimiter -// ^ @type -// ^ @punctuation.delimiter -// ^ @variable.parameter -// ^ @punctuation.delimiter -// ^ @type -// ^ @punctuation.bracket -// ^^ @punctuation.delimiter -// ^ @type -// ^ @punctuation.bracket -} -// <- @punctuation.bracket - -fn list_of_two(my_value: a) -> List(a) { -// <- @keyword.function -// ^ @function -// ^ @punctuation.bracket -// ^ @variable.parameter -// ^ @punctuation.delimiter -// ^ @type -// ^ @punctuation.bracket -// ^ @punctuation.delimiter -// ^^^^ @type -// ^ @punctuation.bracket -// ^ @type -// ^ @punctuation.bracket -// ^ @punctuation.bracket -} -// <- @punctuation.bracket - -fn replace( -// <- @keyword.function -// ^^^^^^^ @function -// ^ @punctuation.bracket - in string: String, - // <- @label - // ^^^^^^ @variable.parameter - // ^ @punctuation.delimiter - // ^^^^^^ @type - // ^ @punctuation.delimiter - each pattern: String, - // <- @label - // ^^^^^^^ @variable.parameter - // ^ @punctuation.delimiter - // ^^^^^^ @type - // ^ @punctuation.delimiter - with replacement: String, - // <- @label - // ^^^^^^^^^^^ @variable.parameter - // ^ @punctuation.delimiter - // ^^^^^^ @type - // ^ @punctuation.delimiter -) { - replace(in: "A,B,C", each: ",", with: " ") - // <- @function.call - // ^ @punctuation.bracket - // ^^ @label - // ^ @punctuation.delimiter - // ^^^^^^^ @string - // ^ @punctuation.delimiter - // ^^^^ @label - // ^ @punctuation.delimiter - // ^^^ @string - // ^ @punctuation.delimiter - // ^^^^ @label - // ^ @punctuation.delimiter - // ^^^ @string - // ^ @punctuation.bracket -} -// <- @punctuation.bracket - -pub external fn random_float() -> Float = "rand" "uniform" -// <- @keyword.modifier -// ^^^^^^^^ @keyword.modifier -// ^^ @keyword.function -// ^^^^^^^^^^^^ @function -// ^ @punctuation.bracket -// ^ @punctuation.bracket -// ^^ @punctuation.delimiter -// ^^^^^ @type -// ^ @operator -// ^^^^^^ @module -// ^^^^^^^^^ @function - -pub external fn inspect(a) -> a = "Elixir.IO" "inspect" -// <- @keyword.modifier -// ^^^^^^^^ @keyword.modifier -// ^^ @keyword.function -// ^^^^^^^ @function -// ^ @punctuation.bracket -// ^ @type -// ^ @punctuation.bracket -// ^^ @punctuation.delimiter -// ^ @type -// ^ @operator -// ^^^^^^^^^^^ @module -// ^^^^^^^^^ @function diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/import.gleam b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/import.gleam deleted file mode 100644 index ac452d1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/import.gleam +++ /dev/null @@ -1,22 +0,0 @@ -import gleam/io -// <- @keyword.import -// ^ @module -// ^ @operator -// ^ @module - -import cat as kitten -// <- @keyword.import -// ^ @module -// ^ @keyword -// ^ @module - -import animal/cat.{Cat, stroke} -// <- @keyword.import -// ^ @module -// ^ @operator -// ^ @punctuation.delimiter -// ^ @punctuation.bracket -// ^^^ @type -// ^ @punctuation.delimiter -// ^^^^^^ @function -// ^ @punctuation.bracket diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/pipe.gleam b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/pipe.gleam deleted file mode 100644 index c696b02..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/pipe.gleam +++ /dev/null @@ -1,18 +0,0 @@ -pub fn run() { - 1 - // <- @number - |> add(_, 2) - // <- @operator - // ^^^ @function.call - // ^ @punctuation.bracket - // ^ @comment - // ^ @punctuation.delimiter - // ^ @number - // ^ @punctuation.bracket - |> add(3) - // <- @operator - // ^^^ @function.call - // ^ @punctuation.bracket - // ^ @number - // ^ @punctuation.bracket -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/todo.gleam b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/todo.gleam deleted file mode 100644 index b7384ec..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/todo.gleam +++ /dev/null @@ -1,7 +0,0 @@ -fn favourite_number() -> Int { - todo("We're going to decide which number is best tomorrow") - // <- @keyword - // ^ @punctuation.bracket - // ^ @string - // ^ @punctuation.bracket -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/type.gleam b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/type.gleam deleted file mode 100644 index 5b0aa02..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/gleam/type.gleam +++ /dev/null @@ -1,84 +0,0 @@ -pub type Cat { -// <- @keyword.modifier -// ^^^^ @keyword.type -// ^^^ @type -// ^ @punctuation.bracket - Cat(name: String, cuteness: Int) - // <- @constructor - // ^ @punctuation.bracket - // ^^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^^^^ @type - // ^ @punctuation.delimiter - // ^^^^^^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^ @type - // ^ @punctuation.bracket -} - -fn cats() { - Cat(name: "Nubi", cuteness: 2001) - // <- @type - // ^ @punctuation.bracket - // ^^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^^^^ @string - // ^ @punctuation.delimiter - // ^^^^^^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^^ @number - // ^ @punctuation.bracket - Cat("Ginny", 1950) - // <- @constructor - // ^ @punctuation.bracket - // ^^^^^^^ @string - // ^ @punctuation.delimiter - // ^^^^ @number - // ^ @punctuation.bracket -} - -type Box(inner_type) { -// <- @keyword.type -// ^^^ @type -// ^ @punctuation.bracket -// ^^^^^^^^^^ @type -// ^ @punctuation.bracket -// ^ @punctuation.bracket - Box(inner: inner_type) - // <- @constructor - // ^ @punctuation.bracket - // ^^^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^^^^^^^^ @type - // ^ @punctuation.bracket -} - -pub opaque type Counter { -// <- @keyword.modifier -// ^^^^^^ @keyword.modifier -// ^^^^ @keyword.type -// ^^^^^^^ @type -// ^ @punctuation.bracket - Counter(value: Int) -} - -pub fn have_birthday(person) { - Person(..person, age: person.age + 1, is_happy: True) - // <- @constructor - // ^ @punctuation.bracket - // ^^ @operator - // ^^^^^^ @variable - // ^ @punctuation.delimiter - // ^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^^^^ @variable - // ^ @punctuation.delimiter - // ^^^ @variable.member - // ^ @operator - // ^ @number - // ^ @punctuation.delimiter - // ^^^^^^^^ @variable.member - // ^ @punctuation.delimiter - // ^^^^ @boolean - // ^ @punctuation.bracket -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/as-foreach.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/as-foreach.hack deleted file mode 100644 index 6110271..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/as-foreach.hack +++ /dev/null @@ -1,6 +0,0 @@ -foreach (($array as vec[]) as $item) {} -// ^ @keyword.repeat -// ^ @type - -# Our expectation test for the code below intentionally includes an ERROR. -foreach ($array as vec[] as $item) {} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/async-functions.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/async-functions.hack deleted file mode 100644 index 41779d7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/async-functions.hack +++ /dev/null @@ -1,8 +0,0 @@ -async function func0(): void {} -// ^ @type.builtin -async function func1() {} -// ^ @type.builtin -// ^ @keyword.operator - - -async ($x) ==> $x + 1; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/attribute-type.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/attribute-type.hack deleted file mode 100644 index 0bd12df..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/attribute-type.hack +++ /dev/null @@ -1,15 +0,0 @@ -<> -newtype T1 = ?shape( -// TODO: ?operator (? not captureable at the moment) - ?'int' => int -// ^ @operator -); - -<> -// ^ @attribute -type T2 = (function(T1): string); -// ^ @type -// TODO: keyword.function (currently not in AST) - -<> -newtype T3 as int = int; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/generics.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/generics.hack deleted file mode 100644 index 50bd50e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/generics.hack +++ /dev/null @@ -1,24 +0,0 @@ -class Box { - // ^ @type - // ^ @type - protected T $data; - // ^ @keyword.modifier - // ^ @type - - public function __construct(T $data) { - // ^ @type - // ^ @variable.parameter - // ^ @keyword.function - // ^ @keyword.modifier - // ^ @function.method - $this->data = $data; - } - - public function getData(): T { - // ^ @function.method - // ^ @keyword.modifier - return $this->data; - // ^ @operator - // ^ @variable.builtin - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/heredoc-dollar.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/heredoc-dollar.hack deleted file mode 100644 index 8ea2473..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/heredoc-dollar.hack +++ /dev/null @@ -1,4 +0,0 @@ -<< int, - // ^ @string - "b" => string, - // ^ @type.builtin - ); -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/use.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/use.hack deleted file mode 100644 index ab17d11..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/use.hack +++ /dev/null @@ -1,28 +0,0 @@ -use const Space\Const\C; -// ^ @keyword -// ^ @constant -use function Space\Func\F as E; -// ^ @function -// ^ @function -use type Space\Type\T; -// ^ @keyword.type -use namespace Space\Name\N as M; -// ^ @keyword.type -// ^ @module - -use namespace Space\Name2\N2, Space\Nothing\N3 as N8, type Space\Type2\N4,; -// ^ @module -// ^ @type -use namespace Space\Name\N10\{A as A2, B\}; -// ^ @module -// ^ @module -// ^ @module -use namespace Space\Name\{\C, Slash as Forward}; - -use \What\Is\This\{function A as A2, B, const H\S\L as stdlib, function F}; - -use type \{kind,}; -use Q\B\{kind2,}; -// ^ @module -use type Q\B\{kind3,}; -// <- @keyword.import diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/using.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/using.hack deleted file mode 100644 index c3a7be1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/using.hack +++ /dev/null @@ -1,3 +0,0 @@ -using ($new = new Object(), $file = new File('using', '+using')) {} -// <- @keyword -// ^ @type diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/xhp.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/xhp.hack deleted file mode 100644 index 57563a1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hack/xhp.hack +++ /dev/null @@ -1,10 +0,0 @@ -$user_name = 'Fred'; -echo "Hello $user_name"; - -// XHP: Typechecked, well-formed, and secure -$user_name = 'Andrew'; -$xhp = Hello {$user_name}; -// ^ @tag -// ^ @tag -// ^ @string -echo await $xhp->toStringAsync(); diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/haskell/test.hs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/haskell/test.hs deleted file mode 100644 index f719981..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/haskell/test.hs +++ /dev/null @@ -1,343 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} --- ^ @keyword.directive - -{-| Main module -} - -- ^ @comment.documentation -module Main --- ^ @keyword.import - -- ^ @module - ( main - -- ^ @variable - ) where - -- ^ @keyword - -import Prelude hiding (show) --- ^ @keyword.import - -- ^ @module - -- ^ @keyword - -- ^ @variable -import Data.Map (fromList) - -- ^ @module -import qualified Data.Map as Map - -- ^ @module - -- ^ @module -import qualified Chronos - -- ^ @module -import qualified Chronos as C - -- ^ @module - -- ^ @module -import FooMod (BarTy (barField)) - -- ^ @variable.member - -x = mempty { field = 5 } - -- ^ @variable.member - -data ADT --- ^ @keyword - = A Int - -- ^ @constructor - -- ^ @type - | B - -- ^ @constructor - deriving (Eq, Show) - -- ^ @keyword - -- ^ @type - -- ^ @type -mkA x = A x - -- ^ @variable -mkAQualified x = SomeModule.A x - -- ^ @variable - -class Ord a => PartialOrd a - -- ^ @type - -- ^ @variable - -- ^ @type - -- ^ @variable - -instance Ord ADT where - -- ^ @type - -- ^ @type - -newtype Rec --- ^ @keyword - -- ^ @type - = Rec - -- ^ @constructor - { field :: Double - -- ^ @punctuation.bracket - -- ^ @variable.member - -- ^ @type - } - -- ^ @punctuation.bracket - deriving Eq - -- ^ @type -recordWildCard Rec { field } = field - -- ^ @variable.member -recordDotSyntax rec = rec.field - -- ^ @variable.member - - -main :: IO () --- ^ @function - -- ^ @operator - -- ^ @type - -- ^ @type -main = undefined --- ^ @function - -- ^ @keyword.exception - -someFunc0 :: Int -> Int - -- ^ @operator -someFunc0 x = someFunc1 x - -- ^ @variable.parameter - -- ^ @function.call - where - -- ^ @keyword - someFunc1 _ = 5 - -- ^ @function - -- ^ @number -scopedTypeParam (x :: Int) = someFunc x - -- ^ @variable.parameter - -- ^ @type -scopedTypeParam (Just x :: Int) = someFunc x - -- ^ @constructor - -- ^ @variable.parameter - -- ^ @type -scopedTypeParam (f :: Int -> Int) = someFunc x - -- ^ @function - -someInfix :: Integral a => a -> Double - -- ^ @type - -- ^ @variable - -- ^ @operator - -- ^ @variable - -- ^ @type -someInfix x = fromIntegral x `myAdd` floatVal - -- ^ @function.call - -- ^ @variable - -- ^ @operator - -- ^ @variable - where - myAdd :: Num a => a -> a - -- ^ @function - myAdd x y = x + y - -- ^ @variable - -- ^ @variable - floatVal :: Double - -- ^ @variable - floatVal = 5.5 - -- ^ @variable - -- ^ @number.float - intVal :: Int - -- ^ @variable - intVal = getInt 5 - -- ^ @variable - boolVal :: Bool - -- ^ @variable - boolVal = bool False True $ 1 + 2 == 3 - -- ^ @variable - refVal = boolVal - -- ^ @variable - namespacedRecord = NS.Rec { field = bar } - -- ^ @variable - record = Rec { field = bar } - -- ^ @variable - constructorRef = A - -- ^ @function - isInt :: Either Double Int -> Bool - -- ^ @function - isInt eith@Left{} = False - -- ^ @variable.parameter - isInt eith@(Left x) = False - -- ^ @function - -- ^ @variable.parameter - isInt (Left x) = False - -- ^ @variable.parameter - isInt (Right _) = True - -- ^ @function - -someIOaction :: IO () --- ^ @function -anotherIOaction :: IO () -anotherIOaction = do --- ^ @function - -- ^ @keyword - foo <- SomeModule.someFun <$> getArgs --- ^ @variable - -- ^ @module - -- ^ @function.call - -- ^ @operator - _ <- someFunc0 =<< someIOAction - -- ^ @function.call - let bar = SomeModule.doSomething $ "a" "b" - -- ^ @variable - -- ^ @module - -- ^ @function.call - -- ^ @operator - func x y = x + y - 7 - -- ^ @function - -- ^ @variable.parameter - -- ^ @variable - -- ^ @variable - gunc x y = func x $ y + 7 - -- ^ @variable - -- ^ @variable - valueFromList = HashSet.fromList [] - -- ^ @variable - when foo $ putStrLn $ T.showt =<< bar - -- ^ @function.call - -- ^ @variable - -- ^ @function.call - -- ^ @function.call - - pure $ func 1 2 - -- ^ @function.call - -- ^ @function.call - -intVal :: Int -intVal = 5 --- ^ @variable - -intFun :: Int -> Int -intFun = 5 --- ^ @function - -undefinedFun :: Int -> Int -undefinedFun = undefined --- ^ @function - -mbInt :: Maybe Int --- ^ @variable -mbInt = Just 5 --- ^ @variable - -tupleVal :: (a, b) --- ^@variable -tupleVal = (1, "x") --- ^@variable - -listVal :: [a] --- ^@variable -listVal = [1, 2] --- ^@variable --- ^@variable -condVal = if otherwise --- ^@variable - then False - else True - -getLambda x = \y -> x `SomeModule.someInfix` y - -- ^ @variable.parameter - -- ^ @module - -- ^ @operator -lambdaTyped = \(y :: Int) -> x - -- ^ @variable.parameter -lambdaPattern = \(Just x) -> x - -- ^ @variable.parameter -lambdaPatternTyped = \(Just x :: Int) -> x - -- ^ @variable.parameter - -isVowel = (`elem` "AEIOU") - -- ^ @operator -isVowelQualified = (`SomeModule.elem` "AEIOU") - -- ^ @module - -- ^ @operator - -hasVowels = ("AEIOU" `elem`) - -- ^ @operator -hasVowelsQualified = ("AEIOU" `SomeModule.elem`) - -- ^ @module - -- ^ @operator - -quasiQuotedString = [qq|Some string|] --- ^ @variable - -- ^ @function.call - -- ^ @string -quasiQuotedString2 = [SomeModule.qq|Some string|] - -- ^ @module - -- ^ @function.call - -composition f g = f . g - -- ^ @function - -- ^ @function -qualifiedComposition = SomeModule.f . SomeModule.g - -- ^ @function - -- ^ @function -takeMVarOrThrow = evaluate <=< takeMVar - -- ^ @function - -- ^ @function -modifyMVarOrThrow v f = modifyMVar v $ f >=> evaluate - -- ^ @variable - -- ^ @function - -- ^ @function -assertNonEmpty xs = xs `shouldSatisfy` not . null - -- ^ @variable - -- ^ @function - -- ^ @function -appliedComposition f g var = (f . g) var - -- ^ @function.call - -- ^ @function.call -appliedComposition f g var = (NS.f . NS.g) var - -- ^ @function.call - -- ^ @function.call -param1 |*| param2 = Qu $ param1 * param2 --- ^ @variable.parameter - -- ^ @variable.parameter -(param1 :: Int) |*| (param2 :: Int) = Qu $ param1 * param2 --- ^ @variable.parameter - -- ^ @variable.parameter -(Qu a) |/| (SomeModule.Qu b) = a / b - -- ^ @variable.parameter - -- ^ @variable.parameter -(Qu a :: Int) |/| (SomeModule.Qu b :: Int) = a / b - -- ^ @variable.parameter - -- ^ @variable.parameter -(Qu a, b, c :: Int) |/| x = undefined - -- ^ @variable.parameter - -- ^ @variable.parameter - -- ^ @variable.parameter -[Qu a, b, c :: Int] >< x = undefined - -- ^ @variable.parameter - -- ^ @variable.parameter - -- ^ @variable.parameter -listParam [a, b :: Int, Just c] = undefined - -- ^ @variable.parameter - -- ^ @variable.parameter - -- ^ @variable.parameter -tupleParam (a :: Int, b, Just c) = undefined - -- ^ @variable.parameter - -- ^ @variable.parameter - -- ^ @variable.parameter -listLambda = \[a, a :: Int, Just c] -> undefined - -- ^ @variable.parameter - -- ^ @variable.parameter - -- ^ @variable.parameter -tupleLambda = \(a, b :: Int, Just c) -> undefined - -- ^ @variable.parameter - -- ^ @variable.parameter -nestedDestructure (Left (Just a)) = undefined - -- ^ @variable.parameter -typeApplication x y = someFun @ty x y - -- ^ @variable - -- ^ @variable -encrypt key pass = encrypt (defaultOAEPParams SHA1) key pass - -- ^ @variable - -- ^ @variable -recordUpdate x y rec = someFun rec {field = 5} (x, x) y - -- ^ @variable - -- ^ @variable -viewPattern (func -> var) = 5 - -- ^ @function.call - -- ^ @variable.parameter -g (func :: a -> b) x = func y - -- ^ @variable.parameter - -- ^ @function -lambdaAlias :: LambdaAlias -lambdaAlias _ _ _ = undefined - -- ^ @function -spec :: Spec -spec = describe "test ns" $ it "test case" pending --- ^ @variable - -composed = f . g --- ^ @function diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hocon/test.conf b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hocon/test.conf deleted file mode 100644 index 55f4c03..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/hocon/test.conf +++ /dev/null @@ -1,59 +0,0 @@ -HOCON = Human-Optimized Config Object Notation -// ^ @variable.member -// ^ @string -// ^ @string -// ^ @string -// ^ @string - -"it's": "a JSON\nsuperset", -// ^ @string -// ^ @string.escape -// ^ @punctuation.delimiter - -features: [ -// ^ @operator -// ^ @punctuation.bracket - less noisy / less pedantic syntax -// ^ @string - ability to refer to another part of the configuration - import/include another configuration file into the current file - a mapping to a flat properties list such as Java's system properties - ability to get values from environment variables - # ability to write comments -// ^@ comment -// ^ @comment - // this is also a comment -// ^ @comment -// ^ @comment -] - -specs url: "https://github.com/lightbend/config/blob/master/HOCON.md" -includes: { - include required(file("~/prog/tree-sitter-hocon/grammar.js")) -// ^ @keyword -//^ @keyword.import -// ^ @punctuation.bracket -// ^ @punctuation.bracket - override = true -// ^ @boolean -} - -it's: ${it's}. A ${HOCON} -// ^ @punctuation.special -// ^ @punctuation.special -// ^ @punctuation.special -// ^ @string -// ^ @string -// ^ @punctuation.special -// ^ @punctuation.special - -this.is.a."long.key" = null, -// ^ @punctuation.delimiter -// ^ @punctuation.delimiter -// ^ @punctuation.delimiter -// ^ @constant.builtin -week = 7 days -// ^ @number -// ^ @keyword - - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/http/test.http b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/http/test.http deleted file mode 100644 index 00fca50..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/http/test.http +++ /dev/null @@ -1,33 +0,0 @@ -@ENDPOINT=http://localhost:8080/api -# <- @character.special -# ^^^^^^^ @variable -# ^ @operator -# ^^^^^^^^^^^^^^^^^^^^^^^^^ @string - -### GET USERS -GET {{ENDPOINT}}/users HTTP/1.1 -# ^^ @punctuation.bracket -# ^^^^^^^^ @variable -# ^^ @punctuation.bracket -# ^^^^^^ @string.special.url -# ^^^^^^^^ @string.special - -### GET USERS by Offset -GET {{ENDPOINT}}/users?offset=30 HTTP/1.1 -# <- @function.method - -### POST login -POST {{ENDPOINT}}/auth/login HTTP/1.1 -Content-Type: application/json - -{ - "username": "admin", - "password": "password" -} - -### Log Out -POST {{ENDPOINT}}/auth/logout HTTP/1.1 -Content-Type: application/json -# ^^^^^^^^^^ @constant -# ^ @punctuation.delimiter -# vim: ft=http diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/julia/test.jl b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/julia/test.jl deleted file mode 100644 index 338b7f8..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/julia/test.jl +++ /dev/null @@ -1,26 +0,0 @@ -function load_data(::Symbol; ::Int) :: Tuple -# <- @keyword.function -# ^ @function.call -# ^ @punctuation.bracket -# ^^ @operator -# ^ @type.builtin -# ^ @punctuation.delimiter -# ^^ @operator -# ^^^ @type.builtin -# ^ @punctuation.bracket -# ^^ @operator -# ^ @type.builtin - dataset = CIFAR10(; Tx = Float32, split = split) -# ^^^^^^^ @variable -# ^ @operator -# ^ @function.call -# ^ @operator -# ^ @type.builtin - X = reshape(dataset.features[:, :, :, begin:n_obs], :, n_obs) # flattening the image pixels -# ^^^^^ @variable.builtin - y = categorical2onehot(dataset.targets[begin:n_obs], N_LABELS) -# ^^^^^ @variable.builtin - return X, y -# ^^^^^^ @keyword.return -end -# <- @keyword.function diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/latex/test.tex b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/latex/test.tex deleted file mode 100644 index 9e65b90..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/latex/test.tex +++ /dev/null @@ -1,33 +0,0 @@ -% vim:ft=latex -% !TeX -% ^ @keyword.directive -%& filename -% ^ @keyword.directive - \begin{equation} \frac{4}{2} + 128 \text{hello} \sum_{n=1}^{\text{hi\_hi\^hi}} n \end{equation} -% ^ @markup.math ^ @none ^ @function - -\begin{equation} - a = b % Comment here -% ^ @comment -% ^ @markup.math -\end{equation} -\begin{equation} - a = b % Comment here -% ^ @comment - b = c -\end{equation} -\text{ -hi $here$ is some text % with a comment -% ^ @comment -% ^ @markup.math -} -\textbf{ -here is some text $5 + 2$ % with a comment -% ^ @comment -% ^ @markup.math -} -\textit{ -here is some text $5 + 2$ % with a comment -% ^ @comment -% ^ @markup.math -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/lua/test.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/lua/test.lua deleted file mode 100644 index 55818bb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/lua/test.lua +++ /dev/null @@ -1,18 +0,0 @@ --- luacheck: ignore -local a = { 1, 2, 3, 4, 5 } --- ^ @number ^ @punctuation.bracket --- ^ @variable - -local _ = next(a) --- ^ @function.builtin --- ^ @keyword - -_ = next(a) --- ^ @function.builtin - -next(a) --- ^ @function.builtin - --- Checking for incorrect hlgroup of injected luap -string.match(s, "\0%d[^\n]+") --- ^ @!constant diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/markdown/test.md b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/markdown/test.md deleted file mode 100644 index 01acfcc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/markdown/test.md +++ /dev/null @@ -1,28 +0,0 @@ -# H1 - - -## H2 - - -- Item 1 -- Item 2 - - -1. Item 1 -2. Item 2 - - -----![image_description](https://example.com/image.jpg "awesome image title") - - - - - - - -[link_text](#local_reference "link go brr...") - - - - - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/nix/test.nix b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/nix/test.nix deleted file mode 100644 index 296a5a9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/nix/test.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - func1 = param: builtins.readFile param; - # ^ @function - # ^ @variable.parameter - # ^ @constant.builtin - # ^ @function.builtin - func2 = { p1, p2 }: p2; - # ^ @function - # ^ @variable.parameter - readFile' = readFile; - # ^ @function.builtin - x = func1 ./path/to/file.nix; -# ^ @variable.member - # ^ @function.call - # ^ @string.special.path - hi = if true then 9 else throw "an error ${here + "string"}"; - # ^ @keyword.exception - # ^ @string - # ^ @variable - # ^ @string -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/pascal/test.pas b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/pascal/test.pas deleted file mode 100644 index 3a6cc78..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/pascal/test.pas +++ /dev/null @@ -1,39 +0,0 @@ -program foobar; -// ^ @keyword - -var -// <- @keyword - foo: bar; -// ^ @variable -// ^ @type - foo: foo.bar; -// ^ @variable -// ^ @type -// ^ @type -// ^ @type -begin -// ^ @keyword - foo := bar; -// ^ @variable -// ^ @variable - foo; -// ^ @function - foo(); -// ^ @function - foo(bar(xyz)); -// ^ @function -// ^ @function -// ^ @variable - xx + yy; -// ^ @variable -// ^ @variable - xx := y + z + func(a, b, c); -// ^ @variable -// ^ @variable -// ^ @variable -// ^ @function -// ^ @variable -// ^ @variable -// ^ @variable -end. -// <- @keyword diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/php/keywords.php b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/php/keywords.php deleted file mode 100644 index 21d248e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/php/keywords.php +++ /dev/null @@ -1,82 +0,0 @@ -foo(); -// ^^^^ @variable.builtin -// ^^^ @function.method.call - self::foo(); -// ^^^^ @variable.builtin -// ^^^ @function.call - static::foo(); -// ^^^^^^ @variable.builtin - parent::foo(); -// ^^^^^^ @variable.builtin - $this->foo; -// ^^^ @variable.member - $this->foo(a: 5); -// ^ @variable.parameter - A::$foo::$bar; -// ^^^ @variable.member -// ^^^ @variable.member - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/prisma/test.prisma b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/prisma/test.prisma deleted file mode 100644 index 5517e9e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/prisma/test.prisma +++ /dev/null @@ -1,63 +0,0 @@ -generator client { -// ^ keyword - provider = "go run github.com/prisma/prisma-client-go" - // ^ variable -} - -datasource db { - provider = "postgresql" - // ^ string - url = env("DATABASE_URL") - // ^ function -} - -model User { - email String - // ^ type - username String @id - // ^ operator - password String - fullName String @map("full_name") - // ^ function - avatarUrl String @map("avatar_url") - about String? - // ^ type - createdAt DateTime @default(now()) @map("created_at") - updatedAt DateTime @updatedAt @map("updated_at") - - @@map("user") -} - -model Reaction { - // ^ punctuation.bracket - id Int @id @default(autoincrement()) - // ^ punctuation.bracket - postId Int @map("post_id") - userId String @map("user_id") - type ReactionType - createdAt DateTime @default(now()) @map("created_at") - updatedAt DateTime @updatedAt @map("updated_at") - - post Post @relation(fields: [postId], references: [id]) - // ^ property - user User @relation(fields: [userId], references: [username]) - // ^ punctuation.bracket - - @@map("reaction") -} - -enum ReactionType { -// ^ keyword.type - LIKE - HAHA - SAD - ANGRY - // ^ constant -} - -view ReactionView { -// ^ keyword - id Int @unique - postId Int - userId String -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/promql/regex.promql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/promql/regex.promql deleted file mode 100644 index fa61094..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/promql/regex.promql +++ /dev/null @@ -1,10 +0,0 @@ -foo{path=~"^foo$"}[5m] or -# ^ @string.regexp -foo{path!~"[a-zA-Z0-9]{1,3}"}[5m] or -# ^ @string.regexp -foo{path="/api/users/{userId}"}[5m] or -# ^ @string -foo{path!="/api/users/{userId}"}[5m] -# ^ @string - -# vim: ft=promql diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/decorators.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/decorators.py deleted file mode 100644 index 278e4e3..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/decorators.py +++ /dev/null @@ -1,22 +0,0 @@ -from dataclasses import dataclass - - -@dataclass -#^^^^^^^^^ @attribute -class Data: - _foo: str - - @property -# ^ @attribute -# ^^^^^^^^ @attribute.builtin - def foo(self) -> str: - return self._foo - - -@pytest.mark.filterwarnings("ignore::DeprecationWarning") -#^^^^^^ @variable -# ^^^^ @variable.member -# ^^^^^^^^^^^^^^ @attribute -def test_func(): - pass - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/docstrings.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/docstrings.py deleted file mode 100644 index 02c0a2c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/docstrings.py +++ /dev/null @@ -1,121 +0,0 @@ -# Docstrings according to PEP 257 (https://peps.python.org/pep-0257/) -# <- @comment - -"""Module docstring assigned to `__doc__`...""" -# <- @string.documentation -""" -... with an addtional docstring, not part of `__doc__`. -""" -# <- @string.documentation - -""" -Some random docstring in the middle if nowhere... -""" -# <- @string.documentation -""" -... also with not one ... -""" -# <- @string.documentation -""" -... but two addtional docstrings. -""" -# <- @string.documentation - -oneline_string_assignment = "not detected as docstring" -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @string -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ !@string.documentation -"""Module attribute docstring.""" -# <- @string.documentation - -multiline_string_assignment = """ - also not detected as docstring - """ -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @string -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ !@string.documentation - -looks_like_implicit_string_concatenation = "abc" -# ^^^^^ @string -"def" -# <- @string.documentation - -single_line_implicit_string_concatenation = "abc" "def" -# ^^^^^ @string -# ^^^^^ @string -# ^^^^^ !@string.documentation - -multiline_implicit_string_concatenation = ( - "not " - # <- @string - # <- !@string.documentation - "detected " - # <- @string - # <- !@string.documentation - "as docstring, " - # <- @string - # <- !@string.documentation - "either." - # <- @string - # <- !@string.documentation -) - - -class A: - """ - Class docstring, assigned to `__doc__`. - """ - # <- @string.documentation - - """ - Some random docstring again, ... - """ - # <- @string.documentation - """ - ... with an "additional" docstring. Again. - """ - # <- @string.documentation - - foo = "class attribute" - # ^^^^^^^^^^^^^^^^^ @string - # ^^^^^^^^^^^^^^^^^ !@string.documentation - """ - Class attribute docstring, but an attribute - does not have a `__doc__` attribute itself. - """ - # <- @string.documentation - - bar: int - """Class attribute docstring, type annotation only.""" - # <- @string.documentation - - baz: str = "type annotated class attribute" - # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @string - # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ !@string.documentation - """Class attribute docstring, type annotation and assignment.""" - # <- @string.documentation - - def __init__(self): - """Method docstring.""" - # <- @string.documentation - - self.quux = "instance attribute" - # ^^^^^^^^^^^^^^^^^^^^ @string - # ^^^^^^^^^^^^^^^^^^^^ !@string.documentation - """Instance attribute docstring.""" - # <- @string.documentation - - -def f(x): - """Function docstring.""" - # <- @string.documentation - """Addtional function docstring.""" - # <- @string.documentation - return x**2 - - -f.a = 1 -"""Function attribute docstring.""" -# <- @string.documentation - - -"Random docstring with single quotes - legal, but far off standard and confusing." -# <- @string.documentation diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/fields.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/fields.py deleted file mode 100644 index cbe80cd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/fields.py +++ /dev/null @@ -1,24 +0,0 @@ -class Fields: - type: str -# ^^^^ @variable.member - - def __init__(self, type: str, fields: list[int]) -> None: -# ^^^^ @variable.builtin -# ^^^^ @variable.parameter -# ^^^^^^ @variable.parameter -# ^^^ @type.builtin -# ^^^^ @constant.builtin - self.fields = fields -# ^^^^^^ @variable.member - self.type = type # this cannot be highlighted correctly by Treesitter -# ^^^^ @variable.member - self.__dunderfield__ = None -# ^^^^^^^^^^^^^^^ @variable.member - self._FunKyFielD = 0 -# ^^^^^^^^^^^ @variable.member - self.NOT_A_FIELD = "IM NOT A FIELD" -# ^^^^^^^^^^^ @constant - -Fields(type="schema", fields=[0, 1]) -# ^^^^ @variable.parameter -# ^^^^^^ @variable.parameter diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/functions.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/functions.py deleted file mode 100644 index 81dedfb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/functions.py +++ /dev/null @@ -1,21 +0,0 @@ -def func() -> None: ... - -_ = func() -# ^^^^ @function.call - -"{}".format(1) -# ^^^^^^ @function.method.call - -class Foo: - def method(self) -> None: ... -# ^^^^ @variable.builtin - - @classmethod - def clsmethod(cls) -> None: ... -# ^^^ @variable.builtin - -Foo().method() -# ^^^^^^ @function.method.call - -print() -# ^ @function.builtin diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/future_import.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/future_import.py deleted file mode 100644 index 065eabf..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/future_import.py +++ /dev/null @@ -1,4 +0,0 @@ -from __future__ import print_function -# ^ @keyword.import -# ^ @module.builtin -# ^ @keyword.import diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/pattern_matching.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/pattern_matching.py deleted file mode 100644 index 2762781..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/pattern_matching.py +++ /dev/null @@ -1,51 +0,0 @@ -match command.split(): -# ^ @keyword.conditional - case ["quit"]: - # ^ @keyword.conditional - print("Goodbye!") - quit_game() - case ["look"]: - # ^ @keyword.conditional - current_room.describe() - case ["get", obj]: - # ^ @keyword.conditional - character.get(obj, current_room) - case ["go", direction]: - # ^ @keyword.conditional - current_room = current_room.neighbor(direction) - # The rest of your commands go here - -match command.split(): -# ^ @keyword.conditional - case ["drop", *objects]: - # ^ @keyword.conditional - for obj in objects: - character.drop(obj, current_room) - -match command.split(): -# ^ @keyword.conditional - case ["quit"]: ... # Code omitted for brevity - case ["go", direction]: pass - case ["drop", *objects]: pass - case _: - print(f"Sorry, I couldn't understand {command!r}") - # ^^ @@function.macro - -match command.split(): -# ^ @keyword.conditional - case ["north"] | ["go", "north"]: - # ^ @keyword.conditional - current_room = current_room.neighbor("north") - case ["get", obj] | ["pick", "up", obj] | ["pick", obj, "up"]: - # ^ @keyword.conditional - pass - -match = 2 -# ^ @variable -match, a = 2, 3 -# ^ @variable -match: int = secret -# ^ @variable -x, match: str = 2, "hey, what's up?" -# <- @variable -# ^ @variable diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/raise_from.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/raise_from.py deleted file mode 100644 index fb30f42..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/raise_from.py +++ /dev/null @@ -1,6 +0,0 @@ -try: - print(1 / 0) -except Exception: - raise RuntimeError from None - # ^ @keyword.exception - # ^ @keyword.exception diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/yield_from.py b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/yield_from.py deleted file mode 100644 index 6ada002..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/python/yield_from.py +++ /dev/null @@ -1,7 +0,0 @@ -from foo import bar -# ^ @keyword.import -# ^ @keyword.import -def generator(): - yield from bar(42) - # ^ @keyword.return - # ^ @keyword.return diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/r/test.r b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/r/test.r deleted file mode 100644 index 5fa36cc..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/r/test.r +++ /dev/null @@ -1,47 +0,0 @@ -init <- 1 -# ^ @variable -# ^ @operator -# ^ @number.float - -r"{(\1\2)}" -> `%r%` -# ^ @string -# ^ @operator -# ^ @variable - - -foo <- c(1L, 2L) -# ^ @function.call -# ^ @number - -b <- list(TRUE, FALSE, NA, Inf) -# ^ @boolean -# ^ @boolean -# ^ @constant.builtin -# ^ @constant.builtin - -b <- list(name = "r", version = R.version$major) -# ^ @variable.parameter -# ^ @string -# ^ @operator -# ^ @variable.member - -Lang$new(name = "r")$print() -# ^ @function.method.call - -for(i in 1:10) { -# <- @keyword.repeat -# ^ @keyword.repeat -} - -add <- function(a, b = 1, ...) { -# ^ @keyword.function -# ^ @variable.parameter -# ^ @variable.parameter -# ^ @constant.builtin - return(a + b) -# ^ @keyword.return -} - -base::letters -# ^ @module -# ^ @variable diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/for.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/for.rs deleted file mode 100644 index e8c085f..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/for.rs +++ /dev/null @@ -1,15 +0,0 @@ -struct Foo; - -// Issue https://github.com/nvim-treesitter/nvim-treesitter/issues/3641 -// Distinguish between for in loop or impl_item -impl Drop for Foo { - // ^ @keyword - fn drop(&mut self) {} -} - -fn main() { - for i in 0..128 { - // <- @keyword.repeat - println!("{i}"); - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/parameters.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/parameters.rs deleted file mode 100644 index 171cc5c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/parameters.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub fn func(ref root: &mut Element, ref mut param2: u32) { - // ^^^ @keyword.modifier - // ^^^^ @variable.parameter - // ^^^ @keyword.modifier - // ^^^ @keyword.modifier - // ^^^^^^ @variable.parameter - return; -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/super-crate-imports.rs b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/super-crate-imports.rs deleted file mode 100644 index 9326309..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/rust/super-crate-imports.rs +++ /dev/null @@ -1,12 +0,0 @@ -use crate::a; -// ^ @module -// ^ !keyword -use crate::{b, c}; -// ^ @module -// ^ !keyword -use super::a; -// ^ @module -// ^ !keyword -use super::{b, c}; -// ^ @module -// ^ !keyword diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/smali/baksmali_test_class.smali b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/smali/baksmali_test_class.smali deleted file mode 100644 index 1d2a4cb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/smali/baksmali_test_class.smali +++ /dev/null @@ -1,261 +0,0 @@ -.class public Lbaksmali/test/class; -# <- @keyword -# ^^^^^^ @keyword.modifier -.super Ljava/lang/Object; -# ^ @character.special -# ^^^^ @type.builtin -# ^ @punctuation.delimiter - -.source "baksmali_test_class.smali" -# <- @keyword.import - -.implements Lsome/interface; -.implements Lsome/other/interface; - - -.annotation build Lsome/annotation; -# ^^^^^ @keyword.modifier -# ^^^^ @type -# ^ @punctuation.delimiter - value1 = "test" -# ^^^^^^ @variable.member -# ^ @operator -# ^^^^^^ @string - value2 = .subannotation Lsome/annotation; - value1 = "test2" - value2 = Lsome/enum; - .end subannotation -.end annotation - -.annotation system Lsome/annotation; -.end annotation - - - -.field public static aStaticFieldWithoutAnInitializer:I -# ^ @punctuation.delimiter -# ^ @type.builtin - -.field public static longStaticField:J = 0x300000000L -# ^^^^^^^^^^^^ @number -.field public static longNegStaticField:J = -0x300000000L - -.field public static intStaticField:I = 0x70000000 -.field public static intNegStaticField:I = -500 - -.field public static shortStaticField:S = 500s -.field public static shortNegStaticField:S = -500s - -.field public static byteStaticField:B = 123t -.field public static byteNegStaticField:B = 0xAAt - -.field public static floatStaticField:F = 3.1415926f -# ^^^^^^^^^^ @number.float - -.field public static doubleStaticField:D = 3.141592653589793 - -.field public static charStaticField:C = 'a' -# ^^^ @character -.field public static charEscapedStaticField:C = '\n' -# ^^ @string.escape - -.field public static boolTrueStaticField:Z = true -# ^^^^ @boolean -.field public static boolFalseStaticField:Z = false - -.field public static typeStaticField:Ljava/lang/Class; = Lbaksmali/test/class; - -.field public static stringStaticField:Ljava/lang/String; = "test" -.field public static stringEscapedStaticField:Ljava/lang/String; = "test\ntest" - - -.field public static fieldStaticField:Ljava/lang/reflect/Field; = Lbaksmali/test/class;->fieldStaticField:Ljava/lang/reflect/Field; - -.field public static methodStaticField:Ljava/lang/reflect/Method; = Lbaksmali/test/class;->testMethod(ILjava/lang/String;)Ljava/lang/String; -# ^^ @punctuation.delimiter -# ^^^^^^^^^^ @function.method.call - -.field public static arrayStaticField:[I = {1, 2, 3, {1, 2, 3, 4}} -# ^ @punctuation.special -# ^ @punctuation.bracket -# ^ @punctuation.delimiter - -.field public static enumStaticField:Lsome/enum; = .enum Lsome/enum;->someEnumValue:Lsome/enum; -# ^^^^^^^^^^^^^ @variable.member - -.field public static annotationStaticField:Lsome/annotation; = .subannotation Lsome/annotation; - value1 = "test" - value2 = .subannotation Lsome/annotation; - value1 = "test2" - value2 = Lsome/enum; - .end subannotation -.end subannotation - -.field public static staticFieldWithAnnotation:I - .annotation runtime La/field/annotation; -# ^^^^^^^ @keyword.modifier - this = "is" - a = "test" - .end annotation - .annotation runtime Lorg/junit/Test; - .end annotation -.end field - -.field public instanceField:Ljava/lang/String; - - - -.method public constructor ()V -# <- @keyword.function -# ^^^^^^^^^^^ @constructor -# ^^^^^^ @constructor - .registers 1 - invoke-direct {p0}, Ljava/lang/Object;->()V -# ^^^^^^^^^^^^^ @keyword.operator -# ^^ @variable.parameter.builtin - return-void -# ^^^^^^^^^^^ @keyword.return -.end method - -.method public testMethod(ILjava/lang/String;)Ljava/lang/String; -# ^^^^^^^^^^ @function.method - .registers 3 - .annotation runtime Lorg/junit/Test; - .end annotation - .annotation system Lyet/another/annotation; - somevalue = 1234 - anothervalue = 3.14159 - .end annotation - - const-string v0, "testing\n123" -# ^^ @variable.builtin - - goto switch: -# ^^^^^^^ @label - - sget v0, Lbaksmali/test/class;->staticField:I - - switch: - packed-switch v0, pswitch: - - try_start: - const/4 v0, 7 - const v0, 10 - nop - try_end: - .catch Ljava/lang/Exception; {try_start: .. try_end:} handler: -# ^^^^^^ @keyword.exception - .catchall {try_start: .. try_end:} handler2: -# ^^^^^^^^^ @keyword.exception -# ^^ @operator - - handler: - - Label10: - Label11: - Label12: - Label13: - return-object v0 - - - - .array-data 4 - 1 2 3 4 5 6 200 - .end array-data - - pswitch: - .packed-switch 10 - Label10: - Label11: - Label12: - Label13: - .end packed-switch - - handler2: - - return-void - -.end method - -.method public abstract testMethod2()V - .annotation runtime Lsome/annotation; - subannotation = .subannotation Lsome/other/annotation; - value = "value" - .end subannotation - .end annotation - .annotation runtime Lorg/junit/Test; - .end annotation -.end method - - -.method public tryTest()V - .registers 1 - - handler: - nop - - - try_start: - const/4 v0, 7 - const v0, 10 - nop - try_end: - .catch Ljava/lang/Exception; {try_start: .. try_end:} handler: -.end method - - -.method public debugTest(IIIII)V - .registers 10 - - .parameter "Blah" - .parameter - .parameter "BlahWithAnnotations" - .annotation runtime Lsome/annotation; - something = "some value" - somethingelse = 1234 - .end annotation - .annotation runtime La/second/annotation; - .end annotation - .end parameter - .parameter - .annotation runtime Lsome/annotation; - something = "some value" - somethingelse = 1234 - .end annotation - .end parameter - .parameter "LastParam" - - .prologue -# ^^^^^^^^^ @keyword - - nop - nop - - .source "somefile.java" -# ^^^^^^^ @keyword.import - .line 101 -# ^^^ @string.special - - nop - - - .line 50 - - .local v0, aNumber:I -# ^^^^^^^ @variable - const v0, 1234 - .end local v0 - - .source "someotherfile.java" - .line 900 - - const-string v0, "1234" - - .restart local v0 - const v0, 6789 - .end local v0 - - .epilogue -# ^^^^^^^^^ @keyword - -.end method diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/solidity/test.sol b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/solidity/test.sol deleted file mode 100644 index 52334bd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/solidity/test.sol +++ /dev/null @@ -1,186 +0,0 @@ -// Example contract from official documentation at https://github.com/ethereum/solidity/blob/v0.8.12/docs/examples/voting.rst - -// SPDX-License-Identifier: GPL-3.0 -// ^ @comment -pragma solidity >=0.7.0 <0.9.0; -// ^ @keyword.directive -// ^ @keyword.directive - -import * as something from "anotherFile"; -// ^ ^ ^ @keyword.import - -/// @title Voting with delegation. -// <- @comment -contract Ballot { -// ^keyword.type -// ^ @type - // This declares a new complex type which will - // be used for variables later. - // It will represent a single voter. - struct Voter { -// ^ @type - uint weight; // weight is accumulated by delegation -// ^ @type.builtin -// ^ @variable.member - bool voted; // if true, that person already voted - address delegate; // person delegated to - uint vote; // index of the voted proposal - } - - // This is a type for a single proposal. - struct Proposal { - bytes32 name; // short name (up to 32 bytes) - uint voteCount; // number of accumulated votes - } - - address public chairperson; -// ^ @type.builtin - - // This declares a state variable that - // stores a `Voter` struct for each possible address. - mapping(address => Voter) public voters; -// ^ ^ @punctuation.bracket -// ^ @punctuation.delimiter - - // A dynamically-sized array of `Proposal` structs. - Proposal[] public proposals; - - enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } -// ^ @constant - - /// Create a new ballot to choose one of `proposalNames`. - constructor(bytes32[] memory proposalNames) { -// ^ @constructor - chairperson = msg.sender; - voters[chairperson].weight = 1; - - // For each of the provided proposal names, - // create a new proposal object and add it - // to the end of the array. - for (uint i = 0; i < proposalNames.length; i++) { - // `Proposal({...})` creates a temporary - // Proposal object and `proposals.push(...)` - // appends it to the end of `proposals`. - proposals.push(Proposal({ - name: proposalNames[i], -// ^ @variable.member - voteCount: 0 - })); - } - } - - // Give `voter` the right to vote on this ballot. - // May only be called by `chairperson`. - function giveRightToVote(address voter) external { -// ^ @keyword.function -// ^ @function -// ^ @variable.parameter - // If the first argument of `require` evaluates - // to `false`, execution terminates and all - // changes to the state and to Ether balances - // are reverted. - // This used to consume all gas in old EVM versions, but - // not anymore. - // It is often a good idea to use `require` to check if - // functions are called correctly. - // As a second argument, you can also provide an - // explanation about what went wrong. - require( - msg.sender == chairperson, - "Only chairperson can give right to vote." - ); - require( - !voters[voter].voted, - "The voter already voted." - ); - require(voters[voter].weight == 0); - voters[voter].weight = 1; - } - - /// Delegate your vote to the voter `to`. - function delegate(address to) external { - // assigns reference - Voter storage sender = voters[msg.sender]; - require(!sender.voted, "You already voted."); - - require(to != msg.sender, "Self-delegation is disallowed."); - - // Forward the delegation as long as - // `to` also delegated. - // In general, such loops are very dangerous, - // because if they run too long, they might - // need more gas than is available in a block. - // In this case, the delegation will not be executed, - // but in other situations, such loops might - // cause a contract to get "stuck" completely. - while (voters[to].delegate != address(0)) { - to = voters[to].delegate; - - // We found a loop in the delegation, not allowed. - require(to != msg.sender, "Found loop in delegation."); - } - - // Since `sender` is a reference, this - // modifies `voters[msg.sender].voted` - Voter storage delegate_ = voters[to]; - - // Voters cannot delegate to wallets that cannot vote. - require(delegate_.weight >= 1); - sender.voted = true; - sender.delegate = to; - if (delegate_.voted) { - // If the delegate already voted, - // directly add to the number of votes - proposals[delegate_.vote].voteCount += sender.weight; - } else { - // If the delegate did not vote yet, - // add to her weight. - delegate_.weight += sender.weight; - } - } - - /// Give your vote (including votes delegated to you) - /// to proposal `proposals[proposal].name`. - function vote(uint proposal) external { - Voter storage sender = voters[msg.sender]; - require(sender.weight != 0, "Has no right to vote"); - require(!sender.voted, "Already voted."); - sender.voted = true; - sender.vote = proposal; - - // If `proposal` is out of the range of the array, - // this will throw automatically and revert all - // changes. - proposals[proposal].voteCount += sender.weight; - } - - /// @dev Computes the winning proposal taking all - /// previous votes into account. - function winningProposal() public view - returns (uint winningProposal_) - { - uint winningVoteCount = 0; - for (uint p = 0; p < proposals.length; p++) { - if (proposals[p].voteCount > winningVoteCount) { - winningVoteCount = proposals[p].voteCount; - winningProposal_ = p; - } - } - } - - // Calls winningProposal() function to get the index - // of the winner contained in the proposals array and then - // returns the name of the winner - function winnerName() external view - returns (bytes32 winnerName_) - { - winnerName_ = proposals[winningProposal()].name; - } -} - -contract Another { - Ballot b = new Ballot(new bytes32[](1)); -// ^ @keyword.operator -} - -// vim:ft=solidity diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/comments.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/comments.cmm deleted file mode 100644 index e36f7e6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/comments.cmm +++ /dev/null @@ -1,10 +0,0 @@ -// This is a comment -; <- @comment - -; Another comment -; <- @comment - -ECHO &a // This is a trailing comment -; ^ @comment - -// vim: set ft=t32: diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/keywords.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/keywords.cmm deleted file mode 100644 index d1516eb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/keywords.cmm +++ /dev/null @@ -1,125 +0,0 @@ -PRIVATE &password -; <- @keyword -; ^ @variable.builtin -ENTRY &password -; <- @keyword -; ^ @variable.parameter - -ENTRY %LINE &salt -; <- @keyword -; ^ @constant.builtin -; ^ @variable.parameter - -IF "&password"=="" -; <- @keyword.conditional -; ^ @string -; ^ @variable.builtin -; ^ @operator -( - ECHO "Failed to provide password." - ENDDO -; ^ @keyword.return -) -ELSE -; <- @keyword.conditional -( - PRIVATE &pass - - &pass=FALSE() -; ^ @function.builtin - WHILE !&pass -; ^ @operator - ( - GOSUB verify_password "&password" -; ^ @function.call - RETURNVALUES &pass -; ^ @variable.parameter - WAIT 10.ms -; ^ @number.float - ) - - IF !&pass - GOTO fail -; ^ @label - ELSE IF &debug -; ^ @keyword.conditional -; ^ @keyword.conditional - ( - GOSUB start_debug -; ^ @function.call - ) -) - -LOCAL &num -; ^ @variable.builtin - -&num = 2. -; ^ @number - -RePeaT &num PRINT "Password: &password" -; ^ @variable.builtin -; ^ @variable.builtin - -WinCLEAR -FramePOS ,,,,Maximized -; ^ @punctuation.delimiter -; ^ @constant.builtin -WinPOS 0% 50% 100% 35% -; ^ @number.float -COVerage.ListFunc - -ENDDO - - -fail: -; <- @label - PRINT %ERROR "Password verification failed." - END -; ^ @keyword.return - - -verify_password: -; <- @function -( - PARAMETERS &password -; ^ @variable.parameter - - SYStem.Option.KEYCODE "&password" - SYStem.JtagClock 1kHz -; ^ @number.float - SYStem.Mode.Attach - - Data.Set N: EAXI:0x34000000 %Long 0x34000100 0x34000021 /verify -; ^ @constant.builtin -; ^ @constant.builtin -; ^ @number -; ^ @constant.builtin -; ^ @number -; ^ @constant.builtin - - RETURN TRUE() -; ^ @keyword.return -) - - -SUBROUTINE start_debug -; <- @keyword.function -; ^ @function -( - COVerage.ListModule %MULTI.OBC \sieve -; ^ @keyword -; ^ @constant.builtin -; ^ @string.special.symbol - - Var.DRAW flags[0..16] /Alternate 3 -; ^ @keyword -; ^ @variable -; ^ @constant.builtin -; ^ @number - - Go main - RETURN -; ^ @keyword.return -) - -// vim: set ft=t32: diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/literals.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/literals.cmm deleted file mode 100644 index a9d72e4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/literals.cmm +++ /dev/null @@ -1,39 +0,0 @@ -WinPOS ,,1000.,,,,myWatchWindow -; ^ @number - -PRinTer.OPEN "~~~/varwatch.txt" ASCIIE -; ^ @string - -sYmbol.NEW _InitialSP 0x34000100 -; ^ @number - -DO ~~~~/test.cmm -; ^ @string.special.path - -WAIT 1.ns -; ^ @number.float - -SYStem.JtagClock 100.GHZ -; ^ @number.float - -DATA.SET P:&HEAD+0x4 %LONG DATA.LONG(EA:&HEAD+0x4)&0xFFFFFF -; ^ @constant.builtin - -List `main` -; ^ @string.special.symbol - -&range = 'a'--'z'||'0'--'9' -; ^ @character -; ^ @operator -; ^ @character - -Data.Set N: 0xffff800000 0y0011xx01xx&&a -; ^ @constant.builtin -; ^ @number -; ^ @number -; ^ @operator - -WinPOS 0% 85% 100% 15% -; ^ @number.float - -// vim: set ft=t32: diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/var.cmm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/var.cmm deleted file mode 100644 index 0deed99..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/t32/var.cmm +++ /dev/null @@ -1,75 +0,0 @@ -Var.NEWGLOBAL char[4][32] \myarr -; <- @keyword -; ^ @type.builtin -; ^ @variable.builtin -LOCAL &i &data - -&data="zero|one|two|three" - -&i=0. -WHILE &i<4 -( - PRIVATE &val - &val=STRing.SPLIT("&data","|",&i) - Var.Assign \myarr[&i]="&val" -; ^ @variable.builtin -; ^ @operator - &i=&i+1. -) - -Var.NEWLOCAL \x -; <- @keyword -; ^ @variable.builtin -Var.set \x=func3(5,3) -; ^ @variable.builtin -; ^ @function.call -; ^ @number -PRINT Var.VALUE(\x) -; ^ @variable.builtin -PRINT Var.VALUE('a') -; ^ @character -Var.Assign (*ap)[2..4] = &a -; ^ @variable -; ^ @variable -Var.Assign sp = &s.n+offset -; ^ @variable -; ^ @variable -; ^ @variable.member -; ^ @variable -Var.Assign padd = (CAddition const * volatile)&d -; ^ @variable -; ^ @type -; ^ @keyword.modifier -; ^ @keyword.modifier -; ^ @variable -Var.Assign e1 = (enum e2)&e -; ^ @variable -; ^ @keyword.type -; ^ @type -; ^ @variable -Var.Assign *vector = (struct Vector3d*)&acceleration -; ^ @variable -; ^ @keyword.type -; ^ @type -; ^ @variable -Var.Assign z = (union foo)x -; ^ @variable -; ^ @keyword.type -; ^ @type -; ^ @variable -Var.Assign b = -a -; ^ @variable -; ^ @variable -Var.Assign c = i++ -; ^ @variable -; ^ @variable -Var.Assign d = sizeof(int) -; ^ @variable -; ^ @keyword.operator -; ^ @type.builtin -Var.call strcmp(key,buffer) -; ^ @function.call -; ^ @variable -; ^ @variable - -// vim: set ft=t32: diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/built-ins.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/built-ins.tig deleted file mode 100644 index 9aa6494..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/built-ins.tig +++ /dev/null @@ -1,44 +0,0 @@ -let - var a := exit(0) - /* ^ @function.builtin */ - - primitive exit(ret: int) /* Shadowing the prelude-included built-in */ - /* ^ @type.builtin */ - - var b := exit(0) - /* ^ @function.builtin */ - - type int = string /* Shadowing the built-in type */ - /* ^ @type.builtin */ - - var c : int := "This is an \"int\"" - /* ^ @type.builtin (not sure why it isn't 'type')*/ - - var d : Object := nil - /* ^ @type.builtin */ - - type Object = int - - var self := "self" -in - let - var c : int := "This is an int" - /* ^ @type.builtin (not sure why it isn't 'type')*/ - var d : Object := "This is an object" - /* ^ @type.builtin (not sure why it isn't 'type')*/ - in - end; - - exit(1); - /* <- @function.builtin */ - - print("shadowing is fun"); - /* <- @function.builtin */ - - self; - /* <- @variable.builtin */ - - b := print - /* ^ @variable */ -end -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/comment.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/comment.tig deleted file mode 100644 index 9323dba..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/comment.tig +++ /dev/null @@ -1,6 +0,0 @@ -/* This is /* a nested */ comment */ -/* <- @comment - ^ @comment - ^ @comment - */ -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/functions.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/functions.tig deleted file mode 100644 index 706f199..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/functions.tig +++ /dev/null @@ -1,9 +0,0 @@ -primitive print(s: string) -/* ^ @function */ -/* ^ @variable.parameter */ - -function func(a: int) : int = (print("Hello World!"); a) -/* ^ @function */ -/* ^ @variable.parameter */ -/* ^ @function.builtin */ -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/identifiers.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/identifiers.tig deleted file mode 100644 index 8d2207d..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/identifiers.tig +++ /dev/null @@ -1,30 +0,0 @@ -type int = int -/* ^ @variable */ -/* ^ @type.builtin */ - -type int_array = array of int -/* ^ @type.builtin */ - -type record = {a: int, b: string} -/* ^ @variable.member */ -/* ^ @type.builtin */ -/* ^ @variable.member */ -/* ^ @type.builtin */ - -var record := record {a = 12, b = "27"} -/* ^ @variable */ -/* ^ @type */ -/* ^ @variable.member */ -/* ^ @variable.member */ - -var array := int_array[12] of 27; -/* ^ @variable */ -/* ^ @type */ - -primitive func(a: int, b: string) : array -/* ^ @variable.parameter */ -/* ^ @type.builtin */ -/* ^ @variable.parameter */ -/* ^ @type.builtin */ -/* ^ @type */ -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/imports.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/imports.tig deleted file mode 100644 index 1c7ce30..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/imports.tig +++ /dev/null @@ -1,4 +0,0 @@ -import "lib.tih" -/* <- @keyword.import */ -/* ^ @string.special.path */ -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/keywords.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/keywords.tig deleted file mode 100644 index c92cd92..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/keywords.tig +++ /dev/null @@ -1,42 +0,0 @@ -let -/* <- @keyword */ - - var a := 12 - /* <- @keyword */ - - function f() : int = a - /* <- @keyword.function */ - primitive g() - /* <- @keyword.function */ - - import "lib.tih" - /* <- @keyword.import */ - - type array_of_int = array of int - /* <- @keyword */ - /* ^ @keyword */ - /* ^ @keyword */ - -in -/* <- @keyword */ - - 12; - - if 12 then 27 else 42; - /* <- @keyword */ - /* ^ @keyword */ - /* ^ @keyword */ - - for i := 12 to 27 do 42; - /* <- @keyword.repeat */ - /* ^ @keyword.repeat */ - /* ^ @keyword.repeat */ - - while 12 do break - /* <- @keyword.repeat */ - /* ^ @keyword.repeat */ - /* ^ @keyword */ - -end -/* <- @keyword */ -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/literals.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/literals.tig deleted file mode 100644 index 46f3c86..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/literals.tig +++ /dev/null @@ -1,9 +0,0 @@ -nil -/* <- @constant.builtin */ -42 -/* <- @number */ -"Hello World!\n" -/* <- @string - ^ @string.escape -*/ -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/meta-variables.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/meta-variables.tig deleted file mode 100644 index 1b2c6c9..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/meta-variables.tig +++ /dev/null @@ -1,14 +0,0 @@ -let - _chunks(42) - /* <- @keyword */ - -in - _lvalue(12) : _namety(42) := _cast("I'm So Meta Even This Acronym", string); - /* <- @keyword */ - /* ^ @keyword */ - /* ^ @keyword */ - - _exp(42) - /* <- @keyword */ -end -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/object-oriented.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/object-oriented.tig deleted file mode 100644 index 5c48c54..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/object-oriented.tig +++ /dev/null @@ -1,29 +0,0 @@ -let - class A extends Object {} - /* <- @keyword.type */ - /* ^ @keyword */ - /* ^ @type.builtin */ - - type B = class extends A { - /* ^ @keyword.type */ - /* ^ @keyword */ - /* ^ @type */ - - var a := 12 - - method meth() : int = self.a - /* <- @keyword.function */ - /* ^ @function.method */ - /* ^ @variable.builtin */ - } - - var object := new B - /* ^ @keyword.operator */ -in - object.a := 27; - /* ^ @variable.member */ - - object.meth() - /* ^ @function.method */ -end -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/operators.tig b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/operators.tig deleted file mode 100644 index d803af7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/tiger/operators.tig +++ /dev/null @@ -1,49 +0,0 @@ -let - var a : int := 42 - /* ^ @punctuation.delimiter */ - /* ^ @operator */ -in - ( - /* <- @punctuation.bracket */ - - -1 | 2 & 3 + 4 * 5; - /* <- @operator */ - /* ^ @operator */ - /* ^ @operator */ - /* ^ @operator */ - /* ^ @operator */ - /* ^ @punctuation.delimiter */ - - 12 >= 27; - /* ^ @operator */ - 12 <= 27; - /* ^ @operator */ - 12 = 27; - /* ^ @operator */ - 12 <> 27; - /* ^ @operator */ - 12 < 27; - /* ^ @operator */ - 12 > 27; - /* ^ @operator */ - - record.field; - /* ^ @punctuation.delimiter */ - - func(a, b); - /* ^ @punctuation.bracket */ - /* ^ @punctuation.bracket */ - /* ^ @punctuation.delimiter */ - - record_type { }; - /* ^ @punctuation.bracket */ - /* ^ @punctuation.bracket */ - - array[42] - /* ^ @punctuation.bracket */ - /* ^ @punctuation.bracket */ - - ) - /* <- @punctuation.bracket */ -end -/* vim: set ft=tiger: */ diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/typescript/as.ts b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/typescript/as.ts deleted file mode 100644 index 30be1ff..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/typescript/as.ts +++ /dev/null @@ -1,8 +0,0 @@ -import * as foo from 'foo'; -// ^ @keyword.import - -export { foo as bar }; -// ^ @keyword.import - -const n = 5 as number; -// ^ @keyword.operator diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/prims.usda b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/prims.usda deleted file mode 100644 index da9a5d6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/prims.usda +++ /dev/null @@ -1,118 +0,0 @@ -def Xform "cube" ( - assetInfo = { - # <- @keyword - asset[] payloadAssetDependencies = [@fizz.usd@, @buzz.usd@] - # <- @type - # ^ @keyword - # ^ @string.special.url - # ^ @string.special.url - } -) -{ -} - -def "root" ( - add references = @foo.usda@ (offset = 1; scale = 2.0) - # <- @string.special.url - # ^ @string.special - # ^ @keyword - # ^ @number - # ^ @punctuation.delimiter - # ^ @keyword - # ^ @number.float -) -{ -} - -def "World" -{ - over "points" ( - clips = { - # <- @keyword - dictionary default = { - # <- @type - # ^ @variable - double2[] times = [(101, 101), (102, 102)] - # <- @type - # ^ @keyword - # ^ @number - } - } - ) - { - } -} - -def Xform "torch_2" ( - payload = @./torch.usda@ - kind = "model" -) -{ - // Pre-published light list - # <- @comment - rel lightList = [ ] # inline comment - # ^ @comment - token lightList:cacheBehavior = "consumeAndContinue" - - double3 xformOp:translate = (1, 0, 0.5) - uniform token[] xformOpOrder = ["xformOp:translate"] -} - -def "foo" ( - "some comment" - # <- @comment.documentation -) -{ -} - -def "foo" ( - # inline comment - "actual in-description comment" - # <- @comment.documentation -) -{ -} - -def "foo" ( - add references = @foo.usda@ - # <- @function.call - append references = @foo.usda@ - # <- @function.call - delete references = @foo.usda@ - # <- @function.call - reorder references = [@foo.usda@] - # <- @function.call - - references = [@foo.usda@] # explicit -) -{ -} - -over "Parent" ( - prepend references = [, @./ref.usda@] - # <- @function.call - # ^ @keyword - # ^ @string.special - # ^ @string.special.url - # ^ @string.special -) -{ -} - -def "foo" -{ - float value.timeSamples = { - # <- @type - # ^ @variable - # ^ @property - -414: 14.4 - # <- @number - # ^ @number.float - 10: 201.0, - # <- @number - # ^ @number.float - 10.123: 201.0123, - # <- @number.float - # ^ @number.float - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/properties.usda b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/properties.usda deleted file mode 100644 index 790ccfa..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/properties.usda +++ /dev/null @@ -1,21 +0,0 @@ -dictionary foo = {} -# <- @type -half[] foo = [2, 1, 2] -# <- @type -string foo = "something" -# <- @type -timecode time = 1.0 -# <- @type -token[] purpose = ["default", "render"] -# <- @type - -rel material:binding:collection:Erasers = None -# <- @type -# ^ @module -# ^ @punctuation.delimiter -# ^ @module -# ^ @punctuation.delimiter -# ^ @module -# ^ @punctuation.delimiter -# ^ @variable -# ^ @constant.builtin diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/subLayers.usda b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/subLayers.usda deleted file mode 100644 index ddd1dd7..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/usd/subLayers.usda +++ /dev/null @@ -1,9 +0,0 @@ -#usda 1.0 -( - subLayers = [ - # <- @keyword - @./model_sub.usda@ (offset = 1) - # <- @string.special.url - # ^ @keyword - ] -) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/wing/class.w b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/wing/class.w deleted file mode 100644 index 1507d75..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/wing/class.w +++ /dev/null @@ -1,21 +0,0 @@ -bring cloud; -// <- @keyword.import -// ^ @module - -class Foo { -// <- @keyword.type -// ^ @type -// ^ @punctuation.bracket - name: str; -//^ @property -// ^ @type.builtin -// ^ @punctuation.delimiter - new(name: str) { -//^ @keyword -// ^ @variable - this.name = name; -// ^ @punctuation.delimiter -// ^ @variable.member -// ^ @operator - } -} diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/wing/nested_method.w b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/wing/nested_method.w deleted file mode 100644 index 080d297..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/wing/nested_method.w +++ /dev/null @@ -1,4 +0,0 @@ -test1.test2.test3(); -// <- @variable -// ^ @variable.member -// ^ @function.method.call diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/xhp-intro.hack b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/xhp-intro.hack deleted file mode 100644 index 0f8cffe..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/xhp-intro.hack +++ /dev/null @@ -1,46 +0,0 @@ -// From https://docs.hhvm.com/hack/XHP/introduction (MIT licensed) - -use namespace Facebook\XHP\Core as x; -use type Facebook\XHP\HTML\{XHPHTMLHelpers, a, form}; - - -final xhp class a_post extends x\element { -// ^ @keyword.modifier -// ^ @keyword.modifier -// ^ @keyword - use XHPHTMLHelpers; - - attribute string href @required; - // ^ @attribute - attribute string target; - // ^ @keyword - - <<__Override>> - protected async function renderAsync(): Awaitable { - $id = $this->getID(); - - $anchor = {$this->getChildren()}; - // ^ @tag.delimiter - // ^ @tag - $form = ( -
:href} - target={$this->:target} - class="postLink"> - {$anchor} - - ); - - $anchor->setAttribute( - 'onclick', - 'document.getElementById("'.$id.'").submit(); return false;', - ); - $anchor->setAttribute('href', '#'); - // ^ @function.method.call - - return $form; - } -} - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/yaml/promql-on-prometheus-rules.yaml b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/yaml/promql-on-prometheus-rules.yaml deleted file mode 100644 index 9104054..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights/yaml/promql-on-prometheus-rules.yaml +++ /dev/null @@ -1,33 +0,0 @@ -groups: -- name: Hardware alerts - rules: - - alert: Node down - expr: up{job="node_exporter"} == 0 - # ^ @type - for: 3m - labels: - severity: warning - annotations: - title: Node {{ $labels.instance }} is down - description: Failed to scrape {{ $labels.job }} on {{ $labels.instance }} for more than 3 minutes. Node seems down. - - alert: Node down - expr: | - up{job="node_exporter"} == 0 - # ^ @type - for: 3m - labels: - severity: warning - - alert: Regex and String matching - expr: | - foo{path=~"^foo$"}[5m] or foo{path!~"[a-zA-Z0-9]{1,3}"}[5m] or foo{path="/api/users/{userId}"}[5m] or foo{path!="/api/users/{userId}"}[5m] - # ^ @type - # ^ @string.regexp - # ^ @string.regexp - # ^ @string - # ^ @string - for: 3m - labels: - severity: warning - annotations: - title: Foo - description: Bar diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights_spec.lua deleted file mode 100644 index 3bb03d4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/highlights_spec.lua +++ /dev/null @@ -1,125 +0,0 @@ -local highlighter = require "vim.treesitter.highlighter" -local parsers = require "nvim-treesitter.parsers" -local ts = vim.treesitter - -local COMMENT_NODES = { - markdown = "html_block", - haskell = "haddock", -} - -local function check_assertions(file) - local buf = vim.fn.bufadd(file) - vim.fn.bufload(file) - local lang = parsers.get_buf_lang(buf) - assert.same( - 1, - vim.fn.executable "highlight-assertions", - '"highlight-assertions" not executable!' - .. ' Get it via "cargo install --git https://github.com/theHamsta/highlight-assertions"' - ) - local comment_node = COMMENT_NODES[lang] or "comment" - local assertions = vim.fn.json_decode( - vim.fn.system( - "highlight-assertions -p '" - .. vim.api.nvim_get_runtime_file("parser/" .. lang .. ".so", false)[1] - .. "' -s '" - .. file - .. "' -c " - .. comment_node - ) - ) - local parser = parsers.get_parser(buf, lang) - parser:parse(true) - - local self = highlighter.new(parser, {}) - - assert.True(#assertions > 0, "No assertions detected!") - for _, assertion in ipairs(assertions) do - local row = assertion.position.row - local col = assertion.position.column - - local captures = {} - local highlights = {} - self:prepare_highlight_states(row, row + 1) - self:for_each_highlight_state(function(state) - if not state.tstree then - return - end - - local root = state.tstree:root() - local root_start_row, _, root_end_row, _ = root:range() - - -- Only worry about trees within the line range - if root_start_row > row or root_end_row < row then - return - end - - local query = state.highlighter_query - - -- Some injected languages may not have highlight queries. - if not query:query() then - return - end - - local iter = query:query():iter_captures(root, self.bufnr, row, row + 1) - - for capture, node, _ in iter do - local hl = query:get_hl_from_capture(capture) - assert.is.truthy(hl) - - assert.Truthy(node) - assert.is.number(row) - assert.is.number(col) - if hl and ts.is_in_node_range(node, row, col) then - local c = query._query.captures[capture] -- name of the capture in the query - if c ~= nil and c ~= "spell" and c ~= "conceal" then - captures[c] = true - highlights[c] = true - end - end - end - end, true) - if assertion.expected_capture_name:match "^!" then - assert.Falsy( - captures[assertion.expected_capture_name:sub(2)] or highlights[assertion.expected_capture_name:sub(2)], - "Error in at " - .. file - .. ":" - .. (row + 1) - .. ":" - .. (col + 1) - .. ': expected "' - .. assertion.expected_capture_name - .. '", captures: ' - .. vim.inspect(vim.tbl_keys(captures)) - .. '", highlights: ' - .. vim.inspect(vim.tbl_keys(highlights)) - ) - else - assert.True( - captures[assertion.expected_capture_name] or highlights[assertion.expected_capture_name], - "Error in at " - .. file - .. ":" - .. (row + 1) - .. ":" - .. (col + 1) - .. ': expected "' - .. assertion.expected_capture_name - .. '", captures: ' - .. vim.inspect(vim.tbl_keys(captures)) - .. '", highlights: ' - .. vim.inspect(vim.tbl_keys(highlights)) - ) - end - end -end - -describe("highlight queries", function() - local files = vim.fn.split(vim.fn.glob "tests/query/highlights/**/*.*") - for _, file in ipairs(files) do - it(file, function() - check_assertions(file) - end) - end -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injection_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injection_spec.lua deleted file mode 100644 index 95ad12e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injection_spec.lua +++ /dev/null @@ -1,85 +0,0 @@ -require "nvim-treesitter.highlight" -- yes, this is necessary to set the hlmap -local configs = require "nvim-treesitter.configs" -local parsers = require "nvim-treesitter.parsers" -local ts = vim.treesitter - -local function check_assertions(file) - local buf = vim.fn.bufadd(file) - vim.fn.bufload(file) - local lang = parsers.get_buf_lang(buf) - assert.same( - 1, - vim.fn.executable "highlight-assertions", - '"highlight-assertions" not executable!' - .. ' Get it via "cargo install --git https://github.com/theHamsta/highlight-assertions"' - ) - local assertions = vim.fn.json_decode( - vim.fn.system( - "highlight-assertions -p '" .. configs.get_parser_install_dir() .. "/" .. lang .. ".so'" .. " -s '" .. file .. "'" - ) - ) - local parser = parsers.get_parser(buf, lang) - - local self = parser - local top_level_root = parser:parse(true)[1]:root() - - for _, assertion in ipairs(assertions) do - local row = assertion.position.row - local col = assertion.position.column - - local neg_assert = assertion.expected_capture_name:match "^!" - assertion.expected_capture_name = neg_assert and assertion.expected_capture_name:sub(2) - or assertion.expected_capture_name - local found = false - self:for_each_tree(function(tstree, tree) - if not tstree then - return - end - local root = tstree:root() - --- If there are multiple tree with the smallest range possible - --- Check all of them to see if they fit or not - if not ts.is_in_node_range(root, row, col) or root == top_level_root then - return - end - if assertion.expected_capture_name == tree:lang() then - found = true - end - end, true) - if neg_assert then - assert.False( - found, - "Error in at " - .. file - .. ":" - .. (row + 1) - .. ":" - .. (col + 1) - .. ': expected "' - .. assertion.expected_capture_name - .. '" not to be injected here!' - ) - else - assert.True( - found, - "Error in at " - .. file - .. ":" - .. (row + 1) - .. ":" - .. (col + 1) - .. ': expected "' - .. assertion.expected_capture_name - .. '" to be injected here!' - ) - end - end -end - -describe("injections", function() - local files = vim.fn.split(vim.fn.glob "tests/query/injections/**/*.*") - for _, file in ipairs(files) do - it(file, function() - check_assertions(file) - end) - end -end) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/cuda/macro-self-injection.cu b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/cuda/macro-self-injection.cu deleted file mode 100644 index a911842..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/cuda/macro-self-injection.cu +++ /dev/null @@ -1,2 +0,0 @@ -#define FOO(X,Y) X + Y -// ^ @cuda diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/dockerfile/bash-on-run-instructions.dockerfile b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/dockerfile/bash-on-run-instructions.dockerfile deleted file mode 100644 index 00621f1..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/dockerfile/bash-on-run-instructions.dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM foo -RUN bar -# ^ @bash -RUN \ - baz -# ^ @bash diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/ecma/ecma-test-injections.js b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/ecma/ecma-test-injections.js deleted file mode 100644 index 16ddd3c..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/ecma/ecma-test-injections.js +++ /dev/null @@ -1,9 +0,0 @@ -html`

`; - // ^ @html -html(`

`); - // ^ @html -svg`

`; - // ^ @html -svg(`

`); - // ^ @html - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/html/test-html-injections.html b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/html/test-html-injections.html deleted file mode 100644 index 0df3bd4..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/html/test-html-injections.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Test div to test css injections for style attributes -
- - - - - - - - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/http/injections.http b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/http/injections.http deleted file mode 100644 index 0f339cb..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/http/injections.http +++ /dev/null @@ -1,21 +0,0 @@ -### post-request script -GET https://jsonplaceholder.typicode.com/posts/3 - -# @lang=lua -> {% -local body = vim.json.decode(response.body) -client.global.set("postId", body.id) --- ^ @lua -%} - - -### run request with variable - -GET https://jsonplaceholder.typicode.com/posts/{{postId}} - -> {% - client.global.set("auth_token", response.body.jwt); - // ^ @javascript -%} - -### vim: ft=http diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/promql/regex.promql b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/promql/regex.promql deleted file mode 100644 index 08ed746..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/promql/regex.promql +++ /dev/null @@ -1,10 +0,0 @@ -foo{path=~"^foo$"}[5m] or -# ^ @regex -foo{path!~"[a-zA-Z0-9]{1,3}"}[5m] or -# ^ @regex -foo{path="/api/users/{userId}"}[5m] or -# ^ @!regex -foo{path!="/api/users/{userId}"}[5m] -# ^ @!regex - -# vim: ft=promql diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/query/test-query-injections.scm b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/query/test-query-injections.scm deleted file mode 100644 index f382edd..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/query/test-query-injections.scm +++ /dev/null @@ -1,27 +0,0 @@ -; vim: ft=query -; format-ignore -(((symbol) @constant - (#not-lua-match? @constant "^_*[A-Z][A-Z0-9_]*$")) -; ^ @luap -) - -; format-ignore -(((tag - (attributes - (attribute - (attribute_name) @keyword))) - (#match? @keyword "^(:|v-bind|v-|\\@)")) -; ^ @regex -) - -((comment) @injection.language - . - [ - (string_expression - (string_fragment) @injection.content) - (indented_string_expression - (string_fragment) @injection.content) - ] - (#gsub! @injection.language "#%s*([%w%p]+)%s*" "%1") - ; ^ @luap - (#set! injection.combined)) diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/ruby/test-ruby-debugger.rb b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/ruby/test-ruby-debugger.rb deleted file mode 100644 index 1dd8632..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/ruby/test-ruby-debugger.rb +++ /dev/null @@ -1,11 +0,0 @@ -binding.b(do: "puts 'Hello, world!'") -# ^ @ruby - -binding.b(pre: "pp [1, 2, 3]") -# ^ @ruby - -binding.break(do: "puts 'Hello, world!'") -# ^ @ruby - -binding.break(pre: "pp [1, 2, 3]") -# ^ @ruby diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/svelte/test-svelte-injections.svelte b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/svelte/test-svelte-injections.svelte deleted file mode 100644 index ea88aa6..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/svelte/test-svelte-injections.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - -
-

Test file

- {#each someItems as someItem} - -
{someItem}
- - {/each} - -
diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/vue/negative-assertions.vue b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/vue/negative-assertions.vue deleted file mode 100644 index 000702a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/vue/negative-assertions.vue +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/vue/test-vue-injections.vue b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/vue/test-vue-injections.vue deleted file mode 100644 index 4966e6a..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/vue/test-vue-injections.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // const file = files[0]; diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/bash-on-github-actions.yml b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/bash-on-github-actions.yml deleted file mode 100644 index 5c732b0..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/bash-on-github-actions.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: CI -on: - push: - branches: [master] - pull_request: - branches: [master] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '16' - - name: Install dependencies - run: npm ci - # ^ @bash - - name: Run tests - run: npm test - # ^ @bash - - name: Parse Petalisp - run: | - git submodule init - git submodule update - if (( $(node_modules/tree-sitter-cli/tree-sitter parse test/Petalisp/**/*.lisp -q | wc -l) > 2 )); then # There are 2 known failures (strings that are not format strings but use ~X syntax) - exit 1 - else - echo "Successfully parsed Petalisp" - fi - # ^ @bash - - name: Run tests - run: npm test diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/bash-on-taskfiles.yml b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/bash-on-taskfiles.yml deleted file mode 100644 index c99dc46..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/bash-on-taskfiles.yml +++ /dev/null @@ -1,24 +0,0 @@ -# https://taskfile.dev - -version: '3' - -vars: - GREETING: - sh: echo "Hello, World!" - # ^ @bash - -tasks: - default: - cmds: - - echo "{{.GREETING}}" - # ^ @bash - silent: true - cmd: - cmd: echo "{{.GREETING}}" - # ^ @bash - silent: true - cmd-block: - cmd: | - echo "{{.GREETING}}" - # ^ @bash - silent: true diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/promql-on-prometheus-rules.yaml b/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/promql-on-prometheus-rules.yaml deleted file mode 100644 index 942fb13..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/query/injections/yaml/promql-on-prometheus-rules.yaml +++ /dev/null @@ -1,33 +0,0 @@ -groups: -- name: Hardware alerts - rules: - - alert: Node down - expr: up{job="node_exporter"} == 0 - # ^ @promql - for: 3m - labels: - severity: warning - annotations: - title: Node {{ $labels.instance }} is down - description: Failed to scrape {{ $labels.job }} on {{ $labels.instance }} for more than 3 minutes. Node seems down. - - alert: Node down - expr: | - up{job="node_exporter"} == 0 - # ^ @promql - for: 3m - labels: - severity: warning - - alert: Regex and String matching - expr: | - foo{path=~"^foo$"}[5m] or foo{path!~"[a-zA-Z0-9]{1,3}"}[5m] or foo{path="/api/users/{userId}"}[5m] or foo{path!="/api/users/{userId}"}[5m] - # ^ @promql - # ^ @regex - # ^ @regex - # ^ @!regex - # ^ @!regex - for: 3m - labels: - severity: warning - annotations: - title: Foo - description: Bar diff --git a/nvim/.config/nvim/vendor/nvim-treesitter/tests/unit/ts_utils_spec.lua b/nvim/.config/nvim/vendor/nvim-treesitter/tests/unit/ts_utils_spec.lua deleted file mode 100644 index 397fa7e..0000000 --- a/nvim/.config/nvim/vendor/nvim-treesitter/tests/unit/ts_utils_spec.lua +++ /dev/null @@ -1,114 +0,0 @@ -local tsutils = require "nvim-treesitter.ts_utils" - -describe("update_selection", function() - local function get_updated_selection(case) - vim.api.nvim_buf_set_lines(0, 0, -1, false, case.lines) - tsutils.update_selection(0, case.node, case.selection_mode) - vim.cmd "normal! y" - return vim.fn.getreg '"' - end - - it("charwise1", function() - assert.equal( - get_updated_selection { - lines = { "foo", "", "bar" }, - node = { 0, 0, 2, 1 }, - selection_mode = "v", - }, - "foo\n\nb" - ) - it("charwise2", function() end) - assert.equal( - get_updated_selection { - lines = { "foo", "", "bar" }, - node = { 0, 1, 2, 1 }, - selection_mode = "v", - }, - "oo\n\nb" - ) - it("charwise3", function() end) - assert.equal( - get_updated_selection { - lines = { "foo", "", "bar" }, - node = { 0, 2, 2, 1 }, - selection_mode = "v", - }, - "o\n\nb" - ) - it("charwise4", function() end) - assert.equal( - get_updated_selection { - lines = { "foo", "", "bar" }, - node = { 0, 3, 2, 1 }, - selection_mode = "v", - }, - "\n\nb" - ) - end) - it("linewise", function() - assert.equal( - get_updated_selection { - lines = { "foo", "", "bar" }, - node = { 0, 3, 2, 1 }, - selection_mode = "V", - }, - "foo\n\nbar\n" - ) - end) - it("blockwise", function() - assert.equal( - get_updated_selection { - lines = { "foo", "", "bar" }, - node = { 0, 3, 2, 1 }, - selection_mode = "", - }, - "foo\n\nbar" - ) - end) -end) - -describe("swap_nodes", function() - local function swap(case) - vim.api.nvim_buf_set_lines(0, 0, -1, false, case.lines) - vim.opt.filetype = case.filetype - local a = vim.treesitter.get_node { - bufnr = 0, - pos = { case.a[1], case.a[2] }, - } - local b = vim.treesitter.get_node { - bufnr = 0, - pos = { case.b[1], case.b[2] }, - } - tsutils.swap_nodes(a, b, 0, true) - end - - it("works on adjacent nodes", function() - swap { - filetype = "python", - lines = { "print(1)" }, - a = { 0, 0 }, - b = { 0, 5 }, - } - - it("swaps text", function() end) - assert.same(vim.api.nvim_buf_get_lines(0, 0, -1, false), { "(1)print" }) - - it("moves the cursor", function() end) - assert.same(vim.api.nvim_win_get_cursor(0), { 1, 3 }) - end) - - it("works with multiline nodes", function() - swap { - filetype = "lua", - lines = { "x = { [[", "]], [[", ".....]]}" }, - a = { 0, 6 }, - b = { 1, 4 }, - } - - it("swaps text", function() end) - assert.same(vim.api.nvim_buf_get_lines(0, 0, -1, false), { "x = { [[", ".....]], [[", "]]}" }) - - it("moves the cursor", function() end) - assert.same(vim.api.nvim_win_get_cursor(0), { 2, 9 }) - end) -end)