Skip to content

SecretOfCode/dart-vim-plugin

 
 

Repository files navigation

Dart Support for Vim

dart-vim-plugin provides filetype detection, syntax highlighting, and indentation for Dart code in Vim.

Looking for auto-complete, diagnostics as you type, jump to definition and other intellisense features? Try dart_language_server and a vim plugin for the Language Server Protocol such as vim-lsc.

Looking for an IDE experience? See the Dart Tools page.

Commands

You can use following vim commands:

:Dart2Js

:DartAnalyzer

:DartFmt

Installation

Install as a typical vim plugin using your favorite approach. If you don't have a preference vim-plug is a good place to start. Below are examples for common choices, be sure to read the docs for each option.

call plug#begin()
"... <snip other plugins>
Plug 'dart-lang/dart-vim-plugin'

call plug#end()

Then invoke :PlugInstall to install the plugin.

Clone the repository into your pathogen directory.

mkdir -p ~/.vim/bundle && cd ~/.vim/bundle && \
git clone https://github.com/dart-lang/dart-vim-plugin

Ensure your .vimrc contains the line execute pathogen#infect()

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"... <snip other plugins>
Plugin 'dart-lang/dart-vim-plugin'

call vundle#end()

Configuration

Enable HTML syntax highlighting inside Dart strings with let dart_html_in_string=v:true (default false).

Disable highlighting of core library classes with let dart_corelib_highlight=v:false (default true).

Enable Dart style guide syntax (like 2-space indentation) with let dart_style_guide = 2

Enable DartFmt execution on buffer save with let dart_format_on_save = 1

About

Syntax highlighting for Dart in Vim

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%