-
-
Notifications
You must be signed in to change notification settings - Fork 2
Windows
Brady Trainor edited this page Dec 13, 2018
·
4 revisions
There seems to be a number of issues for dart-mode in Windows. These are notes on setting up dart-mode in Windows, for the purposes of testing.
Currently we install with chocolatey.
choco install emacs dart-sdk diffutils git
cd $env:appdata/.emacs.d/lisp
git clone https://github.com/bradyt/dart-mode.git
(setq package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(let ((pkgs-to-install (seq-remove 'package-installed-p '(dash magit flycheck s))))
(when pkgs-to-install
(package-refresh-contents)
(dolist (pkg pkgs-to-install)
(package-install pkg))))
(global-set-key (kbd "C-x g") 'magit-status)
(add-to-list 'load-path "~/.emacs.d/lisp/dart-mode/")
(add-to-list 'auto-mode-alist '("\\.dart\\'" . dart-mode))
(require 'dart-mode)
(setq dart-enable-analysis-server t)
(setq dart-debug t)
(setq debug-on-error t)
(add-hook 'dart-mode-hook 'flycheck-mode)
To create a dart project for testing, we use stagehand.
pub global activate stagehand
mkdir testing
cd testing
stagehand package-simple
pub get