#Neovim Syntax Highlighting Not Working

1 messages · Page 1 of 1 (latest)

sullen jolt
#

I've been taking a bit of a break from Gleam. Today is my first time opening my projects up since about March. The LSP server is definitely running, and I'm getting other features but no syntax highlighting. Anybody have any clue as to why?

require('lspconfig').gleam.setup({})

Gleam v1.11.1
Neovim v0.10.4

mighty turtle
#

If I’m not mistaken you’ll need to use treesitter to get the syntax highlighting

sullen jolt
#

I do have treesitter intstalled, how do I configure it to enable syntax highlighting?

torpid notch
#

:TSInstall gleam should do it

sullen jolt
#

I've done that, no change :/

torpid notch
#

anything of note in :checkhealth? and are you on the main branch of treesitter by chance? or master

sullen jolt
torpid notch
#

any change with :TSEnable gleam? and :checkhealth nvim-treesitter should have all checks for gleam

sullen jolt
#

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
   ^
sullen jolt
torpid notch
#

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

sullen jolt
#

Yeah, let's see.. I tested JS, Java, and Rust. I don't know which languages use treesitter off the top of my head 🤔

torpid notch
#

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?

sullen jolt
#

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?

torpid notch
#

well you're definitely not stupid. but i do believe this was always required 😬

sullen jolt
#

Hmmm most curious

#

Well thanks anyway

torpid notch
#

glad it's working, at least!

sullen jolt
#

Me too lol

static cosmos
#

I hope they make it easier to set up tree sitters