mirror of
https://github.com/josean-dev/dev-environment-files.git
synced 2025-01-08 17:21:23 +01:00
Changed fix for nvim-treesitter update and lua parser problem
This commit is contained in:
parent
ece7230e90
commit
456fa58d2b
1 changed files with 6 additions and 13 deletions
19
README.md
19
README.md
|
@ -27,24 +27,17 @@
|
||||||
|
|
||||||
📹 Youtube Step-by-Step Guide: [How I Setup Neovim On My Mac To Make It Amazing](https://youtu.be/vdn_pKJUda8)
|
📹 Youtube Step-by-Step Guide: [How I Setup Neovim On My Mac To Make It Amazing](https://youtu.be/vdn_pKJUda8)
|
||||||
|
|
||||||
### Issue I Encountered with Treesitter and Lua Syntax Highlighting
|
### Issue with Nvim-Treesitter Update and Neovim Built-In Lua Parser
|
||||||
I updated treesitter recently and ran into an issue with my lua file syntax highlighting. It seems
|
I updated nvim-treesitter recently and ran into an issue with my lua file syntax highlighting through treesitter. It seems
|
||||||
that the homebrew install of neovim includes a lua parser that is no longer compatible with the latest version of nvim-treesitter.
|
that the homebrew install of neovim 0.8 includes a lua parser that is no longer compatible with the latest version of nvim-treesitter. By default nvim-treesitter will try to use this parser instead of installing the lua parser that is available through nvim-treesitter and thus throw an error.
|
||||||
|
|
||||||
I found the solution here: https://github.com/nvim-treesitter/nvim-treesitter/issues/3092.
|
I had to manually install the latest lua parser manually through nvim-treesitter so that it would use this parser instead of the one that comes built into neovim by running the following within neovim:
|
||||||
|
|
||||||
I had to remove the built-in lua parser from the homebrew install of neovim like so:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rm -rf /opt/homebrew/Cellar/neovim/0.8.0/lib/nvim/parser/lua.so
|
:TSInstall lua
|
||||||
```
|
```
|
||||||
|
|
||||||
Another option is to install the development version of Neovim like so:
|
It will ask if you would like to reinstall the parser. Answer "y" for yes. After that is finished, restart neovim and the problem should be fixed.
|
||||||
```bash
|
|
||||||
brew install neovim --HEAD
|
|
||||||
```
|
|
||||||
|
|
||||||
Hopefully this issue should be fixed in the next version of Neovim.
|
|
||||||
|
|
||||||
### Setup Requires
|
### Setup Requires
|
||||||
- True Color Terminal Like: [iTerm2](https://iterm2.com/)
|
- True Color Terminal Like: [iTerm2](https://iterm2.com/)
|
||||||
|
|
Loading…
Reference in a new issue