juftin / browsr

🗂️ a pleasant file explorer in your terminal supporting all filesystems
http://juftin.com/browsr/
MIT License
225 stars 13 forks source link

Mark xsh and xonshrc as Python for xonsh shell minimal support #46

Closed anki-code closed 4 months ago

anki-code commented 4 months ago

Please mark *.xsh and *.xonshrc as Python for syntax highlighting of xonsh shell scripts.

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

juftin commented 4 months ago

Textual currently leverages pygments (pygments.gues_lexer) (browsr -> textual -> rich -> pygments) to handle syntax highlighting - the best way to gain this support would be to add the feature upstream. I think adding a shebang might also handle this.

juftin commented 4 months ago

Hopefully soon, I'll be replacing pygments with tree-sitter for syntax highlighting. I'll make sure these extensions are handled then inside of browsr.