tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
411 stars 52 forks source link

Latex in code block only highlight in visual mode. #113

Open crazyhulk opened 1 year ago

crazyhulk commented 1 year ago

Describe the bug Latex in code block only highlight in visual mode.

image

It seems works well when I change tex to go.

image

─────────────────────────────────────────────────────────

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

 Installation
 - OK tree-sitter found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
 - OK node found v16.19.1 (only needed for :TSInstallFromGrammar)
 - OK git executable found.
 - OK cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
   Version: Apple clang version 14.0.3 (clang-1403.0.22.14.1)
 - OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

 OS Info:
 {
   machine = "arm64",
   release = "22.5.0",
   sysname = "Darwin",
   version = "Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:44 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8103"
 }

 Parser/Features         H L F I J
   - c                   ✓ ✓ ✓ ✓ ✓
   - comment             ✓ . . . .
   - go                  ✓ ✓ ✓ ✓ ✓
   - latex               ✓ . ✓ . ✓
   - lua                 ✓ ✓ ✓ ✓ ✓
   - markdown            ✓ . ✓ ✓ ✓
   - markdown_inline     ✓ . . . ✓
   - query               ✓ ✓ ✓ ✓ ✓
   - toml                ✓ ✓ ✓ ✓ ✓
   - 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}
MDeiml commented 11 months ago

Sorry for not responding, I was very busy the last few months.

This seems to be a bug with neovim rather than this parser, since the parser should not interact with modes or selections at all. I'd suggest opening an issue in https://github.com/nvim-treesitter/nvim-treesitter