mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
commit
4cedc8444e
@ -791,7 +791,10 @@ au BufNewFile,BufRead *.java,*.jav setf java
|
|||||||
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
||||||
|
|
||||||
" JavaScript, ECMAScript
|
" JavaScript, ECMAScript
|
||||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.mjs setf javascript
|
au BufNewFile,BufRead *.js,*.javascript,*.es,*.mjs setf javascript
|
||||||
|
|
||||||
|
" JavaScript with React
|
||||||
|
au BufNewFile,BufRead *.jsx setf javascriptreact
|
||||||
|
|
||||||
" Java Server Pages
|
" Java Server Pages
|
||||||
au BufNewFile,BufRead *.jsp setf jsp
|
au BufNewFile,BufRead *.jsp setf jsp
|
||||||
@ -1705,6 +1708,9 @@ au BufNewFile,BufReadPost *.twig setf twig
|
|||||||
" Typescript
|
" Typescript
|
||||||
au BufNewFile,BufReadPost *.ts setf typescript
|
au BufNewFile,BufReadPost *.ts setf typescript
|
||||||
|
|
||||||
|
" TypeScript with React
|
||||||
|
au BufNewFile,BufRead *.tsx setf typescriptreact
|
||||||
|
|
||||||
" Motif UIT/UIL files
|
" Motif UIT/UIL files
|
||||||
au BufNewFile,BufRead *.uit,*.uil setf uil
|
au BufNewFile,BufRead *.uit,*.uil setf uil
|
||||||
|
|
||||||
|
2
runtime/ftplugin/javascriptreact.vim
Normal file
2
runtime/ftplugin/javascriptreact.vim
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
" Placeholder for backwards compatilibity: .jsx used to stand for JavaScript.
|
||||||
|
source %:h/javascript.vim
|
2
runtime/indent/javascriptreact.vim
Normal file
2
runtime/indent/javascriptreact.vim
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
" Placeholder for backwards compatilibity: .jsx used to stand for JavaScript.
|
||||||
|
source %:h/javascript.vim
|
2
runtime/syntax/javascriptreact.vim
Normal file
2
runtime/syntax/javascriptreact.vim
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
" Placeholder for backwards compatilibity: .jsx used to stand for JavaScript.
|
||||||
|
source %:h/javascript.vim
|
@ -221,7 +221,8 @@ 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.jsx', 'file.mjs'],
|
\ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs'],
|
||||||
|
\ 'javascriptreact': ['file.jsx'],
|
||||||
\ 'jess': ['file.clp'],
|
\ 'jess': ['file.clp'],
|
||||||
\ 'jgraph': ['file.jgr'],
|
\ 'jgraph': ['file.jgr'],
|
||||||
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
|
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
|
||||||
@ -454,6 +455,7 @@ let s:filename_checks = {
|
|||||||
\ 'tssop': ['file.tssop'],
|
\ 'tssop': ['file.tssop'],
|
||||||
\ 'twig': ['file.twig'],
|
\ 'twig': ['file.twig'],
|
||||||
\ 'typescript': ['file.ts'],
|
\ 'typescript': ['file.ts'],
|
||||||
|
\ 'typescriptreact': ['file.tsx'],
|
||||||
\ 'uc': ['file.uc'],
|
\ 'uc': ['file.uc'],
|
||||||
\ 'udevconf': ['/etc/udev/udev.conf'],
|
\ 'udevconf': ['/etc/udev/udev.conf'],
|
||||||
\ 'udevperm': ['/etc/udev/permissions.d/file.permissions'],
|
\ 'udevperm': ['/etc/udev/permissions.d/file.permissions'],
|
||||||
@ -608,5 +610,5 @@ endfunc
|
|||||||
|
|
||||||
func Test_setfiletype_completion()
|
func Test_setfiletype_completion()
|
||||||
call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
|
call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||||
call assert_equal('"setfiletype java javacc javascript', @:)
|
call assert_equal('"setfiletype java javacc javascript javascriptreact', @:)
|
||||||
endfunc
|
endfunc
|
||||||
|
@ -389,7 +389,7 @@ endfunc
|
|||||||
|
|
||||||
func Test_ownsyntax_completion()
|
func Test_ownsyntax_completion()
|
||||||
call feedkeys(":ownsyntax java\<C-A>\<C-B>\"\<CR>", 'tx')
|
call feedkeys(":ownsyntax java\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||||
call assert_equal('"ownsyntax java javacc javascript', @:)
|
call assert_equal('"ownsyntax java javacc javascript javascriptreact', @:)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_highlight_invalid_arg()
|
func Test_highlight_invalid_arg()
|
||||||
|
Loading…
Reference in New Issue
Block a user