Skip to content
flutter support for (Neo)vim
TypeScript JavaScript
Branch: master
Clone or download

Latest commit

dependabot chore(deps): bump acorn from 6.3.0 to 6.4.1 (#30)
Bumps [acorn]( from 6.3.0 to 6.4.1.
- [Release notes](
- [Commits](acornjs/acorn@6.3.0...6.4.1)

Signed-off-by: dependabot[bot] <>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]>
Latest commit 766afbd Mar 15, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update issue templates Feb 1, 2020
.vim fix(workspace): add rootPatterns for finding workspace closes #16 Jan 3, 2020
src feat(activationEvents): update activationEvents Feb 4, 2020
.editorconfig feat(package): init Oct 7, 2019
.eslintrc.js chore(project): add eslint and hook Oct 27, 2019
.gitignore feat(package): init Oct 7, 2019
.npmignore feat(package): init Oct 7, 2019
.prettierrc.js chore(project): add eslint and hook Oct 27, 2019 Accept custom commands to discover flutter and dart location (#17) Jan 14, 2020
package.json feat(activationEvents): update activationEvents Feb 4, 2020
tsconfig.json feat(package): init Oct 7, 2019
webpack.config.js chore(package): use production webpack config Oct 27, 2019
yarn.lock chore(deps): bump acorn from 6.3.0 to 6.4.1 (#30) Mar 15, 2020


Flutter support for (Neo)vim

2019-10-07 23-31-40 2019-10-08 00_04_07


  • LSP features is power by analysis_server
    • autocomplete
    • diagnostics
    • format
    • rename
    • hover document
    • signature help
    • go to definition
    • go to implementation
    • go to references
    • document highlight
    • document symbol
    • code actions
    • more detail

      need flutter sdk and add to PATH environment

  • Automatically finds SDKs from PATH
  • Automatic hot reloads on save
  • Automatically run flutter pub get when pubspec.yaml change
  • Support flutter dev server
  • Snippet enhance flutter.provider.enableSnippet
  • Devices List
  • Emulators List


:CocInstall coc-flutter

coc-list sources

  • FlutterDevices

    :CocList FlutterDevices

  • FlutterEmulators

    :CocList FlutterEmulators


  • flutter.trace.server Trace level of log, default: off
  • flutter.enabled Enable coc-flutter extension, default: true
  • flutter.lsp.debug Enable debug for language server, default: false
  • flutter.lsp.initialization.onlyAnalyzeProjectsWithOpenFiles: defalut: false

    When set to true, analysis will only be performed for projects that have open files rather than the root workspace folder.

  • flutter.lsp.initialization.suggestFromUnimportedLibraries: defalut: true

    When set to false, completion will not include synbols that are not already imported into the current file

  • flutter.lsp.initialization.closingLabels: defalut: true

    When set to true, will display closing labels at end of closing, only neovim support.

  • flutter.sdk.dart-command dart command, leave empty should just work, default: ''
  • flutter.sdk.dart-lookup command to find dart executable location, used to infer dart-sdk location, default: ''
  • flutter.sdk.flutter-lookup command to find flutter executable location, used to infer location of dart-sdk in flutter cache: ''
  • Enable hot reload after save, default: true

    only when there are no errors for the save file

  • flutter.provider.enableSnippet Enable completion item snippet, default: true
    • import ''; => import '${1}';${0}
    • someName(…) => someName(${1})${0}
    • setState(() {}); => setState(() {\n\t${1}\n});${0}

Enable format on save:

"coc.preferences.formatOnSaveFiletypes": [


Open flutter only commands list: CocList --input=flutter commands

Global Commands:

  • Run flutter dev server
  • flutter.create Create flutter project using: flutter create
  • Run: flutter doctor
  • flutter.upgrade Run: flutter upgrade
  • Run: flutter pub get
  • flutter.devices open devices list
  • flutter.emulators open emulators list

LSP Commands

  • flutter.gotoSuper jump to the location of the super definition of the class or method

Dev Server Commands:

available when dev server running

  • Quit server
  • Detach server
  • Hot reload
  • Hot restart
  • To save a screenshot to flutter.png
  • Open flutter dev server log
  • Open observatory debugger and profiler web page
  • You can dump the widget hierarchy of the app (debugDumpApp)
  • To toggle the elevation checker
  • For layers (debugDumpLayerTree)
  • To dump the rendering tree of the app (debugDumpRenderTree)
  • To toggle the display of construction lines (debugPaintSizeEnabled)
  • To simulate different operating systems, (defaultTargetPlatform)
  • To display the performance overlay (WidgetsApp.showPerformanceOverlay)
  • To enable timeline events for all widget build methods, (debugProfileWidgetBuilds)
  • To toggle the widget inspector (WidgetsApp.showWidgetInspectorOverride)
  • Accessibility (debugDumpSemantics) for inverse hit test order
  • Accessibility (debugDumpSemantics) for traversal order

Closing Labels

when flutter.lsp.initialization.closingLabels is true, the closing labels will be display at end of closing.

this feature only support neovim since vim do not support virtual text

disabled enabled

Buy Me A Coffee ☕️



You can’t perform that action at this time.