This adds a --upgrade option to install_gadget.py and makes VimspectorUpdate only update things which have changed. To do this, we record the gadget spec in a manfiest file and compare it with the current spec when in upgrade mode. 'Changed' in this case means that the gadget spec has changed from the last time the installer was run. It does _not_ actually check the presence of the gadget.
21 lines
605 B
VimL
21 lines
605 B
VimL
if exists( 'b:current_syntax' )
|
|
finish
|
|
endif
|
|
|
|
let b:current_syntax = 'vimspector-installer'
|
|
|
|
syn match VimspectorGadget /[^ ]*\ze@/
|
|
syn match VimspectorGadgetVersion /@\@<=[^ ]*\ze\.\.\./
|
|
|
|
|
|
syn keyword VimspectorInstalling Installing
|
|
syn keyword VimspectorDone Done
|
|
syn keyword VimspectorSkip Skip
|
|
syn keyword VimspectorError Failed FAILED
|
|
|
|
hi default link VimspectorInstalling Constant
|
|
hi default link VimspectorDone DiffAdd
|
|
hi default link VimspectorSkip DiffAdd
|
|
hi default link VimspectorError WarningMsg
|
|
hi default link VimspectorGadget String
|
|
hi default link VimspectorGadgetVersion Identifier
|