tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
374 stars 45 forks source link

How do I tell if I'm using experimental or basic highlighting in neovim #121

Closed idvorkin closed 8 months ago

idvorkin commented 8 months ago

I'm not getting syntax highlighting of comments or of the YAML front matter. I don't know to tell which configuration I'm using.

From the tree sitter documentation:

markdown (basic highlighting) (experimental, maintained by @MDeiml) markdown_inline (needed for full highlighting) (experimental, maintained by @MDeiml)

Comments:

image

YAML front matter:

image

Any help would be greatly appreciated. Here's my checkhealth output:

nvim-treesitter: require("nvim-treesitter.health").check()

Installation
- OK tree-sitter found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
- OK node found v20.5.1 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "4.14.305-227.531.amzn2.x86_64",
  sysname = "Linux",
  version = "#1 SMP Tue Feb 14 09:55:28 UTC 2023"
}

Parser/Features         H L F I J
  - c                   ✓ ✓ ✓ ✓ ✓
  - gitcommit           ✓ . . . ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - markdown            ✓ . ✓ ✓ ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - 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}
idvorkin commented 8 months ago

I'm new to neovim, so would love to learn how to better debug these scenarios as well!

idvorkin commented 8 months ago

Ah, found it! Using the documentation from here:

https://thevaluable.dev/tree-sitter-neovim-overview/

:TSInstallInfo

Then

:TSInstall markdown_inline
:TSInstall yaml
MDeiml commented 8 months ago

I'm very sorry to miss your issue, was very busy the last few months. But happy that you found a solution yourself!