GithubHelp home page GithubHelp logo

Comments (14)

dpopchev avatar dpopchev commented on September 27, 2024 1

I confirm lossing highlight after :TSUpdate and :TSUpdateSync.

I found that

# clean up and built in highlight 
:TSUninstall markdown
:TSUninstall markdown_inline
# highlight disappears 
:TSInstall markdown
# markdown_inline used to conceal the links nicely
# now there is no visible effect
:TSUninstall markdown
:TSInstall markdown_inline
# break the highlight again
:TSInstall markdown

I am using both markdown and markdown_highlight because only than I get nice collaring and inline conceiving. Now there is no difference with the built in highlight.

Let me know if you need more debug messages and such, honestly I do not have any idea what to retrieve.

Other parsers seem to work fine.

# checkhealth nvim-treesitter

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

Installation ~
- WARNING `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK `node` found v21.5.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (GCC) 13.2.1 20230801
- 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 = "6.1.69-1-MANJARO",
  sysname = "Linux",
  version = "#1 SMP PREEMPT_DYNAMIC Thu Dec 21 12:29:38 UTC 2023"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - diff                ✓ . . . .
  - json                ✓ ✓ ✓ ✓ .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - make                ✓ . ✓ . ✓
  - markdown_inline     ✓ . . . ✓
  - perl                ✓ . ✓ . ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - vimdoc              ✓ . . . ✓
  - yaml                ✓ ✓ ✓ ✓ ✓

  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} ~

:TSUpdate markdown_inline states all is up to date.

NOTE: I always wondered why there are two separated parsers.

PS: markdown breaks only highlight for language. The code blocks remain nicely highlighted as usual.

from tree-sitter-markdown.

clason avatar clason commented on September 27, 2024 1

What you're seeing is likely due to recent changes in nvim-treesitter. For me it's already working again, but as the message says, pinning nvim-treesitter to an earlier version is a stop gap.

Yes, that. This is a (long announced and documented) breaking change in nvim-treesitter. It has nothing to do with the parser (this repo). Just update your colorscheme or pin nvim-treesitter to v0.9.2.

from tree-sitter-markdown.

MDeiml avatar MDeiml commented on September 27, 2024

I'm not sure I understand the problem. It seems you have two different installations of neovim and they behave differently? Try updating the parsers for both, so run :TSUpdate for both installations.

from tree-sitter-markdown.

kulla avatar kulla commented on September 27, 2024

markdown highlight disappear, same file, so I wanna know this happens to me only or somethings wrong with the plug.

Actually I encountered the same bug. I have the same nvim binary and :TSUpdate does not help (also uninstalling / reinstalling the parser does not help).

from tree-sitter-markdown.

onns avatar onns commented on September 27, 2024

I'm not sure I understand the problem. It seems you have two different installations of neovim and they behave differently? Try updating the parsers for both, so run :TSUpdate for both installations.

same neovim verison, different pc, one update and one not

from tree-sitter-markdown.

onns avatar onns commented on September 27, 2024
image

screenshot means that at commit [f9820b2] the plugin works well, but error at commit [28aa3ba].

so the changes between these two commits cause the bug I think.

from tree-sitter-markdown.

adrian5 avatar adrian5 commented on September 27, 2024

What you're seeing is likely due to recent changes in nvim-treesitter. For me it's already working again, but as the message says, pinning nvim-treesitter to an earlier version is a stop gap.

from tree-sitter-markdown.

MDeiml avatar MDeiml commented on September 27, 2024

Another problem is queries that reference the anonymous node "[x]" specifically. This was changed in recent changes. The default queries from nvim-treestitter should work fine though.

from tree-sitter-markdown.

daviareias avatar daviareias commented on September 27, 2024

Yes can confirm, you need to update your colorscheme or help your colorscheme maintainer to update it, I personally like melange and the maintainer opened an issue mentioning this:
savq/melange-nvim#74

from tree-sitter-markdown.

kulla avatar kulla commented on September 27, 2024

Actually I encountered the same bug. I have the same nvim binary and :TSUpdate does not help (also uninstalling / reinstalling the parser does not help).

For me updating all plugins (:PlugUpdate since I use vim-plug) fixed the bug. Pinning nvim-treesitter was not necessary for me. (I use onedark as a color scheme)

from tree-sitter-markdown.

yujinyuz avatar yujinyuz commented on September 27, 2024

I don't get any error but highlighting seemed to be broken on my end as well. (I use kanagawa theme if that helps)

from tree-sitter-markdown.

ayroblu avatar ayroblu commented on September 27, 2024

Random question, but why is only markdown broken with the treesitter upgrade? None of my other syntaxes have this issue with my colorscheme. Pinning to v0.9.2 fixes the issue I guess

from tree-sitter-markdown.

MDeiml avatar MDeiml commented on September 27, 2024

Probably because markdown uses some captures that are unused in most normal programming languages, like headings.

from tree-sitter-markdown.

clason avatar clason commented on September 27, 2024

Yes. The biggest change in the upgrade applied to the markup-type captures which were completely renamed. Other changes were more moderate, and you probably just didn't notice them. (Nearly all languages were affected one way or another.)

from tree-sitter-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.