JoosepAlviste / nvim-ts-context-commentstring

Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
MIT License
1.18k stars 35 forks source link

Set commentstring for html.handlebars #35

Closed ogirginc closed 2 years ago

ogirginc commented 2 years ago

Is there a way to set commentstring for the html.handlebars file type?

JoosepAlviste commented 2 years ago

Hey @ogirginc, does handlebars have a Treesitter parser? If so, you could probably configure similarly to this:

require'nvim-treesitter.configs'.setup {
  context_commentstring = {
    enable = true,
    config = {
      handlebars = '// %s'
    }
  }
}

How exactly do the injected comments work in handlebars?

JoosepAlviste commented 2 years ago

I'll close this due to inactivity, not sure what the next steps here would be without a treesitter parser.