Stephan Seitz
9327b113c2
feat(install): Enable installation of parser with repo.url as a local path
2020-10-31 23:13:04 +01:00
Steven Sojka
dd7900fc44
fix(languagetree): highlight children regardless of starting column
2020-10-30 15:01:42 +01:00
BodneyC
333e1ab776
fix( #620 ): Fall into the "update-all" branch if lang is "all"
2020-10-28 10:24:58 +01:00
Stephan Seitz
aa4c3e83e3
Add virtual range for creating node-like objects from multiple nodes
2020-10-26 18:22:19 +01:00
Stephan Seitz
c3b526fe51
feat(install): add "maintained" option to only install maintained parsers
...
Unmaintained parsers only give users little benefit but take sometimes a
a long time to install (e.g. Markdown, Julia, Haskell parser). We could
recommend to only install maintained parsers by default.
2020-10-26 12:42:10 +01:00
kyazdani42
04ff77442a
show [treesitter] during install
2020-10-24 15:11:01 +02:00
Stephan Seitz
402795997c
feat: add TSConfigInfo to display current config
...
https://nvim-treesitter.zulipchat.com/#narrow/stream/252271-general/topic/Random/near/210929394
2020-10-24 10:40:12 +02:00
Thomas Vigouroux
d42b9c38f8
fix(markdown): remove from parser list
...
Bye bye markdown
2020-10-22 10:42:03 +02:00
Thomas Vigouroux
801416a8bc
fix(markdown): disable highlighting
...
The markdown scanner errors out far too often to be usable, disabling it
by default would avoid many issues until those assertion errors are
fixed.
2020-10-22 10:42:03 +02:00
Santos Gallegos
72f5d72413
LanguageTree: don't error when injecting a language
2020-10-21 16:20:52 +02:00
Thomas Vigouroux
e9129eee49
fix(languagetree): avoid language self-injection
...
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-21 08:36:23 +02:00
Zeger Van de Vannet
392c4b978b
Add verilog/systemverilog queries
2020-10-20 16:33:13 +02:00
Stephan Seitz
4da47d6dea
Remove textobjects from built_in_query_groups
2020-10-19 22:36:38 +02:00
kiyan42
1735528db5
Treesitter indent
...
also fixes the memoize_by_buf_tick function
2020-10-19 21:08:15 +02:00
kiyan42
36b5f6f075
start indent module
2020-10-19 21:08:15 +02:00
Thomas Vigouroux
f7d92f663c
feat(languagetree): implement language tree
...
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-19 18:28:45 +02:00
Stephan Seitz
994e42fac4
Fix: avoid overwriting tables in insert_to_path
...
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-16 13:48:59 +02:00
kiyan42
e5d8b6ade7
Remove get_parser logic
...
upstream now handles parsers by itself, so we don't need to do it
in this repo.
2020-10-16 13:48:24 +02:00
Thomas Vigouroux
06452845d6
fix(highlights): use new highlighter interface
2020-10-13 09:25:09 +02:00
Thomas Vigouroux
3b7b4daadb
query: remove unnecessary query parsing
2020-10-12 20:04:31 +02:00
Thomas Vigouroux
2c8d401bb8
highlight: use new highlighter interface
2020-10-12 20:04:31 +02:00
Thomas Vigouroux
c055899dc0
feat(queries): modeline mechanism for base langs
...
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-11 19:09:22 +02:00
Kristijan Husak
9ad47c65bd
Use utils get_node_text to get line content and trim all whitespaces.
2020-10-11 13:35:18 +02:00
Kristijan Husak
3aa7e575e2
Remove old statusline implementation with new one.
2020-10-11 13:35:18 +02:00
Kristijan Husak
62df1143da
Add implementation for improved statusline. Closes #545 .
2020-10-11 13:35:18 +02:00
Stephan Seitz
45397ebbd9
fix(highlights): Add TSNamespace highlight
...
Start adding highlights for
- C++
- Rust (including other scoped_identifier/scoped_type_identifier fixes)
- JS (only namespace_import)
Addresses #516
2020-10-10 15:31:51 +02:00
Suhas Hebbar
f5ac2b4a1a
Shorten module reference shell_command_selectors to shell.
2020-10-06 19:08:42 +02:00
Suhas Hebbar
46ce4adca8
Code Refactor
...
- Move select_* function to shell_command_selectors.lua.
- Rename select_args to select_compiler_args.
2020-10-06 19:08:42 +02:00
Suhas Hebbar
40edefc476
Remove dependency on unzip.
...
Use tar instead which should be available on default Unixes and Windows
2020-10-06 19:08:42 +02:00
Corey Williamson
c2acddd651
Add teal parser
2020-10-05 12:02:59 +02:00
Stephan Seitz
9f5237b6c5
Fix: fallback git-installation (list of commands is expected)
2020-10-04 21:48:25 +02:00
Pau Ruiz Safont
f1c272676b
feat: add ocamllex parser and highlights
2020-10-04 14:33:29 +02:00
Stephan Seitz
3362f45196
Remove textobjects module
2020-10-04 14:20:20 +02:00
Steven Sojka
7f325538cc
Merge pull request #487 from steelsojka/remove-refactor
...
chore(modules): remove refactor module
2020-10-04 07:01:53 -05:00
Alvaro Muñoz
3dc2e9331e
initial support for CodeQL
2020-09-30 17:06:58 +02:00
Stephan Seitz
b66b533ecd
chore: dedup join_paths <-> join_path
2020-09-28 17:40:34 +02:00
Stephan Seitz
18fca90457
Add progress info to iter_cmd
2020-09-27 13:09:12 +02:00
Stephan Seitz
0a51d492a5
Add lockfile and make lockfile default install revision
2020-09-27 13:09:12 +02:00
Steven Sojka
82a8b859c6
chore(modules): remove refactor module
2020-09-25 10:30:35 -05:00
Stephan Seitz
0643fa3003
feat(parsers): add possibility to install from other branches
...
More and more Github repos are switching to "main" branch.
Example: `tree-sitter-wasm`
2020-09-22 21:27:24 +02:00
Stephan Seitz
8c10b1a14d
fix(checkhealth): use pcall to check for syntax errors in query files
2020-09-20 10:37:06 +02:00
Stephan Seitz
e31cbdc13d
feat(install): make compiler selectable
...
Compilers are selectable via 'nvim-treesitter.install'.compilers (list of compilers) or environment variable CC
Addresses #502
2020-09-19 20:05:22 +02:00
Stephan Seitz
8c4bc2803c
fix: only concatenate cmd.err if not nil
2020-09-19 10:45:52 -05:00
Pau Ruiz Safont
2efeb80a44
feat(install): print more information when there's a failure
2020-09-19 13:35:12 +02:00
Pau Ruiz Safont
749a8a7f25
feat: add parser for ocaml interface files
...
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-19 13:35:12 +02:00
Stephan Seitz
7e3c4f8089
Add @keyword.operator for operators that are English words and add @exception for Java/JS
2020-09-19 07:30:49 +02:00
Rasmus Michelsen
2624c00b37
Ensure that updated files are replaced w/o warning
2020-09-18 22:35:45 +02:00
Akin Sowemimo
3652bed53e
Re-add attribute highlight
2020-09-18 21:30:13 +02:00
TravonteD
c366a041c8
Add TSTag and TSTagDelimiter groups
...
These groups will be added for use with xml-like tags such as html and
jsx.
2020-09-18 17:09:43 +02:00
Florian Beeres
18adc9e176
Make :TSInstall work in Nix by adding a second module installation target ( #473 )
...
* 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-18 09:44:07 +02:00