2020-02-15 12:22:01 -05:00
|
|
|
;;; lang/dart/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
2020-03-27 21:39:27 -04:00
|
|
|
(use-package! dart-mode
|
|
|
|
:when (featurep! +lsp)
|
|
|
|
:hook (dart-mode-local-vars . lsp!)
|
|
|
|
:config
|
|
|
|
(when (and (featurep! +flutter) IS-LINUX)
|
|
|
|
(when-let (path (doom-glob "/opt/flutter/bin/cache/dart-sdk"))
|
2020-06-12 21:37:14 +04:30
|
|
|
(setq flutter-sdk-path path)))
|
|
|
|
(set-pretty-symbols! '(dart-mode)
|
|
|
|
;; Functional
|
|
|
|
:def "Function"
|
|
|
|
:lambda "() =>"
|
|
|
|
;; Types
|
|
|
|
:null "null"
|
|
|
|
:true "true" :false "false"
|
|
|
|
:int "int" :float "double"
|
|
|
|
:str "String"
|
|
|
|
:bool "bool"
|
|
|
|
:list "List"
|
|
|
|
;; Flow
|
|
|
|
:not "!"
|
|
|
|
:in "in"
|
|
|
|
:and "&&" :or "||"
|
|
|
|
:for "for"
|
|
|
|
:return "return"
|
|
|
|
;; Other
|
|
|
|
:yield "yield"))
|
2020-02-17 10:12:43 -05:00
|
|
|
|
|
|
|
|
2020-03-16 00:02:16 +03:30
|
|
|
(use-package! flutter
|
|
|
|
:when (featurep! +flutter)
|
|
|
|
:defer t
|
2020-07-23 01:04:04 -04:00
|
|
|
:init
|
2020-03-16 00:02:16 +03:30
|
|
|
(map! :map dart-mode-map
|
|
|
|
:localleader
|
|
|
|
"r" #'flutter-run-or-hot-reload))
|
2020-04-13 23:23:44 -03:00
|
|
|
|
|
|
|
|
|
|
|
(use-package! hover
|
|
|
|
:when (featurep! +flutter)
|
|
|
|
:defer t
|
|
|
|
:config
|
|
|
|
(map! :map dart-mode-map
|
|
|
|
:localleader
|
|
|
|
"h r" #'hover-run-or-hot-reload
|
|
|
|
"h R" #'hover-run-or-hot-restart))
|