aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-04-28 16:27:47 +0200
committerGitHub <noreply@github.com>2024-04-28 16:27:47 +0200
commit26b5405d181e8c9e75c4b4ec9aae963cc25f285f (patch)
tree94526234bb67a08a6d2708f05a7579cc3301773f /runtime/doc
parent4625394a767fab311f75ef40f4f15c661156e071 (diff)
downloadrneovim-26b5405d181e8c9e75c4b4ec9aae963cc25f285f.tar.gz
rneovim-26b5405d181e8c9e75c4b4ec9aae963cc25f285f.tar.bz2
rneovim-26b5405d181e8c9e75c4b4ec9aae963cc25f285f.zip
fix(treesitter): enforce lowercase language names (#28546)
* fix(treesitter): enforce lowercase language names Problem: On case-insensitive file systems (e.g., macOS), `has_parser` will return `true` for uppercase aliases, which will then try to inject the uppercase language unsuccessfully. Solution: Enforce and assume parser names to be lowercase when resolving language names.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/treesitter.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 67cbeda2a8..2b9eba1520 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -30,6 +30,9 @@ A parser can also be loaded manually using a full path: >lua
vim.treesitter.language.add('python', { path = "/path/to/python.so" })
<
+Parser names are assumed to be lower case if the file system is
+case-sensitive.
+
To associate certain |filetypes| with a treesitter language (name of parser),
use |vim.treesitter.language.register()|. For example, to use the `xml`
treesitter parser for buffers with filetype `svg` or `xslt`, use: >lua