#Neovim Syntax Highlighting Not Working
1 messages · Page 1 of 1 (latest)
If I’m not mistaken you’ll need to use treesitter to get the syntax highlighting
I do have treesitter intstalled, how do I configure it to enable syntax highlighting?
:TSInstall gleam should do it
I've done that, no change :/
anything of note in :checkhealth? and are you on the main branch of treesitter by chance? or master
I'm on master
- Language client log: ~/.local/state/nvim/lsp.log
- Detected filetype: `gleam`
- 1 client(s) attached to this buffer
- Client: `gleam` (id: 1, bufnr: [1])
root directory: ~/Documents/projects/gleam/alarm/
filetypes: gleam
cmd: ~/Documents/projects/gleam/alarm/gleam lsp
version: `gleam 1.11.1`
executable: true
autostart: true
any change with :TSEnable gleam? and :checkhealth nvim-treesitter should have all checks for gleam
Hmm now isn't that interesting..
Installation ~
- WARNING `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK `node` found v20.19.2 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: cc (Debian 14.2.0-19) 14.2.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "aarch64",
release = "6.15.0-sc8280xp-arm64",
sysname = "Linux",
version = "#2 SMP PREEMPT Mon May 26 11:54:54 UTC 2025"
} ~
Parser/Features H L F I J
- c ✓ ✓ ✓ ✓ ✓
- gleam ✓ ✓ ✓ ✓ ✓
- lua ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- query x ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
The following errors have been detected: ~
- ERROR query(highlights): /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 14:2. Invalid node type "missing_node":
(missing_node
^
query(highlights) is concatenated from the following files:
| [ERROR]:"/home/liam/.local/share/nvim/lazy/nvim-treesitter/queries/query/highlights.scm", failed to load: /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 14:2. Invalid node type "missing_node":
(missing_node
^
And no apparent change with :TSEnable gleam
hmm... could be an issue. can try :TSUpdate query i suppose?
dunno if that matters outside of parsing actual treesitter queries, but can't hurt to try lol
also to confirm, you get highlights for other treesitter languages?
i would also try :TSUpdate gleam if you haven't already
Yeah, let's see.. I tested JS, Java, and Rust. I don't know which languages use treesitter off the top of my head 🤔
i don't see those listed under your checkhealth above, so i suspect they probably are using the regex highlights?
what does your nvim-treesitter setup call look like?
Okay yeah, I had the setup call empty. I added
highlight = {
enable = true,
}
and what do you know 🤦♀️
I'm 100% sure I had syntax highlighting before, did this change recently or am I stupid?
well you're definitely not stupid. but i do believe this was always required 😬
glad it's working, at least!
Me too lol
I hope they make it easier to set up tree sitters