tpope / vim-markdown

Vim Markdown runtime files
1.22k stars 191 forks source link

markdownCodeBlock style #188

Closed jxu closed 2 years ago

jxu commented 2 years ago

I put the most recent version of the syntax file in my ~/.vim/syntax/. Why does inline code have coloring but not code blocks?

tpope commented 2 years ago

Neither has coloring by default. Only the backticks themselves do.

jxu commented 2 years ago

What is the design rationale for this? Shouldn't code portions be highlighted?

tpope commented 2 years ago
  1. Some code blocks (triple backtick ones to be specific) can have syntax highlighting, and those look uglier when you stack a base color on top of them.
  2. Detecting indented code is impossible to do 100% reliably, and highlighting it would only draw attention to when it gets it wrong.
jxu commented 2 years ago

Is indented code not just four spaces on a newline? Also I haven't seen syntax highlighting in my fenced code blocks so maybe I need some other plugin for that.

tpope commented 2 years ago

Is indented code not just four spaces on a newline?

Not when bulleted lists are involved. The current implementation erroneously detects some nested lists as code blocks.

Also I haven't seen syntax highlighting in my fenced code blocks so maybe I need some other plugin for that.

See the README.