Commit Graph

127 Commits

Author SHA1 Message Date
Gabriel Holodak
c5623d3486 docs: document setting foldmethod alongside foldexpr (#8187) 2025-12-02 17:15:52 -08:00
Christian Clason
cdb5d5ef23 docs(readme): remove wiki link 2025-10-17 14:24:49 +02:00
Christian Clason
ff770d718b fix(install): don't print operation summary by default
Problem: People complain about noisy `install()`.

Solution: Gate operation summary behind `summary` install option
(default false, set to true for interactive `:TS*` commands).
2025-05-29 20:08:10 +02:00
Christian Clason
ce903fde5d feat(api): expose list of available and installed languages 2025-05-29 12:11:56 +02:00
Christian Clason
c1dfc39285 fix(config): prepend install_dir to rtp 2025-05-25 13:11:28 +02:00
Lewis Russell
69371f0148 feat(install)!: migrate to latest async.nvim impl (#7856)
Provides significantly simpler blocking installation and update.
2025-05-16 18:33:52 +02:00
Christian Clason
b0a20057b0 feat(config)!: remove ignore_install
This was only useful for no longer supported `auto_install` option.
2025-05-16 08:48:27 +02:00
Christian Clason
e8bfe271b0 docs: update to rewrite
This updates

* README
* CONTRIBUTING
* the `:h nvim-treesitter` documentation

to the current state of `main`. It also adds a pull request template for
adding a new language.
2025-05-12 18:43:41 +02:00
Christian Clason
522e0c6991 feat(setup)!: remove ensure_install field
Instead, call `require('nvim-treesitter').install( { ... } )` manually.

This gives users full control over how they want to install parsers
(sync, from grammar, limited concurrency) and obviates the need for
calling `setup` for most users.
2025-05-12 18:43:40 +02:00
Christian Clason
a9f34d5a76 feat(parsers): rework tiers
* stable: updates follow semver releases (todo)
* unstable: updates follow HEAD (default)
* unmaintained: no automatic updates
* unsupported: no updates, cannot be installed
2025-05-12 18:43:40 +02:00
Christian Clason
ab230eadd4 feat(config)!: remove auto_install
use https://github.com/lewis6991/ts-install.nvim instead
2025-05-12 18:43:40 +02:00
Christian Clason
c17de56890 feat!: track parser revision in Lua
Problem: Tracking parser revision in lockfile and allowing override
through the parsers module complicates the code. In addition, only
revision changes are handled robustly, not changes to other installation
info.

Solution: Track parser revision in the parsers module directly. Reload
parser table on every install or update call. Support modifying parser
table in a `User TSUpdate` autocommand.
2025-05-12 18:43:40 +02:00
Christian Clason
5a70048116 feat: drop TSInstallInfo in favor of better checkhealth
also fixes the hole in install.compilers
2025-05-12 18:43:40 +02:00
Lewis Russell
cde679e435 refactor: rewrite installation using jobs and async
Replace sync variants with callback support
2025-05-12 18:43:40 +02:00
Christian Clason
692b051b09 feat!: drop modules, general refactor and cleanup 2025-05-12 18:43:40 +02:00
George Harker
cb568af539 use indent.X syntax for captures and properties of set directives
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
2023-03-24 13:07:53 -04:00
George Harker
d1333dd7e5 refactor(indent)!: Rework indent, aligned indent
indents now use @indent.X style captures, and indent.PROP for properties to set on those captures, as documented in the help.

Captures are:

indent.auto
indent.begin
indent.end
indent.dedent
indent.branch
indent.ignore
indent.align
indent.zero

Properties are:

indent.immediate
indent.start_at_same_line
indent.open_delimiter
indent.close_delimiter
indent.increment
indent.avoid_last_matching_next

Multiple opening delims on one line and multiple closing on a line are collapsed so as not to over indent,

The final line of @indent.align blocks which must in some cases be treated specially to avoid clashing with the next line is treated the same regardless of whether the @indent.align capture actually uses aligned indentation or just normal indentation. The indent.avoid_last_matching_next property controls this.

Adjust python to use these.

List, set, dict and tuple all use @indent.align which permits both hanging and aligned styles.

Finally, try: on it’s own will indent when typing live but make no guaranteeds about whole-file formatting.

Includes lucario387:fix-align-indent
2023-03-24 13:07:53 -04:00
Zhizhen He
a1df50a79f docs: fix typo 2023-03-21 02:23:52 -04:00
Nat Williams
20a8f30ace use positive option "allow_duplicates" instead of negative "dedupe" 2023-02-24 14:55:30 -08:00
Nat Williams
3fab7abf6f add statusline option to dedupe or not 2023-02-24 14:55:30 -08:00
Nat Williams
34adfe8e95 update docs for transform_fn
to reflect additional node argument
2023-02-24 14:55:30 -08:00
Kiyoon Kim
7eb5f1a2e3 properly replace deprecated tsutils functions 2023-02-12 14:26:14 -08:00
Christian Clason
42ab95d5e1 feat!: remove obsolete TS* highlight groups 2022-10-16 15:50:55 +02:00
lfenzo
77675b6706 Correct previously edited docs file 2022-08-03 12:05:30 -07:00
lfenzo
8665a99a0f Updated nvim-tresitter.txt doc 2022-08-03 12:05:30 -07:00
adrian5
ba806c2480 doc: fix typos (#3163) 2022-07-11 08:12:32 +02:00
Jonas Strittmatter
365f0eb75f feat: add option to auto-install missing parsers (#3130) 2022-07-08 07:36:54 +00:00
Duncan McDougall
901ffe1a36 Add support for custom parser install locations #2959 (#3031) 2022-06-20 22:50:07 +02:00
Stephan Seitz
c3848e713a chore: deprecate ts_utils.get_node_text 2022-04-18 14:17:51 +02:00
Christian Clason
acd01551a3 chore!: deprecate ensure_installed=maintained
BREAKING CHANGE: specify explicit list or use `ensure_installed='all'`
(not recommended)
2022-04-10 13:24:57 +02:00
kiyan
7141393f12 fix(modules): enabling disabling per buffer and globally
When a module is disabled by default in the config, running
TSBufEnable will not enable the module because the is_enabled
function will always return false, thus the module not being enabled.
Also, disabling/enabling the buffers is flaky.

This commit adds per buffer check when the module is not disabled. It
also makes the enable and disable more indempotent.

i've also renamed TS*All to TS*.

Fixes #2754
2022-04-10 11:10:12 +02:00
Gregory Anders
e2b2d2357b Add capture groups for remaining builtin highlight groups
Some builtin highlight groups (see `:h group-name`) do not yet have
associated capture groups, so add them.
2022-03-30 22:14:23 +02:00
kiyan
560e8fb450 refacto: expose a function to set custom capture for the higlighter
BREAKING: deprecate custom_captures from highlight config.
This allows plugin authors to extend the map. It also avoids settings
user configuration specific values during the highlighter
initialization (SOC).
Not sure how much value this brings, and might potentially break a lot
of people configurations. This is questionable.
2022-02-19 18:26:51 +01:00
kiyan
cf21576b0c chore: update init.vim refs to init.lua 2022-02-11 10:42:03 +01:00
kiyan
2e67eace75 chore: remove lua heredocs in documentation and readme 2022-02-11 10:42:03 +01:00
monkoose
500f58f5ac docs: add missing vim table in the example 2022-01-22 11:09:39 +01:00
Santos Gallegos
4aa9f6b7f7 Make example config more easy to read
Ref https://github.com/nvim-treesitter/nvim-treesitter/issues/2095#issuecomment-992759818
2021-12-18 14:50:48 +01:00
patrick96
d2174f1d29 Fix docs 2021-11-28 00:31:02 +01:00
patrick96
e8bde2fe61 Completely remove condition from documentation 2021-11-28 00:31:02 +01:00
patrick96
d24a1c63d4 Make disable accept a function
Replaces the condition setting (though it does the exact inverse)
2021-11-28 00:31:02 +01:00
patrick96
76673d61c3 Rename cond to condition 2021-11-28 00:31:02 +01:00
patrick96
be1c93f848 Add documentation for cond setting
Ref: #1994
2021-11-28 00:31:02 +01:00
Dundar Göc
83efae51bf docs: move description to the first line
This will make the description of nvim-treesitter show up in the LOCAL
ADDITIONS section of the help text. So this

|nvim-treesitter|

instead becomes

|nvim-treesitter|  Treesitter configurations and abstraction layer for Neovim.
2021-11-05 18:32:19 -05:00
Dundar Göc
6a4fdb317d chore: fix typos 2021-11-02 23:47:48 +01:00
Sergio Alejandro Vargas
1d8dd9665c docs: Update nvim-treesitter-highlights
- Fix misspellings, missing punctuation and capitalization.
- Clarify whether highlights apply to identifiers (e.g. `TSConstant`)
  or to literal values (e.g. `TSConstBuiltin`).
- Extend examples.

See #1767
2021-09-14 21:15:20 +02:00
lmlorca
fb5d6e04a8 add @tag.attribute for html like attributes 2021-07-14 10:13:13 +02:00
Stephan Seitz
29113e6892 doc: be more explicit about additional_vim_regex_highlighting (#1561) 2021-07-13 18:08:57 -05:00
Santos Gallegos
647268183f Highlights: define string.special (#1551)
* Highlights: define string.special

This was in our CONTRIBUTING.md file,
but wasn't defined.

Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/1405

* Use string.escape
2021-07-11 15:59:53 -05:00
Munif Tanjim
97761acaff Folds: support 'foldminlines' 2021-07-08 21:42:02 +02:00
Santos Gallegos
3413581b58 Docs: mention that indentation is still experimental 2021-07-05 19:26:35 +02:00