mistricky / codesnap.nvim

📸 Snapshot plugin with rich features that can make pretty code snapshots for Neovim
MIT License
473 stars 15 forks source link

[Fix] auto detect content which should use source syntax #86

Closed mistricky closed 2 months ago

mistricky commented 2 months ago

The syntect distinguishes between LANGUAGE NAME and LANGUAGE NAME Source as two completely different language syntax highlights, this PR change the strategy of how to detect what language syntax highlight should use.

If the content not contains <?php, that indicate this file is a PHP source segment, should use "PHP Source" rather than "PHP"