Skip to content
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

Block comments should use {{!-- -}} (long form) by default and let a linter decide if characters can be removed. #125

Open
NullVoxPopuli opened this issue Feb 11, 2024 · 0 comments

Comments

@NullVoxPopuli
Copy link
Member

I've found myself using this config for having an easier time commenting code:

  use { 'b3nj5m1n/kommentary', config = function()
    local config = require('kommentary.config')

    config.configure_language('default', {
      single_line_comment_string = 'auto',
      multi_line_comment_strings = 'auto',
      hook_function = function()
        require('ts_context_commentstring').update_commentstring()
      end,
    })

    config.configure_language("typescript.glimmer", {
      multi_line_comment_strings = { "{{!--", "--}}" },
    })
    config.configure_language("javascript.glimmer", {
      multi_line_comment_strings = { "{{!--", "--}}" },
    })
    config.configure_language("glimmer", {
      multi_line_comment_strings = { "{{!--", "--}}" },
    })
    config.configure_language("handlebars", {
      multi_line_comment_strings = { "{{!--", "--}}" },
    })
  end }

the default comment, {{! }} is insufficient for most cases, especially if what you want comment contains a double-curlie

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

1 participant