Skip to content

Develop -> Master #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Jul 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
bfbc10d
Fixed jsFlowTypeObjects not being closed
amadeus Jun 27, 2016
4670d4f
Fix for jsFlowTypeValue
amadeus Jun 28, 2016
583a494
Including jsFlow in other contexts
amadeus Jun 28, 2016
5a69985
Adding bool to jsFlowType
amadeus Jun 28, 2016
ad5d09e
Merge pull request #518 from pangloss/more-flow-fixes
amadeus Jun 28, 2016
4133fca
Linking jsClassDefinition to jsFuncName
amadeus Jun 30, 2016
2f48382
Merge pull request #526 from amadeus/link-jsclassdefinition
amadeus Jun 30, 2016
ac92e1b
Adding do expression support
amadeus Jul 8, 2016
d11bc09
Merge pull request #530 from pangloss/do-expression-support
amadeus Jul 8, 2016
3b8017e
Remove jsOperator from jsClassBlock
jridgewell Jul 11, 2016
6acba74
Merge pull request #531 from jridgewell/patch-1
amadeus Jul 11, 2016
ac813c0
Adding support for oddly placed comments
amadeus Jul 11, 2016
4a6376a
Merge pull request #532 from pangloss/fix-oddly-placed-comments
amadeus Jul 11, 2016
7982ec4
typo
romgrk Jul 13, 2016
2af5f55
Merge pull request #533 from romgrk/patch-1
amadeus Jul 13, 2016
ed40c9c
Tweak highlighting of numeric literals
dmitrivereshchagin Jul 14, 2016
550e1e8
Make use of syntax specific iskeyword setting
dmitrivereshchagin Jul 14, 2016
8cf97bd
Update filetype plugin
dmitrivereshchagin Jul 14, 2016
653858c
Make use of b:undo_indent variable (#542)
dmitrivereshchagin Jul 15, 2016
3072958
Merge pull request #543 from dmitrivereshchagin/update-ftplugin
amadeus Jul 15, 2016
a70cd8d
Merge pull request #541 from dmitrivereshchagin/syntax-iskeyword
amadeus Jul 15, 2016
32e7c78
indentation refactoring (#515)
bounceme Jul 15, 2016
352bcc2
try ..catch (#546)
bounceme Jul 15, 2016
25ff937
Adding some common NodeJS globals
amadeus Jul 15, 2016
68b8596
Merge pull request #547 from pangloss/nodejs-constants
amadeus Jul 15, 2016
08c4fd7
Merge pull request #540 from dmitrivereshchagin/numeric-literals
amadeus Jul 15, 2016
e41dbaa
for 194 (#548)
bounceme Jul 15, 2016
2792e63
switch offset always calculated when inside switch
bounceme Jul 16, 2016
61aea7b
Update javascript.vim
bounceme Jul 16, 2016
aadffc0
Update javascript.vim
bounceme Jul 16, 2016
b884680
possible indent revert(dev branch) (#550)
bounceme Jul 16, 2016
1c9a3dc
undo_indent
bounceme Jul 16, 2016
2efcfa3
Remove 'smartindent' from indent plugin (#551)
dmitrivereshchagin Jul 17, 2016
6f82a0c
Re revert (#554)
bounceme Jul 17, 2016
c2b7c05
JS Flow refactor
amadeus Jul 18, 2016
d745bd0
Merge pull request #556 from pangloss/flow-refactor
amadeus Jul 18, 2016
023f02c
Update javascript.vim
bounceme Jul 18, 2016
e6a4f2f
Update ftplugin (#553)
dmitrivereshchagin Jul 19, 2016
35ac627
Update javascript.vim
bounceme Jul 19, 2016
995007a
Switch (#555)
bounceme Jul 20, 2016
f2b8aeb
Update javascript.vim
bounceme Jul 20, 2016
3089ddd
Merge remote-tracking branch 'origin/switch' into develop
Jul 20, 2016
19b1d4f
Remove unused g:javascript_conceal variable
dmitrivereshchagin Jul 20, 2016
c1d8d37
Add jsFlowReturnMaybe
amadeus Jul 18, 2016
215e957
Fix jsFlowClassDefinitions
amadeus Jul 20, 2016
bd177f3
Merge pull request #562 from pangloss/flow-fixes
amadeus Jul 20, 2016
9677d92
Merge pull request #561 from dmitrivereshchagin/update-syntax
amadeus Jul 20, 2016
125337c
More flow improvements
amadeus Jul 20, 2016
c7dca1b
Merge pull request #564 from pangloss/even-more-flow-fixes
amadeus Jul 20, 2016
1785664
Fixed another maybe case
amadeus Jul 20, 2016
c68ecbe
removing custom formatting (#565)
bounceme Jul 21, 2016
0059286
operators & continuation (#566)
bounceme Jul 21, 2016
31d8b39
switch enhanced (#568)
bounceme Jul 21, 2016
df6c7ef
remove whitespace and regex mistake
bounceme Jul 21, 2016
71c9fc8
negative and decimal switch label values (#569)
bounceme Jul 21, 2016
84e1cc1
cleaning
bounceme Jul 21, 2016
f253975
more cleaning
bounceme Jul 21, 2016
0c3a350
add jsfunccall to not indent args
bounceme Jul 22, 2016
96885ca
small perf gain
bounceme Jul 22, 2016
6c440b3
perf continued
bounceme Jul 22, 2016
b4038a2
addresses unindented code
bounceme Jul 22, 2016
9a6c485
minor refactor
bounceme Jul 22, 2016
e895bd1
fix syn-indent issue
bounceme Jul 22, 2016
ab5d96b
possible reuse of logic (simple lexing) (#570)
bounceme Jul 24, 2016
bf7d4b6
remove switch syn check (#571)
bounceme Jul 24, 2016
ad8d72a
cleaning indent
bounceme Jul 24, 2016
f90b8c8
more cleaning
bounceme Jul 24, 2016
5747057
remove obvious comment
bounceme Jul 25, 2016
506783b
move lines from search pair function
bounceme Jul 25, 2016
acb4f00
fix syn function
bounceme Jul 25, 2016
2905f34
removing mode-line
bounceme Jul 25, 2016
cbcfaaf
adding more operators (#573)
bounceme Jul 26, 2016
d17aee5
Flow tweaks
amadeus Jul 27, 2016
13610e6
Updating indent top comments
amadeus Jul 27, 2016
33833cc
allow for line breaks before blocks (#575)
bounceme Jul 28, 2016
9e2c10e
remove else
bounceme Jul 28, 2016
1d32e38
regex for word boundary
bounceme Jul 28, 2016
6d70fab
fix c-style continuation (#576)
bounceme Jul 28, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions after/ftplugin/javascript.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
" Vim filetype plugin file
" Language: JavaScript
" Maintainer: vim-javascript community
" URL: https://github.com/pangloss/vim-javascript

setlocal iskeyword+=$ suffixesadd+=.js

let b:undo_ftplugin .= ' | setlocal iskeyword< suffixesadd<'
99 changes: 72 additions & 27 deletions extras/flow.vim
Original file line number Diff line number Diff line change
@@ -1,21 +1,48 @@
syntax region jsFlowTypeStatement start=/type/ end=/=/ oneline skipwhite skipempty nextgroup=jsFlowTypeObject
syntax region jsFlowDeclareBlock start=/declare/ end=/[;\n]/ oneline contains=jsFlow,jsFlowDeclareKeyword,jsFlowStorageClass
syntax region jsFlow start=/:/ end=/\%(\%([),=;\n]\|{\%(.*}\)\@!\|\%({.*}\)\@<=\s*{\)\@=\|void\)/ contains=@jsFlowCluster oneline skipwhite skipempty nextgroup=jsFuncBlock
syntax region jsFlowReturn contained start=/:/ end=/\%(\S\s*\%({\%(.*}\)\@!\)\@=\|\n\)/ contains=@jsFlowCluster oneline skipwhite skipempty nextgroup=jsFuncBlock keepend
syntax region jsFlowTypeObject contained start=/{/ end=/}/ contains=jsFlowTypeKey skipwhite skipempty nextgroup=jsFunctionBlock extend
syntax match jsFlowTypeKey contained /\<[0-9a-zA-Z_$?]*\>\(\s*:\)\@=/ skipwhite skipempty nextgroup=jsFlowTypeValue
syntax region jsFlowTypeValue contained matchgroup=jsFlowNoise start=/:/ end=/[,}]/ contains=@jsFlowCluster
syntax region jsFlowObject contained matchgroup=jsFlowNoise start=/{/ end=/}/ oneline contains=@jsFlowCluster
syntax region jsFlowArray contained matchgroup=jsFlowNoise start=/\[/ end=/\]/ oneline contains=@jsFlowCluster
syntax region jsFlowArrow contained matchgroup=jsFlowNoise start=/(/ end=/)\s*=>/ oneline contains=@jsFlowCluster
syntax keyword jsFlowDeclareKeyword contained declare
syntax keyword jsFlowType contained boolean number string null void any mixed JSON array function object Array
syntax match jsFlowClassProperty contained /\<[0-9a-zA-Z_$]*\>:\@=/ skipwhite skipempty nextgroup=jsFlow
syntax region jsFlowDefinition contained start=/:/ end=/\%(\s*[,=;)\n]\)\@=/ contains=@jsFlowCluster containedin=jsParen
syntax region jsFlowArgumentDef contained start=/:/ end=/\%(\s*[,)]\|=>\@!\)\@=/ contains=@jsFlowCluster
syntax region jsFlowArray contained matchgroup=jsFlowNoise start=/\[/ end=/\]/ contains=@jsFlowCluster
syntax region jsFlowObject contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=@jsFlowCluster
syntax region jsFlowParens contained matchgroup=jsFlowNoise start=/(/ end=/)/ contains=@jsFlowCluster
syntax match jsFlowNoise contained /[:;,<>]/
syntax cluster jsFlowCluster contains=jsFlowType,jsFlowArray,jsFlowObject,jsFlowNoise,jsFlowArrow
syntax keyword jsFlowStorageClass contained const var let
syntax region jsFlowParenRegion contained start=/:\s*(/ end=/)\%(\s*:\)\@=/ oneline contains=@jsFlowCluster skipwhite skipempty nextgroup=jsObjectValue
syntax region jsFlowClass contained matchgroup=jsFlowNoise start=/</ end=/>/ oneline contains=@jsFlowCluster skipwhite skipempty nextgroup=jsClassBlock
syntax keyword jsFlowType contained boolean number string null void any mixed JSON array function object array bool class
syntax keyword jsFlowTypeof contained typeof skipempty skipempty nextgroup=jsFlowTypeCustom,jsFlowType
syntax match jsFlowTypeCustom contained /\k*/ skipwhite skipempty nextgroup=jsFlowGroup
syntax region jsFlowGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster
syntax region jsFlowArrowArguments contained matchgroup=jsFlowNoise start=/(/ end=/)\%(\s*=>\)\@=/ oneline skipwhite skipempty nextgroup=jsFlowArrow contains=@jsFlowCluster
syntax match jsFlowArrow contained /=>/ skipwhite skipempty nextgroup=jsFlowType,jsFlowTypeCustom,jsFlowParens
syntax match jsFlowMaybe contained /?/ skipwhite skipempty nextgroup=jsFlowType,jsFlowTypeCustom,jsFlowParens,jsFlowArrowArguments
syntax match jsFlowObjectKey contained /[0-9a-zA-Z_$?]*\(\s*:\)\@=/ contains=jsFunctionKey,jsFlowMaybe skipwhite skipempty nextgroup=jsObjectValue containedin=jsObject
syntax match jsFlowOrOperator contained /|/ skipwhite skipempty nextgroup=@jsFlowCluster

syntax match jsFlowReturn contained /:\s*/ contains=jsFlowNoise skipwhite skipempty nextgroup=@jsFlowReturnCluster
syntax region jsFlowReturnObject contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncBlock,jsFlowReturnOrOp
syntax region jsFlowReturnArray contained matchgroup=jsFlowNoise start=/\[/ end=/\]/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncBlock,jsFlowReturnOrOp
syntax region jsFlowReturnParens contained matchgroup=jsFlowNoise start=/(/ end=/)/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncBlock,jsFlowReturnOrOp
syntax match jsFlowReturnKeyword contained /\k\+/ contains=jsFlowType,jsFlowTypeCustom skipwhite skipempty nextgroup=jsFlowReturnGroup,jsFuncBlock,jsFlowReturnOrOp
syntax match jsFlowReturnMaybe contained /?/ skipwhite skipempty nextgroup=jsFlowReturnKeyword
syntax region jsFlowReturnGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncBlock,jsFlowReturnOrOp
syntax match jsFlowReturnOrOp contained /\s*|\s*/ skipwhite skipempty nextgroup=@jsFlowReturnCluster

syntax region jsFlowFunctionGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncArgs
syntax region jsFlowClassGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsClassBlock

syntax region jsFlowTypeStatement start=/type/ end=/=\@=/ contains=jsFlowTypeOperator oneline skipwhite skipempty nextgroup=jsFlowTypeValue keepend
syntax region jsFlowTypeValue contained start=/=/ end=/[;\n]/ contains=@jsExpression,jsFlowGroup,jsFlowMaybe
syntax match jsFlowTypeOperator contained /=/
syntax keyword jsFlowTypeKeyword contained type

syntax keyword jsFlowDeclare declare skipwhite skipempty nextgroup=jsFlowTypeStatement,jsClassDefinition,jsStorageClass,jsFlowModule,jsFlowInterface
syntax match jsFlowClassProperty contained /\<[0-9a-zA-Z_$]*\>:\@=/ skipwhite skipempty nextgroup=jsFlowClassDef containedin=jsClassBlock
syntax region jsFlowClassDef contained start=/:/ end=/\%(\s*[,=;)\n]\)\@=/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsClassValue

syntax region jsFlowModule contained start=/module/ end=/{\@=/ skipempty skipempty nextgroup=jsFlowDeclareBlock contains=jsString
syntax region jsFlowInterface contained start=/interface/ end=/{\@=/ skipempty skipempty nextgroup=jsFlowInterfaceBlock contains=@jsFlowCluster
syntax region jsFlowDeclareBlock contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=jsFlowDeclare,jsFlowNoise

syntax region jsFlowInterfaceBlock contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsFlowNoise keepend

syntax cluster jsFlowReturnCluster contains=jsFlowNoise,jsFlowReturnObject,jsFlowReturnArray,jsFlowReturnKeyword,jsFlowReturnGroup,jsFlowReturnMaybe,jsFlowReturnOrOp
syntax cluster jsFlowCluster contains=jsFlowArray,jsFlowObject,jsFlowNoise,jsFlowTypeof,jsFlowType,jsFlowGroup,jsFlowArrowArguments,jsFlowMaybe,jsFlowParens,jsFlowOrOperator

if version >= 508 || !exists("did_javascript_syn_inits")
if version < 508
Expand All @@ -24,19 +51,37 @@ if version >= 508 || !exists("did_javascript_syn_inits")
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink jsFlow PreProc
HiLink jsFlowReturn PreProc
HiLink jsFlowDefinition PreProc
HiLink jsFlowClassDef jsFlowDefinition
HiLink jsFlowArgumentDef jsFlowDefinition
HiLink jsFlowType Type
HiLink jsFlowTypeCustom PreProc
HiLink jsFlowTypeof PreProc
HiLink jsFlowArray PreProc
HiLink jsFlowDeclareBlock PreProc
HiLink jsFlowObject PreProc
HiLink jsFlowParenRegion PreProc
HiLink jsFlowClass PreProc
HiLink jsFlowTypeObject PreProc
HiLink jsFlowTypeKey PreProc
HiLink jsFlowTypeValue PreProc
HiLink jsFlowParens PreProc
HiLink jsFlowGroup PreProc
HiLink jsFlowReturn PreProc
HiLink jsFlowReturnObject jsFlowReturn
HiLink jsFlowReturnArray jsFlowArray
HiLink jsFlowReturnParens jsFlowParens
HiLink jsFlowReturnGroup jsFlowGroup
HiLink jsFlowFunctionGroup PreProc
HiLink jsFlowClassGroup PreProc
HiLink jsFlowArrowArguments PreProc
HiLink jsFlowArrow PreProc
HiLink jsFlowTypeStatement PreProc
HiLink jsFlowTypeKeyword PreProc
HiLink jsFlowTypeOperator PreProc
HiLink jsFlowMaybe PreProc
HiLink jsFlowReturnMaybe PreProc
HiLink jsFlowClassProperty jsClassProperty
HiLink jsFlowType Type
HiLink jsFlowDeclareKeyword Type
HiLink jsFlowDeclare PreProc
HiLink jsFlowModule PreProc
HiLink jsFlowInterface PreProc
HiLink jsFlowNoise Noise
HiLink jsFlowObjectKey jsObjectKey
HiLink jsFlowOrOperator PreProc
HiLink jsFlowReturnOrOp jsFlowOrOperator
delcommand HiLink
endif
4 changes: 0 additions & 4 deletions ftplugin/javascript.vim

This file was deleted.

Loading