Skip to content

Instantly share code, notes, and snippets.

@sgon00
Created December 4, 2018 09:50
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgon00/3e6636f7cafcecb7ed88df9169d8229c to your computer and use it in GitHub Desktop.
Save sgon00/3e6636f7cafcecb7ed88df9169d8229c to your computer and use it in GitHub Desktop.
Put it at `~/.vim/after/syntax/dart.vim` to add/override anything in `~/.vim/bundle/dart-vim-plugin/syntax/dart.vim`.
syn match dartFunction "\zs\(\k\w*\)*\s*\ze("
hi! link dartFunction Function
syn match myCamelCase '\v(<_*\u\i*>)+'
hi! link myCamelCase Type
syntax keyword flutterConstant immutable kAlwaysCompleteAnimation kAlwaysDismissedAnimation
\ kBackMouseButton kBottomNavigationBarHeight kDoubleTapMinTime kDoubleTapSlop kDoubleTapTimeout
\ kDoubleTapTouchSlop kElevationToShadow kFloatingActionButtonMargin kFloatingActionButtonSegue
\ kFloatingActionButtonTurnInterval kForwardMouseButton kHoverTapSlop kHoverTapTimeout kJumpTapTimeout
\ kLongPressTimeout kMaterialListPadding kMaxFlingVelocity kMaxUnsignedSMI kMiddleMouseButton
\ kMinFlingVelocity kNoDefaultValue kPagingTouchSlop kPanSlop kPressTimeout kPrimaryMouseButton
\ kPrimaryStylusButton kRadialReactionAlpha kRadialReactionDuration kRadialReactionRadius kScaleSlop
\ kSecondaryMouseButton kSecondaryStylusButton kTabLabelPadding kTabScrollDuration kTextTabBarHeight
\ kThemeAnimationDuration kThemeChangeDuration kToolbarHeight kTouchSlop kWindowTouchSlop
\ kZoomControlsTimeout mustCallSuper optionalTypeArgs protected required timelineWhitelistArguments
\ visibleForTesting
syntax keyword flutterExceptions FlutterError MissingPluginException PlatformException TickerCanceled
highlight default link flutterConstant Constant
highlight default link flutterExceptions Exception
@ricbermo
Copy link

Hey, thanks for sharing this. I'm starting with Flutter and I don't like the idea of not using *vim. Btw, for every future reader, if you want to use this in Neovim, just place the file in ~/.config/nvim/after/syntax/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment