988
Markdown everywhere (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] WorldieBoi@lemmy.world 67 points 1 year ago
[-] bananaw@sh.itjust.works 12 points 1 year ago

I've been having trouble getting syntax highlighting to work on my '```' fenced code blocks. I give it the right/supported language identifier, but nothing changes.

I'm using neovim with a bunch of lsp plugins and treesitter. Anyone have dotfiles with markdown code syntax highlighting working?

[-] naught@sh.itjust.works 6 points 1 year ago* (last edited 1 year ago)

Are u using Mason and LSPconfig?

edit: Oh, I don't know that getting syntax highlighting in the blocks is something i've seen

[-] ocelot@lemmy.sdf.org 2 points 1 year ago* (last edited 1 year ago)

Have you installed the treeesitter grammars for those languages with :TSInstall language_name or in your treesitter config?

[-] Slotos@feddit.nl 2 points 1 year ago

This is pretty much all that’s needed. The language in the block is identified via a name that follows the opening triple backtick. E.g.:

```python some carefully indented code ```

[-] Haus@kbin.social 3 points 1 year ago

I'd go PostScript, since it's Turing-complete.

this post was submitted on 12 Sep 2023
988 points (97.8% liked)

Programmer Humor

19503 readers
403 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS