From dfcd3b2c0cb1a8aec18ed84b32e4cc757a458726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Tue, 26 Nov 2019 21:53:11 +0100 Subject: [PATCH] update dart-mode and add flutter --- init.el | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/init.el b/init.el index a7c386b..ba66af2 100644 --- a/init.el +++ b/init.el @@ -754,33 +754,33 @@ inserted between the braces between the braces." ;;; Dart ;;; ---- +;;; NOTE: `pub` and `dart` must be in PATH for lsp to start in +;;; dart-mode. -(defun my-dart-goto () - (interactive) - (xref-push-marker-stack) - (dart-goto)) (use-package dart-mode :init - (let ((path (expand-file-name - "~/local/src/flutter/bin/cache/dart-sdk/"))) - (if (file-accessible-directory-p path) - (setq dart-sdk-path path))) - (setq dart-enable-analysis-server t) + (setq lsp-dart-analysis-sdk-dir "~/local/flutter/bin/cache/dart-sdk/") :bind (:map dart-mode-map - ("M-." . my-dart-goto) - ("M-/" . dabbrev-expand) - ("C-i" . company-indent-or-complete-common) - ("C-M-i" . company-indent-or-complete-common)) + ("C-i" . company-indent-or-complete-common) + ("C-M-i" . company-indent-or-complete-common)) :config - (defun my-dart-mode-hook-fn () (smartparens-mode 1) - (flycheck-mode 1)) - + (flycheck-mode 1) + (company-mode 1) + (lsp)) (add-hook 'dart-mode-hook #'my-dart-mode-hook-fn)) +(use-package flutter + :after dart-mode + :init + (setq flutter-sdk-path "~/local/flutter/") + :bind + (:map dart-mode-map + ("C-M-x" . #'flutter-run-or-hot-reload))) + ;;; PHP ;;; ---