Skip to content

HAML support doesn't seem to be working correctly #45

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

Closed
Petercopter opened this issue Aug 2, 2022 · 3 comments
Closed

HAML support doesn't seem to be working correctly #45

Petercopter opened this issue Aug 2, 2022 · 3 comments

Comments

@Petercopter
Copy link
Contributor

I think I've got things setup correctly for HAML formatting. I've got both syntax_tree and syntax_tree-haml installed, and I've got the VSCode extension setup with HAML as a plugin.

I'm seeing this in the output, so it looks like things are running:

Starting language server: bundle exec stree lsp --plugins=plugin/single_quotes,haml --print-width=80

However I'm not seeing HAML being reformatted on save, and when I try to Format Document from the command palette I see

There is no formatter for 'haml' files installed.

I saw this: #39

So it seems like maybe syntax_tree needs to register as a HAML formatter?

@kddnewton
Copy link
Member

Yeah, it definitely needs to. It only activates itself on ruby files at the moment. This is a really good one if you're looking for a contribution!

It would involve adding an activation event here: https://github.com/ruby-syntax-tree/vscode-syntax-tree/blob/main/package.json#L21.

It would also involve changing syntax tree to look up the right handler here: https://github.com/ruby-syntax-tree/syntax_tree/blob/main/lib/syntax_tree/language_server.rb#L101.

@Petercopter
Copy link
Contributor Author

Petercopter commented Aug 3, 2022

👍 looking now 😄

@kddnewton
Copy link
Member

Published!

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

No branches or pull requests

2 participants