I'm using Treesitter in Neovim for code highlighting, but most of my code highlights appear as italic. I've encountered some GitHub issues related to this problem, which can be found here: GitHub Issues.
I suspect this might be a mistake on my part rather than a bug in Treesitter. I'm just trying to set up a simple Neovim configuration.
Could this issue be related to running Neovim on WSL (Windows Subsystem for Linux)?
Here's an example of what my code looks like:
And here's my Treesitter.lua configuration:
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = { "lua", "c", "javascript", "vimdoc", "rust" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering a buffer
-- Recommendation: set to false if you don't have the `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
-- `false` will disable the whole extension
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true, it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
I'm using Neovim version:
- NVIM v0.10.0-dev-1451+g20dd9f3a2
- Build type: Release
- LuaJIT 2.1.1697887905