From 97691940d1c9cdaef2ca73c4fae50987fdcadc6c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 27 Mar 2022 18:25:52 +0200 Subject: doc: mention `vim.filetype.add()` in README ...instead of `ftdetect` additions --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 73eb2a8c..bed71c5e 100644 --- a/README.md +++ b/README.md @@ -382,8 +382,7 @@ Once the parser is installed, you can update it (from the latest revision of the Note that neither `:TSInstall` nor `:TSInstallFromGrammar` copy query files from the grammar repository. If you want your installed grammar to be useful, you must manually [add query files](#adding-queries) to your local nvim-treesitter installation. Note also that module functionality is only triggered if your language's filetype is correctly identified. -If Neovim does not detect your language's filetype by default, you can add a short Vimscript file to nvim-treesitter's `ftdetect` runtime directory. -See [Neovim's documentation](https://neovim.io/doc/user/filetype.html#new-filetype) on how to use Vimscript to detect a filetype. +If Neovim does not detect your language's filetype by default, you can use [Neovim's `vim.filetype.add()`](https://neovim.io/doc/user/lua.html#vim.filetype.add()) (0.7.0 and above) to add a custom detection rule. If you use a git repository for your parser and want to use a specific version, you can set the `revision` key in the `install_info` table for you parser config. -- cgit v1.2.3