HAML support doesn't seem to be working correctly
Petercopter opened this issue · 3 comments
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?
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.
👍 looking now 😄
Published!