summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter
AgeCommit message (Collapse)Author
2020-10-21fix(languagetree): avoid language self-injectionThomas Vigouroux
This avoids some stack overflows when a language includes itself. This is a temporary solution, and will be addressed later when actually managing our own parsers.
2020-10-20Add verilog/systemverilog queriesZeger Van de Vannet
2020-10-19Remove textobjects from built_in_query_groupsStephan Seitz
2020-10-19Treesitter indentkiyan42
also fixes the memoize_by_buf_tick function
2020-10-19start indent modulekiyan42
2020-10-19feat(languagetree): implement language treeThomas Vigouroux
Allow the LanguageTree to be used as an option for highlighting. Co-authored-by: Santos Gallegos <stsewd@protonmail.com> Co-authored-by: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
2020-10-16Fix: avoid overwriting tables in insert_to_pathStephan Seitz
The following query will result in matches with only one node though it requires two nodes to be a match. ```scheme (function_definition (comment) @function.inner.start body: (block) @function.inner) ``` Why? First `insert_to_path` is called for `@function.inner.start` which will result int the following table. ```lua { function = { inner = { start { node } } } } ``` `insert_to_path` will overwrite the result ```lua { function = { inner = { node } } } ``` Related #552
2020-10-16Remove get_parser logickiyan42
upstream now handles parsers by itself, so we don't need to do it in this repo.
2020-10-13fix(highlights): use new highlighter interfaceThomas Vigouroux
2020-10-12query: remove unnecessary query parsingThomas Vigouroux
2020-10-12highlight: use new highlighter interfaceThomas Vigouroux
2020-10-11feat(queries): modeline mechanism for base langsThomas Vigouroux
This implements https://github.com/neovim/neovim/pull/13059#issuecomment-704414189 This behaves like modelines and remove the use of the base_language map. Also, this allows to fine-tune what we actually want to include per query, which is better IMO.
2020-10-10fix(highlights): Add TSNamespace highlightStephan Seitz
Start adding highlights for - C++ - Rust (including other scoped_identifier/scoped_type_identifier fixes) - JS (only namespace_import) Addresses #516
2020-10-06Shorten module reference shell_command_selectors to shell.Suhas Hebbar
2020-10-06Code RefactorSuhas Hebbar
- Move select_* function to shell_command_selectors.lua. - Rename select_args to select_compiler_args.
2020-10-06Remove dependency on unzip.Suhas Hebbar
Use tar instead which should be available on default Unixes and Windows
2020-10-05Add teal parserCorey Williamson
2020-10-04Fix: fallback git-installation (list of commands is expected)Stephan Seitz
2020-10-04feat: add ocamllex parser and highlightsPau Ruiz Safont
2020-10-04Remove textobjects moduleStephan Seitz
2020-10-04Merge pull request #487 from steelsojka/remove-refactorSteven Sojka
chore(modules): remove refactor module
2020-09-30initial support for CodeQLAlvaro Muñoz
2020-09-28chore: dedup join_paths <-> join_pathStephan Seitz
2020-09-27Add progress info to iter_cmdStephan Seitz
2020-09-27Add lockfile and make lockfile default install revisionStephan Seitz
2020-09-25chore(modules): remove refactor moduleSteven Sojka
2020-09-22feat(parsers): add possibility to install from other branchesStephan Seitz
More and more Github repos are switching to "main" branch. Example: `tree-sitter-wasm`
2020-09-20fix(checkhealth): use pcall to check for syntax errors in query filesStephan Seitz
2020-09-19feat(install): make compiler selectableStephan Seitz
Compilers are selectable via 'nvim-treesitter.install'.compilers (list of compilers) or environment variable CC Addresses #502
2020-09-19fix: only concatenate cmd.err if not nilStephan Seitz
2020-09-19feat(install): print more information when there's a failurePau Ruiz Safont
2020-09-19feat: add parser for ocaml interface filesPau Ruiz Safont
The files have the mli extension. The parser grammar uses the name ocaml_interface, but since vim the underscore has a special meaning ocamlinterface is used as the filetype.
2020-09-19Add @keyword.operator for operators that are English words and add ↵Stephan Seitz
@exception for Java/JS
2020-09-18Ensure that updated files are replaced w/o warningRasmus Michelsen
2020-09-18Re-add attribute highlightAkin Sowemimo
2020-09-18Add TSTag and TSTagDelimiter groupsTravonteD
These groups will be added for use with xml-like tags such as html and jsx.
2020-09-18Make :TSInstall work in Nix by adding a second module installation target (#473)Florian Beeres
* Ignore tags file in project root * Make :TSInstall work with Nix This commit adds logic to determine where to install parsers, meaning the *.so files. Until now the package path of the nvim-treesitter plugin was used. But when installed with Nix, the plugin lands in "/nix/store", which is read-only. With this commit $XDG_DATA_HOME/nvim/site/parser/*.go will be used as the parser installation path. The directory will be created if it doesn't exist. * Add generate_join function The generate_join function is used to create two other functions, one to join path segments, the other to join strings with a space for error messages.
2020-09-16fix(folds): has_fold -> has_foldsStephan Seitz
2020-09-15add TSNonekiyan42
2020-09-14Folds: rename query files to folds.scm to be consistentSantos Gallegos
We use plural names for all query files except folds.
2020-09-12TextObjects: refactor wrong func namesSantos Gallegos
Reading the code, these functions should be named differently https://github.com/nvim-treesitter/nvim-treesitter/blob/a755017dd52947672af458743b88e59a59cd592f/lua/nvim-treesitter/query.lua#L203-L203
2020-09-11Yield meaningful error messages in iter_cmd{,_sync} when cmd.err == nilStephan Seitz
2020-09-11Allow to call setup on already loaded modules.Santos Gallegos
2020-09-10Improve startuptimeSantos Gallegos
- Don't load everything at startup - Don't define an autocomand for each module and for each supported lang (this creates nxm autocomand!)
2020-09-10Find package path based on the Lua source fileMarkus Koller
This is more robust compared to the previous method where we walked up the tree and matched on the directory name, which also required that the repository was cloned in a directory named `nvim-treesitter`.
2020-09-10Ocaml: fix parserSantos Gallegos
Paths were changed https://github.com/tree-sitter/tree-sitter-ocaml/pull/41
2020-09-08Fix #418: iterator function should always return an iteratorStephan Seitz
Even if it's an empty iterator.
2020-09-08feat(parsers): add filetype PKGBUILDStephan Seitz
2020-09-08Import treesitter.install only when neededSantos Gallegos
2020-09-08Improve startup performanceSantos Gallegos