vim-context-commentstring icon indicating copy to clipboard operation
vim-context-commentstring copied to clipboard

plugin not working for JSX/TSX

Open githorse opened this issue 2 years ago • 0 comments

I'm using vim-commentary and just installed this plugin to try to get JSX/TSX commenting working correctly. It seems like this plugin is working fine from the output of echo g:context#commentstring#table:

{'vim': {'vimPythonRegion': '#%s', 'vimLuaRegion': '--%s', 'vimPerlRegion': '#%s'}, 'xhtml': {'cssStyle': '/*%s*/', 'javaScript': '//%s'}, 'javascript.jsx': {'jsComment': '//%s', 'jsxStatment': '//%s', 'jsImport':
 '//%s', 'jsxRegion': '{/*%s*/}', 'jsxTag': '{/*%s*/}'}, 'vue': {'vue_scss': '/*%s*/', 'cssStyle': '/*%s*/', 'javaScript': '//%s'}, 'html': {'cssStyle': '/*%s*/', 'javaScript': '//%s'}, 'typescript.tsx': {'tsImpor
t': '//%s', 'tsxRegion': '{/*%s*/}', 'tsxTag': '{/*%s*/}', 'tsComment': '//%s', 'tsxStatment': '//%s'}, 'typescript.jsx': {'jsComment': '//%s', 'jsxStatment': '//%s', 'jsImport': '//%s', 'jsxRegion': '{/*%s*/}', '
jsxTag': '{/*%s*/}'}}  

But my comments are still // inside the JSX/TSX region:

import React from 'react'

export function Cow() {

   const cow = 'Betsy'

   return (
      // <div>
      //    Cow: {cow}
      // </div>
   )
}

I'm sure this isn't a bug in the plugin, but some config I'm missing. Any idea what I'm doing wrong?

githorse avatar Feb 27 '23 14:02 githorse