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

Custom comment in react jsx #70

Open
phuongthuan opened this issue Oct 1, 2021 · 0 comments
Open

Custom comment in react jsx #70

phuongthuan opened this issue Oct 1, 2021 · 0 comments

Comments

@phuongthuan
Copy link

kommentary support jsx comment by default but I still want to custom my comment like below:

// Single line
{/* <p>Single line comment</p> */}

// Multiple lines
{/* This is 
    for multi-line comments. */}

Here is my config:

-----------------------------------------------------------
-- Comment for vim
-----------------------------------------------------------

local kommentary_config = require('kommentary.config')

-- Plugin: kommentary
--- https://github.com/b3nj5m1n/kommentary

local M = {}

function M.setup()
  kommentary_config.configure_language('default', {
    single_line_comment_string  = 'auto',
    prefer_single_line_comments = true,
    multi_line_comment_strings  = false,
  })
  kommentary_config.configure_language('typescriptreact', {
    single_line_comment_string  = '{/*", "*/}',
    multi_line_comment_strings = {"{/*", "*/}"},
    prefer_single_line_comments = true,
  })
  kommentary_config.configure_language('javascriptreact', {
    single_line_comment_string  = '{/*", "*/}',
    multi_line_comment_strings = {"{/*", "*/}"},
    prefer_single_line_comments = true,
  })
end

return M

Is anything wrong with my config? It did not work as I expected.

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