{"id":14981790,"url":"https://github.com/theniceboy/coc-flutter-tools","last_synced_at":"2025-10-02T23:35:33.566Z","repository":{"id":57202008,"uuid":"285583875","full_name":"theniceboy/coc-flutter-tools","owner":"theniceboy","description":"Rich Flutter development experience for (Neo)vim","archived":false,"fork":true,"pushed_at":"2023-05-03T18:23:32.000Z","size":574,"stargazers_count":65,"open_issues_count":8,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-24T20:51:10.686Z","etag":null,"topics":["coc","dart","flutter","neovim","nodejs","nvim"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"iamcco/coc-flutter","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theniceboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-06T13:51:29.000Z","updated_at":"2025-04-07T08:14:55.000Z","dependencies_parsed_at":"2023-01-17T20:47:08.548Z","dependency_job_id":null,"html_url":"https://github.com/theniceboy/coc-flutter-tools","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/theniceboy/coc-flutter-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theniceboy%2Fcoc-flutter-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theniceboy%2Fcoc-flutter-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theniceboy%2Fcoc-flutter-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theniceboy%2Fcoc-flutter-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theniceboy","download_url":"https://codeload.github.com/theniceboy/coc-flutter-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theniceboy%2Fcoc-flutter-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277740230,"owners_count":25868904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coc","dart","flutter","neovim","nodejs","nvim"],"created_at":"2024-09-24T14:04:15.893Z","updated_at":"2025-10-02T23:35:33.206Z","avatar_url":"https://github.com/theniceboy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![](https://flutter.dev/images/favicon.png) coc-flutter-tools\n\nFlutter support for (Neo)vim\n\n![2019-10-07 23-31-40 2019-10-08 00_04_07](https://user-images.githubusercontent.com/5492542/66328510-58a6c480-e95f-11e9-95ca-0b4ed7c8e83f.gif)\n\n## What is this?\n`coc-flutter-tools` is an active fork of [coc-flutter](https://github.com/iamcco/coc-flutter), that fixes bugs and adds new features.\n\nBig thanks to the author of `coc-flutter` [@iamcco](https://github.com/iamcco)\n\nFeatures of this fork:\n- DevTools support\n- Better DevLog Notifications (Notification Filtering)\n- UI Path Display\n- Flutter Outline Panel\n\n![Flutter Outline](https://user-images.githubusercontent.com/8187501/90091803-eca0a400-dd59-11ea-9bee-2401c85ddff9.gif)\n\n\n## Features\n\n\u003e Make sure that you have the Flutter SDK path in the `PATH` environment variable\n- LSP features (power by [analysis_server](https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md))\n  - Auto-completion\n  - Diagnostics\n  - Auto-formatting\n  - Renaming elements\n  - Hovering support\n  - Signature help\n  - Jumping to definitions/implementations/references\n  - Highlighting\n  - Widget trees (flutter outline)\n  - Document symbols\n  - Code actions\n  - [More detail](https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md)\n- Automatic hot reloading on save\n- Automatically run `flutter pub get` on `pubspec.yaml` changes\n- Flutter Dev Server support\n- Snippets (enable with `flutter.provider.enableSnippet`)\n- Device/Emulator List\n- SDK switching\n\n## Installation\n\n`:CocInstall coc-flutter-tools`\n\n\u003e **NOTE**: The [dart-vim-plugin](https://github.com/dart-lang/dart-vim-plugin) plugin is recommended (for filetype detection and syntax highlighting)\n\nMost likely the extension will find your SDK automatically as long as the `flutter` command maps to an SDK location on your system.\n\nIf you are using a version manager like `asdf` that maps the `flutter` command to another binary instead of an SDK location or this extension cannot find your SDK for another reason you'll have to provide the extension with how to find your SDK.\nTo do this there are a few options:\n1. If your version manager supports a `which` command like then you can set the `flutter.sdk.flutter-lookup` config option. Eg. `\"flutter.sdk.flutter-lookup\": \"asdf which flutter\"`.\n2. You can add the path where to find the SDK to the `flutter.sdk.searchPaths` config option.\n   Either specify the exact folder the SDK is installed in or a folder that contains other folders which directly have an SDK in them. *Note that not all of these folders need to have an SDK, if they don't contain one they will simply be ignored*\n3. Set the `flutter.sdk.path` config option to the exact path you want to use for your SDK.\n   If you have also set the `flutter.sdk.searchPaths` then you can use the `FlutterSdks` list (see below) to see what versions you have installed and set the config option for you. **Note that this means that the `flutter.sdk.path` option will be overriden by this list**\n\n\n## coc-list sources\n\n- FlutterSdks\n  \u003e `:CocList FlutterSdks`\n  Shows all the sdks that can be found by using the `searchPaths` config and the `flutter-lookup` config options and allows you to switch between them, either only for your current workspace or globally.\n  Besides those two ways to find sdks it also checks if you are using fvm and if so uses those directories to find your sdk.\n  *You can disable this using the `flutter.fvm.enabled` config option.*\n\n  You can also use this list to see what your current sdk is since it will have `(current)` behind it clearly.\n\t\n- Flutter Devices: `:CocList FlutterDevices`\n- Flutter Emulators: `:CocList FlutterEmulators`\n\n## Settings\n\n- `flutter.enabled` Enables `coc-flutter-tools`, default: `true`\n- `flutter.lsp.initialization.onlyAnalyzeProjectsWithOpenFiles`: default: `true`\n  \u003e When set to true, analysis will only be performed for projects that have open files rather than the root workspace folder.\n- `flutter.lsp.initialization.suggestFromUnimportedLibraries`: default: `true`\n  \u003e When set to false, completion will not include synbols that are not already imported into the current file\n- [`flutter.lsp.initialization.closingLabels`](#closing-labels): default: `true`\n  \u003e When set to true, will display closing labels at end of closing, only neovim support.\n- [`flutter.UIPath`](#ui-path): default: `true`\n  \u003e When set to true, will display the path of the selected UI component on the status bar\n- `flutter.outlineWidth` controls the default width of the flutter outline panel. default: `30`\n- `flutter.outlineIconPadding` controls The number of spaces between the icon and the item text in the outline panel. default: `0`\n- `flutter.sdk.searchPaths` the paths to search for flutter sdks, either directories where flutter is installed or directories which contain directories where flutter versions have been installed\n  eg. `/path/to/flutter` (command at `/path/to/flutter/bin/flutter`) or\n  `~/flutter_versions` (command at `~/flutter_versions/version/bin/flutter`).\n- `flutter.sdk.dart-command` dart command, leave empty should just work, default: `''`\n- `flutter.sdk.dart-lookup` **only use this if you don't have a flutter installation but only dart** command to find dart executable location, used to infer dart-sdk location, default: `''`\n- `flutter.sdk.flutter-lookup` command to find flutter executable location, used to infer location of dart-sdk in flutter cache: `''`\n- `flutter.provider.hot-reload` Enable hot reload after save, default: `true`\n  \u003e only when there are no errors for the save file\n- `flutter.provider.enableSnippet` Enable completion item snippet, default: true\n  - `import '';` =\u003e `import '${1}';${0}`\n  - `someName(…)` =\u003e `someName(${1})${0}`\n  - `setState(() {});` =\u003e `setState(() {\\n\\t${1}\\n});${0}`\n- `flutter.openDevLogSplitCommand` Vim command to open dev log window, like: `botright 10split`, default: ''\n- `flutter.workspaceFolder.ignore` Path start within the list will not treat as workspaceFolder, default: []\n  - also flutter sdk will not treat as workspaceFolder, more detail issues [50](https://github.com/iamcco/coc-flutter/issues/50)\n- `flutter.runDevToolsAtStartup` Automatically open devtools debugger web page when a project is run, default: false\n- `flutter.autoOpenDevLog` Automatically open the dev log after calling flutter run, default: false\n- `flutter.autoHideDevLog` Automatically hide the dev log when the app stops running, default: false\n\n\n**Enable format on save**:\n\nIf you have [dart-vim-plugin](https://github.com/dart-lang/dart-vim-plugin) install, put this in your vimrc:\n```vim\nlet g:dart_format_on_save = 1\n```\n\nAlternatively, you may use coc-settings.\n\n```jsonc\n\"coc.preferences.formatOnSaveFiletypes\": [\n  \"dart\"\n],\n```\n\n## Code Actions\n\n`coc.nvim` provides code actions. To enable them, add the following configuration in your vimrc\n\u003e this can also be found in `coc.nvim` README\n\n``` vim\nxmap \u003cleader\u003ea  \u003cPlug\u003e(coc-codeaction-selected)\nnmap \u003cleader\u003ea  \u003cPlug\u003e(coc-codeaction-selected)\n```\n\nTo show code actions on selected areas:\n\n- `\u003cleader\u003eaap` for current paragraph, `\u003cleader\u003eaw` for the current word\n\nThen you will see a list of code actions:\n\n- Wrap with Widget\n- Wrap with Center\n- etc\n\n## Commands\n\nGet a list of flutter related commands: `CocList --input=flutter commands`\n\n**Global Commands**:\n\n- `flutter.run` Run flutter dev server\n- `flutter.attach` Attach running application\n- `flutter.create` Create flutter project using: `flutter create`\n- `flutter.doctor` Run: `flutter doctor`\n- `flutter.upgrade` Run: `flutter upgrade`\n- `flutter.pub.get` Run: `flutter pub get`\n- `flutter.devices` open devices list\n- `flutter.emulators` open emulators list\n- `flutter.outline` opens up an instance of the flutter outline side-panel\n- `flutter.toggleOutline` toggles the flutter outline side-panel\n\n**LSP Commands**\n\n- `flutter.gotoSuper` jump to the location of the super definition of the class or method\n\n**Dev Server Commands**:\n\n\u003e These commands will only be available when the Flutter Dev Server is running (i.e after you run `flutter run`)\n\n- `flutter.dev.quit` Quit server\n- `flutter.dev.detach` Detach server\n- `flutter.dev.hotReload` Hot reload\n- `flutter.dev.hotRestart` Hot restart\n- `flutter.dev.screenshot` To save a screenshot to flutter.png\n- `flutter.dev.openDevLog` Open flutter dev server log\n- `flutter.dev.clearDevLog` Clear the flutter dev server log\n- `flutter.dev.debugDumpAPP` You can dump the widget hierarchy of the app (debugDumpApp)\n- `flutter.dev.elevationChecker` To toggle the elevation checker\n- `flutter.dev.debugDumpLayerTree` For layers (debugDumpLayerTree)\n- `flutter.dev.debugDumpRenderTree` To dump the rendering tree of the app (debugDumpRenderTree)\n- `flutter.dev.openDevToolsProfiler` Open the [DevTools](https://flutter.dev/docs/development/tools/devtools/overview) in the browser\n- `flutter.dev.debugPaintSizeEnabled` To toggle the display of construction lines (debugPaintSizeEnabled)\n- `flutter.dev.defaultTargetPlatform` To simulate different operating systems, (defaultTargetPlatform)\n- `flutter.dev.showPerformanceOverlay` To display the performance overlay (WidgetsApp.showPerformanceOverlay)\n- `flutter.dev.debugProfileWidgetBuilds` To enable timeline events for all widget build methods, (debugProfileWidgetBuilds)\n- `flutter.dev.showWidgetInspectorOverride` To toggle the widget inspector (WidgetsApp.showWidgetInspectorOverride)\n- `flutter.dev.debugDumpSemanticsHitTestOrder` Accessibility (debugDumpSemantics) for inverse hit test order\n- `flutter.dev.debugDumpSemanticsTraversalOrder` Accessibility (debugDumpSemantics) for traversal order\n\n### Closing Labels\n\nwhen `flutter.lsp.initialization.closingLabels` is set to `true`,\nthe closing labels will be display at end of closing.\n\n\u003e this feature only support neovim since vim do not support virtual text\n\n| disabled                                                                                                                         | enabled                                                                                                                          |\n| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| \u003cimg height=\"300px\" src=\"https://user-images.githubusercontent.com/5492542/67616073-f0812b00-f806-11e9-8e5c-ac42ab3a293c.png\" /\u003e | \u003cimg height=\"300px\" src=\"https://user-images.githubusercontent.com/5492542/67616063-c16ab980-f806-11e9-8522-1c89217096e0.png\" /\u003e |\n\n\n### UI Path\nwhen `flutter.UIPath` is set to `true`, the path for the UI component under cursor will be shown on the status bar.\n![Screen Shot 2020-08-09 at 6 25 10 PM](https://user-images.githubusercontent.com/8187501/89730211-575a9280-da6f-11ea-9ad1-73770c1840db.png)\n\n### Flutter Outline\nIn the Flutter Outline panel, press `enter` to goto the corresponding location in the source file.\n\n\u003ccenter\u003e\u003ca href=\"https://instaboard.page/gh-sponsor\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/8187501/232345609-366fd597-8a32-4667-9e80-2487ebe6f7f6.png\" alt=\"Sponsored by Instaboard\"\u003e\u003c/img\u003e\u003c/a\u003e\u003c/center\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheniceboy%2Fcoc-flutter-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheniceboy%2Fcoc-flutter-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheniceboy%2Fcoc-flutter-tools/lists"}