Closed devstefancho closed 1 year ago
@devstefancho I updated neovim and treesitter yesterday and I ran into a similar issue. If you haven't already, first try :TSUpdate markdown markdown_inline
. If that still doesn't work, make sure treesitter highlighting is actually enabled with :TSEnable highlight
. This was the main issue for me even though my treesitter config has highlight.enable = true
. So this must be a bug with treesitter. I ended up having to use an autocmd to force enabling highlight:
@epwalsh thanks for your suggestion I copied your tresitter.lua and update the commit hash like your lazy-lock But It still does not work.
Sadly π₯² all highlight is gone (only available white color) Do you have syntax highlight for header1~4 ?
I should mention I'm also using nightly Neovim (upgraded yesterday). That might make a difference. treesitter recommends using nightly. I do get header syntax highlighting for 1-4.
I reinstall to nvim nightly (now I use NVIM v0.9.0-dev-1307+g75e1b1d5c-dirt
)
and after reinstall then try this step , but it didn't work
(also try clean and install obsidian.nvim)
Hmm.. Maybe it is not related with obisidian nvim, because another markdown files which is not located in vault have no syntax highlight.
Yea I agree itβs probably a bug with treesitter or the markdown parsers. Alternatively you could try a non-treesitter markdown plugin for highlighting like vim-markdown.
On Sat, Apr 1, 2023 at 6:46 AM Steven (stefan cho) @.***> wrote:
Hmm.. Maybe it is not related with obisidian nvim, because another markdown files which is not located in vault have no syntax highlight.
β Reply to this email directly, view it on GitHub https://github.com/epwalsh/obsidian.nvim/issues/116#issuecomment-1492974351, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDHPKZSLVFYOFIQ3R4HTFTW7AWRVANCNFSM6AAAAAAWO4HCEM . You are receiving this because you were mentioned.Message ID: @.***>
--
[image: Logo for the Allen Institute for AI] https://allenai.org/
Pete Walsh (he/him)
Engineering @ Allen Institute for AI
@epwalsh Thanks to your continuous support, I'm finally done
This issue is not from obsidian, but it's my fault
Treesitter docs As you said, treesitter recommend to install nightly version of nvim
Colorscheme rose-pine theme probably does not support markdown fully, so I change to tokyonight theme after that, header1~4 is now highlighted
Treesitter installation info
I should have checked the installation of javascript, typescript, tsx for markdown multiline code and single-line code
when I checked :TSInstallInfo
those languages are not installed, I don't know why those languages are not installed (which were included in ensured_installed), but after installing them manually, now all looks good
:TSInstall markdown markdown_inline javascript typescript tsx css yaml
Awesome, I'm glad you figured it out!
π Describe the bug
Hello, I have a problem with syntax highlighting In my case, Syntax highlight is not good. (poor readabillity π₯²) For example, I want to header to be another color (like orange) Is there any way to setup for this? I use treesitter and rose-pine colorscheme
obisidian.lua
treesitter.lua
treesitter config
rose-pine.lua (I think this maybe not the reason)
Versions