Initial version of dart module
This commit is contained in:
parent
b0978a4526
commit
45da8d0d5f
4 changed files with 36 additions and 0 deletions
7
modules/lang/dart/+flutter.el
Normal file
7
modules/lang/dart/+flutter.el
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
;;; lang/dart/+flutter.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(use-package! flutter
|
||||||
|
:config
|
||||||
|
(map! :map dart-mode-map
|
||||||
|
:localleader
|
||||||
|
"r" #'flutter-run-or-hot-reload))
|
12
modules/lang/dart/config.el
Normal file
12
modules/lang/dart/config.el
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
;;; lang/dart/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(cond ((featurep! +flutter) (load! "+flutter"))
|
||||||
|
((featurep! +lsp) (load! "+lsp")))
|
||||||
|
|
||||||
|
(use-package! dart-mode
|
||||||
|
:config
|
||||||
|
(when (featurep! +flutter)
|
||||||
|
(if IS-LINUX
|
||||||
|
(setq lsp-dart-sdk-dir "/opt/flutter/bin/cache/dart-sdk/")))
|
||||||
|
(when (featurep! +lsp)
|
||||||
|
(add-hook 'dart-mode-hook 'lsp)))
|
11
modules/lang/dart/doctor.el
Normal file
11
modules/lang/dart/doctor.el
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
;;; lang/dart/doctor.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(assert! (or (not (featurep! +lsp))
|
||||||
|
(featurep! :tools lsp))
|
||||||
|
"This module requires (:tools lsp)")
|
||||||
|
|
||||||
|
(unless (executable-find "dart")
|
||||||
|
(warn! "Dart isn't on PATH."))
|
||||||
|
|
||||||
|
(unless (file-readable-p lsp-dart-sdk-dir)
|
||||||
|
(warn! "LSP Mode can't find lsp-dart-sdk-dir."))
|
6
modules/lang/dart/packages.el
Normal file
6
modules/lang/dart/packages.el
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; lang/dart/packages.el
|
||||||
|
|
||||||
|
(package! dart-mode)
|
||||||
|
(when (featurep! +flutter)
|
||||||
|
(package! flutter))
|
Loading…
Add table
Add a link
Reference in a new issue