Skip to content

treesitter: disable highlight for indented code block in markdown #51

@practicalli-johnny

Description

@practicalli-johnny

When indenting text by 4 spaces (or more) in a markdown file, the text is changed to a different color.

This indented color masks any other color that my have been previously applied.

When a fenced code-block is indented, the syntax highlighting of its language is overridden by that of the single indented code color.

Is there a way to disable highlighting when text is indented by 4 or more blank characters?

Investigating

:help treesitter

indented_code_blocks seems to be the treesitter name for the lines of text indented by 4 spaces.

Two possible approaches

  • after/queries/markdown/highlights.scm
  • Through vim.treesitter.query.set().

Treesitter markdown queries

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    Status

    Options

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions