mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.1.2345: .cjs files are not recognized as Javascript
Problem: .cjs files are not recognized as Javascript. Solution: Add the *.cjs pattern. (closes #5268)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2019 Nov 01
|
" Last Change: 2019 Nov 26
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
@@ -800,8 +800,8 @@ au BufNewFile,BufRead *.java,*.jav setf java
|
|||||||
" JavaCC
|
" JavaCC
|
||||||
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
||||||
|
|
||||||
" JavaScript, ECMAScript
|
" JavaScript, ECMAScript, ES module script, CommonJS script
|
||||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.mjs setf javascript
|
au BufNewFile,BufRead *.js,*.javascript,*.es,*.mjs,*.cjs setf javascript
|
||||||
|
|
||||||
" JavaScript with React
|
" JavaScript with React
|
||||||
au BufNewFile,BufRead *.jsx setf javascriptreact
|
au BufNewFile,BufRead *.jsx setf javascriptreact
|
||||||
|
@@ -223,7 +223,7 @@ let s:filename_checks = {
|
|||||||
\ 'jam': ['file.jpl', 'file.jpr'],
|
\ 'jam': ['file.jpl', 'file.jpr'],
|
||||||
\ 'java': ['file.java', 'file.jav'],
|
\ 'java': ['file.java', 'file.jav'],
|
||||||
\ 'javacc': ['file.jj', 'file.jjt'],
|
\ 'javacc': ['file.jj', 'file.jjt'],
|
||||||
\ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs'],
|
\ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
|
||||||
\ 'javascriptreact': ['file.jsx'],
|
\ 'javascriptreact': ['file.jsx'],
|
||||||
\ 'jess': ['file.clp'],
|
\ 'jess': ['file.clp'],
|
||||||
\ 'jgraph': ['file.jgr'],
|
\ 'jgraph': ['file.jgr'],
|
||||||
|
@@ -737,6 +737,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2345,
|
||||||
/**/
|
/**/
|
||||||
2344,
|
2344,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user