{"id":13395641,"url":"https://github.com/dart-lang/dart-vim-plugin","last_synced_at":"2025-04-12T19:49:54.281Z","repository":{"id":5296089,"uuid":"6476961","full_name":"dart-lang/dart-vim-plugin","owner":"dart-lang","description":"Syntax highlighting for Dart in Vim","archived":false,"fork":false,"pushed_at":"2024-07-02T21:47:01.000Z","size":2410,"stargazers_count":650,"open_issues_count":9,"forks_count":55,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-04-12T19:49:47.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mrdoob/three.js","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dart-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-31T16:19:31.000Z","updated_at":"2025-04-04T03:59:06.000Z","dependencies_parsed_at":"2024-01-03T01:20:32.808Z","dependency_job_id":"54a1a094-aacb-4130-baa3-1640ba6761d8","html_url":"https://github.com/dart-lang/dart-vim-plugin","commit_stats":{"total_commits":95,"total_committers":29,"mean_commits":"3.2758620689655173","dds":0.7894736842105263,"last_synced_commit":"81e50e80329e5eac2c115f45585b1838a614d07a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fdart-vim-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fdart-vim-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fdart-vim-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-lang%2Fdart-vim-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dart-lang","download_url":"https://codeload.github.com/dart-lang/dart-vim-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625501,"owners_count":21135513,"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","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":[],"created_at":"2024-07-30T18:00:27.040Z","updated_at":"2025-04-12T19:49:54.254Z","avatar_url":"https://github.com/dart-lang.png","language":"Vim Script","readme":"# Dart Support for Vim\n\ndart-vim-plugin provides filetype detection, syntax highlighting, and\nindentation for [Dart][] code in Vim.\n\nLooking for auto-complete, diagnostics as you type, jump to definition and other\nintellisense features? Try a vim plugin for the\n[Language Server Protocol](http://langserver.org/) such as [vim-lsc][]\nconfigured to start the Dart analysis server with the `--lsp` flag.\n\nLooking for an IDE experience? See the [Dart Tools][] page.\n\n[Dart]: https://dart.dev/\n[Dart tools]: https://dart.dev/tools\n[vim-lsc]: https://github.com/natebosch/vim-lsc\n\n## Commands\n\n### :DartFmt\n\n![](https://raw.github.com/dart-lang/dart-vim-plugin/master/DartFmt.gif)\n\n## Installation\n\nInstall as a typical vim plugin using your favorite approach. If you don't have\na preference [vim-plug][] is a good place to start. Below are examples for\ncommon choices, be sure to read the docs for each option.\n\n### [vim-plug][]\n\n[vim-plug]: https://github.com/junegunn/vim-plug\n\n```vimscript\ncall plug#begin()\n\"... \u003csnip other plugins\u003e\nPlug 'dart-lang/dart-vim-plugin'\n\ncall plug#end()\n```\n\nThen invoke `:PlugInstall` to install the plugin.\n\n### [pathogen][]\n\n[pathogen]: https://github.com/tpope/vim-pathogen\n\nClone the repository into your pathogen directory.\n\n```sh\nmkdir -p ~/.vim/bundle \u0026\u0026 cd ~/.vim/bundle \u0026\u0026 \\\ngit clone https://github.com/dart-lang/dart-vim-plugin\n```\n\nEnsure your `.vimrc` contains the line `execute pathogen#infect()`\n\n### [vundle][]\n\n[vundle]: https://github.com/VundleVim/Vundle.vim\n\n```vimscript\nset rtp+=~/.vim/bundle/Vundle.vim\ncall vundle#begin()\n\"... \u003csnip other plugins\u003e\nPlugin 'dart-lang/dart-vim-plugin'\n\ncall vundle#end()\n```\n\n## Configuration\n\nEnable HTML syntax highlighting inside Dart strings with `let\ng:dart_html_in_string = v:true` (default false).\n\nHighlighting for specific syntax groups can be disabled by defining custom\nhighlight group links. See `:help dart-syntax`\n\nEnable Dart style guide syntax (like 2-space indentation) with\n`let g:dart_style_guide = 2`\n\nEnable DartFmt execution on buffer save with `let g:dart_format_on_save = v:true`\n\nConfigure DartFmt options with `let g:dartfmt_options`\n(discover formatter options with `dartfmt -h`)\n\n## FAQ\n\n### Why doesn't the plugin indent identically to `dart format`?\n\nThe indentation capabilities within vim are limited and it's not easy to fully\nexpress the indentation behavior of `dart format`. The major area where this\nplugin differs from `dart format` is indentation of function arguments when\nusing a trailing comma in the argument list. When using a trailing comma (as is\ncommon in flutter widget code) `dart format` uses 2 space indent for argument\nparameters. In all other indentation following an open parenthesis (argument\nlists without a trailing comma, multi-line assert statements, etc) `dart format`\nuses 4 space indent. This plugin uses 4 space indent indent by default. To use 2\nspace indent by default, `let g:dart_trailing_comma_indent = v:true`.\n\n\n### How do I configure an LSP plugin to start the analysis server?\n\nThe Dart SDK comes with an analysis server that can be run in LSP mode. The\nserver ships with the SDK. Assuming the `bin` directory of the SDK is at\n`$DART_SDK` the full command to run the analysis server in LSP mode is\n`$DART_SDK/dart $DART_SDK/snapshots/analysis_server.dart.snapshot --lsp`. If\nyou'll be opening files outside of the `rootUri` sent by your LSP client\n(usually `cwd`) you may want to pass `onlyAnalyzeProjectsWithOpenFiles: true` in\nthe `initializationOptions`. See the documentation for your LSP client for how\nto configure initialization options. If you are using the [vim-lsc][] plugin\nthere is an additional plugin which can configure everything for you at\n[vim-lsc-dart][]. A minimal config for a good default experience using\n[vim-plug][] would look like:\n\n```vimscript\ncall plug#begin()\nPlug 'dart-lang/dart-vim-plugin'\nPlug 'natebosch/vim-lsc'\nPlug 'natebosch/vim-lsc-dart'\ncall plug#end()\n\nlet g:lsc_auto_map = v:true\n```\n\n[vim-lsc-dart]: https://github.com/natebosch/vim-lsc-dart\n","funding_links":[],"categories":["IDEs, Editors, and Plugins","IDE、编辑器、插件","Development-Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-lang%2Fdart-vim-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdart-lang%2Fdart-vim-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-lang%2Fdart-vim-plugin/lists"}