diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-03-27 18:25:52 +0200 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-03-27 18:44:11 +0200 |
| commit | 97691940d1c9cdaef2ca73c4fae50987fdcadc6c (patch) | |
| tree | eca099753fa6219fca9b03856fa7bdb770274c7c | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.tar nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.tar.gz nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.tar.bz2 nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.tar.lz nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.tar.xz nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.tar.zst nvim-treesitter-97691940d1c9cdaef2ca73c4fae50987fdcadc6c.zip | |
doc: mention `vim.filetype.add()` in README
...instead of `ftdetect` additions
| -rw-r--r-- | README.md | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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. |
