Skip to content

Add optional tree-sitter highlighting - #22

Closed
willfish wants to merge 2 commits into
sotte:mainfrom
willfish:treesitter-syntax-highlighting
Closed

Add optional tree-sitter highlighting#22
willfish wants to merge 2 commits into
sotte:mainfrom
willfish:treesitter-syntax-highlighting

Conversation

@willfish

@willfish willfish commented Jul 6, 2026

Copy link
Copy Markdown

📃 Summary

Adds an optional syntax_highlighting config for slide buffers.

When enabled, presenting.nvim starts tree-sitter highlighting after rendering each slide. For markdown presentations this lets tree-sitter injections highlight fenced code blocks when the user has the relevant parsers installed.

Example config:

require("presenting").setup({
  syntax_highlighting = {
    enabled = true,
    parser = "markdown",
  },
})

For markdown fenced code blocks, users need the markdown and markdown_inline parsers, plus parsers for the code block languages they use, such as lua, ruby, bash, or sql.

📸 Preview

image

📝 Checklist

  • I ran make all locally and checked for errors.
  • I have updated the CHANGELOG.md file.

@willfish
willfish force-pushed the treesitter-syntax-highlighting branch from c90bd73 to 1a2844d Compare July 6, 2026 10:50
@willfish
willfish marked this pull request as ready for review July 6, 2026 10:50
@willfish
willfish requested a review from sotte as a code owner July 6, 2026 10:50
@sotte

sotte commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Thanks for the pr!

I have to check this. I have proper syntax hl without doing anything.

@sotte

sotte commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Just checked by presenting the README.md. Without any config changes and without your PR I get syntax hl.

image

Is this not working for you?

@willfish

willfish commented Jul 8, 2026

Copy link
Copy Markdown
Author

Interesting! I'll look into it but this wasn't working for me @sotte

@willfish

willfish commented Jul 8, 2026

Copy link
Copy Markdown
Author

Also appreciate you having a gander at this and thanks for putting this project together - I've used it for years/it makes giving training and presentations much more comfortable for me

@sotte

sotte commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Appreciate the kind words!

If you turn this into a non breaking change, I'll merge it. No harm :)

@willfish

Copy link
Copy Markdown
Author

Closing as I think this is a my config issue

@willfish willfish closed this Jul 29, 2026
@willfish
willfish deleted the treesitter-syntax-highlighting branch July 29, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants