aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorpatrick96 <p.ziegler96@gmail.com>2021-11-13 18:27:01 +0100
committerStephan Seitz <stephan.seitz@fau.de>2021-11-28 00:31:02 +0100
commit76673d61c3e20de7b10562c4ac8bbbca64e2e999 (patch)
tree4e9f736118068f0b62a6db2eb35026595185b928 /doc
parentAdd documentation for cond setting (diff)
downloadnvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.tar
nvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.tar.gz
nvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.tar.bz2
nvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.tar.lz
nvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.tar.xz
nvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.tar.zst
nvim-treesitter-76673d61c3e20de7b10562c4ac8bbbca64e2e999.zip
Rename cond to condition
Diffstat (limited to 'doc')
-rw-r--r--doc/nvim-treesitter.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt
index a55f50f7e..9cc975ed2 100644
--- a/doc/nvim-treesitter.txt
+++ b/doc/nvim-treesitter.txt
@@ -74,12 +74,13 @@ Each module corresponds to an entry in the dictionary passed to the
EOF
<
-All modules share some common options, like `enable`, `disable`, and `cond`.
+All modules share some common options, like `enable`, `disable`, and
+`condition`.
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.
-For more fine-grained control, `cond` takes a function and whenever it returns
+For more fine-grained control, `condition` takes a function and whenever it returns
`false` the module is disabled for that buffer.
-The `cond` function is called once when a module starts in a buffer and
+The `condition` function is called once when a module starts in a buffer and
received the language and the buffer number as arguments.
>
@@ -88,7 +89,7 @@ received the language and the buffer number as arguments.
highlight = {
enable = true,
disable = { "cpp", "lua" },
- cond = function(lang, bufnr) -- Disable in large C++ buffers
+ condition = function(lang, bufnr) -- Disable in large C++ buffers
return not (lang == "cpp" and api.nvim_buf_line_count(bufnr) > 50000)
end,
},