Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textual CSS Tree-sitter grammar/parser #4563

Closed
b4shful opened this issue May 27, 2024 · 1 comment
Closed

Textual CSS Tree-sitter grammar/parser #4563

b4shful opened this issue May 27, 2024 · 1 comment

Comments

@b4shful
Copy link

b4shful commented May 27, 2024

I've seen there is a Textual CSS VSCode Extension based on the TCSS TextMate Grammar.

It would be great if a Tree-sitter grammar was also made available. I am unfamiliar with this so I'm not sure how difficult it would be to create a Tree-sitter grammar from the existing TextMate grammar. It probably wouldn't be as easy as a simple conversion as Tree-sitter creates a full syntax tree, but the documentation is apparently very good.

What I do know is that having a Tree-sitter parser would enable a wide range of editor support, for example getting TCSS in the nvim-treesitter project would allow for syntax highlighting, incremental selection, indentation and folding without having to develop a specific plugin for Neovim (and even then, a lot might be able to be derived from the preexisting CSS and/or SCSS parsers. It also wouldn't require any working with LSP etc. but you still get some of the functionality expected from LSPs.

Tree-sitter is becoming quite popular too, apparently used by Atom (RIP), Emacs, Neovim, Lapce, Zed and Helix. So, while personally I'm interested in Neovim support/integrations, Tree-sitter support benefits a lot of different editors :)

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@Textualize Textualize locked and limited conversation to collaborators May 30, 2024
@darrenburns darrenburns converted this issue into discussion #4574 May 30, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant