mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-02-27 15:38:40 +08:00
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:
parent
a05185584d
commit
2504a3d84e
@ -237,6 +237,7 @@ let s:delimiterMap = {
|
|||||||
\ 'java': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'java': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'javacc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'javacc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'javascript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'javascript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
|
\ 'javascriptreact': { 'left': '//', 'leftAlt': '{/*', 'rightAlt': '*/}' },
|
||||||
\ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'javascript.jquery': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'jess': { 'left': ';' },
|
\ 'jess': { 'left': ';' },
|
||||||
\ 'jgraph': { 'left': '(*', 'right': '*)' },
|
\ 'jgraph': { 'left': '(*', 'right': '*)' },
|
||||||
@ -451,6 +452,7 @@ let s:delimiterMap = {
|
|||||||
\ 'twig': { 'left': '{#', 'right': '#}' },
|
\ 'twig': { 'left': '{#', 'right': '#}' },
|
||||||
\ 'txt2tags': { 'left': '%' },
|
\ 'txt2tags': { 'left': '%' },
|
||||||
\ 'typescript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'typescript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
|
\ 'typescriptreact': { 'left': '//', 'leftAlt': '{/*', 'rightAlt': '*/}' },
|
||||||
\ 'uc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'uc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'uil': { 'left': '!' },
|
\ 'uil': { 'left': '!' },
|
||||||
\ 'upstart': { 'left': '#' },
|
\ 'upstart': { 'left': '#' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user