Commit graph

514 commits

Author SHA1 Message Date
Bryan Kegley
4cc4c6f8b1 feat: add graphql grammar 2020-11-27 14:06:27 +01:00
Stephan Seitz
25bf605940 Only update outdated_parsers on TSUpdate 2020-11-25 08:04:54 +01:00
Stephan Seitz
fccc159b48 fix: make version check work on non-CI environments 2020-11-23 20:09:04 +01:00
Thomas Vigouroux
808765a6c8
fix: update interface following languagetree merge (#687) 2020-11-23 12:46:27 -06:00
leo60228
9634d9b32a Add @leo60228 as Nix maintainer 2020-11-22 22:29:55 +01:00
Stephan Seitz
3674ad89df fix(predicates): Fix #446: highlight property only if not a method 2020-11-18 21:54:04 +01:00
Stephan Seitz
f4979e5379 feat(predicates): extend has-ancestor?, add has-parent?/has-type? 2020-11-18 21:54:04 +01:00
Stephan Seitz
00d5408527 Make make-range! more relaxed (one of the arguments maybe nil) 2020-11-17 08:52:53 +01:00
sogaiu
0f80b7d390 Add initial clojure support 2020-11-04 10:23:20 +01:00
Thomas Vigouroux
6eca8d2f38 parser: only use parse to get a tree
This will avoid using internal data.
2020-11-03 21:16:51 +01:00
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