Add comment styles for React filetypes .jsx/.tsx (#393)

Note that to-date there has not been an official vim filetype for
React-Javascript and React-Typescript. The `javascriptreact` and
`typescriptreact` filetypes were added upstream to both Vim (8.1.1890)
and NeoVim during the course of discussion on this PR.

Some other Vim plugins are known to use filetype hacks such as
`javascript.jsx` or `typescript.jsx`. This plugin supports the now
official upstream designations. If this conflicts with your usage you
can either tweak the other plugins (and/or submit a fix to use the
official filetypes upstream) or add custom file type comment setting in
your vim rc/init file.

Co-Authored-By: Caleb Maclennan <caleb@alerque.com>
This commit is contained in:
impulse 2019-08-27 12:58:11 +02:00 committed by Caleb Maclennan
parent a05185584d
commit 2504a3d84e

View File

@ -237,6 +237,7 @@ let s:delimiterMap = {
\ 'java': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'javacc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'javascript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'javascriptreact': { 'left': '//', 'leftAlt': '{/*', 'rightAlt': '*/}' },
\ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'jess': { 'left': ';' },
\ 'jgraph': { 'left': '(*', 'right': '*)' },
@ -451,6 +452,7 @@ let s:delimiterMap = {
\ 'twig': { 'left': '{#', 'right': '#}' },
\ 'txt2tags': { 'left': '%' },
\ 'typescript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'typescriptreact': { 'left': '//', 'leftAlt': '{/*', 'rightAlt': '*/}' },
\ 'uc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'uil': { 'left': '!' },
\ 'upstart': { 'left': '#' },