Files
doomemacs/modules/lang/dart
Henrik Lissner fc7b179e6c bump: :lang
Wilfred/helpful@5ad8a9ce57 -> Wilfred/helpful@6a4d5e0760
agda/agda@10a0ca0516 -> agda/agda@49a12eab7f
clojure-emacs/cider@a0d6169026 -> clojure-emacs/cider@fdfa7c2200
dominikh/go-mode.el@602d73e226 -> dominikh/go-mode.el@0ed3c5227e
emacs-geiser/gauche@8ff743f641 -> emacs-geiser/gauche@9eb8b35f0c
emacs-lsp/lsp-dart@7e3d342941 -> emacs-lsp/lsp-dart@2170823139
emacs-lsp/lsp-java@868600bf7f -> emacs-lsp/lsp-java@6cfff8761e
emacs-lsp/lsp-metals@567089f7f4 -> emacs-lsp/lsp-metals@345b4fa80e
emacs-lsp/lsp-sourcekit@63ff1ab638 -> emacs-lsp/lsp-sourcekit@3bd9750e7e
emacs-lsp/lsp-treemacs@fb1a07ae0a -> emacs-lsp/lsp-treemacs@312dee2b3a
emacs-rustic/rustic@fbbf0a7192 -> emacs-rustic/rustic@22a5ef8bfd
emacs-straight/auctex@53f80ba36c -> emacs-straight/auctex@6fb366064c
emacs-straight/csv-mode@6979fc18eb -> emacs-straight/csv-mode@1695ee1752
emacsorphanage/dart-mode@88b6683f43 -> emacsorphanage/dart-mode@6229941ec5
erlang/otp@64185e73b0 -> erlang/otp@740af6bae5
fsharp/emacs-fsharp-mode@677d78c4d6 -> fsharp/emacs-fsharp-mode@bf7a11e1ba
gcv/julia-snail@24f79a067b -> gcv/julia-snail@cacf52e4c8
godotengine/emacs-gdscript-mode@c3d9988984 -> godotengine/emacs-gdscript-mode@3f3739dd88
greghendershott/racket-mode@eef5e9ab2c -> greghendershott/racket-mode@88d82e249e
jrblevin/markdown-mode@ee9d6de1d2 -> jrblevin/markdown-mode@d2d960bec1
json-emacs/json-mode@77125b01c0 -> json-emacs/json-mode@466d5b5637
ledger/ledger-mode@356d8049ed -> ledger/ledger-mode@d9b6648201
rust-lang/rust-mode@542f1755d8 -> rust-lang/rust-mode@efd830806c
seagle0128/grip-mode@ffce7f78eb -> seagle0128/grip-mode@e90e3b47d8
ziglang/zig-mode@f0b4a48753 -> ziglang/zig-mode@4ad4edf759
2025-04-01 03:49:02 -04:00
..
2024-09-14 20:47:39 -04:00
2025-04-01 03:49:02 -04:00

:lang dart

Description   unfold

Dart is a client-optimized language by Google for fast apps on any platform. It is fast and optimized for UI, famous for the Flutter framework, also made by Google. Both Flutter and Dart are free and open-source.

This module wraps dart-mode, with LSP features like code completion for .dart files, syntax highlighting, debugging, closing labels, etc.

Module flags

+flutter
Enable flutter integration and some sane defaults for Flutter development along with hover for desktop development.
+lsp
Enable LSP support for dart-mode. Requires doom-module::tools lsp and a langserver (supports flutter).

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

Make sure that the Dart SDK is on your $PATH, and if using Flutter, make sure the Flutter binary is on your $PATH as well.

Installing Dart SDK

Before starting note that Flutter SDK will have a version of Dart. Therefore, there is no need to install Dart. If you want to use Flutter just see the next part.

The stable version of the SDK is in most major distributions repositories. If you find it necessary to install any other version or build from source, please refer to the official website at: https://dart.dev/get-dart

  • On Debian (also Ubuntu and its derivations):

    apt-get install dart
  • On Arch Linux (and derivations like Manjaro):

    pacman -S dart
  • On macOS:

    brew tap dart-lang/dart
    brew install dart
  • On NixOS:

    nix-env -iA nixpkgs.dart

Installing Flutter SDK

Due to complications with permissions, it is suggested not to use AUR or any automatic installation tools for Flutter SDK.

On any system just run the following commands to install Flutter, once you have met dependencies named on the site:

git clone https://github.com/flutter/flutter --branch stable # to download Flutter
export PATH="$PATH:$(pwd)/flutter/bin" # to add it to PATH
flutter doctor # for Dependency check and further instructions

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

  • Syntax highlighting and formatting for .dart files provided by LSP or doom-module::editor format.
  • Auto import.
  • Widget guide lines for Flutter.
  • Closing labels for constructors.
  • Run tests interactively.
  • Outline support via doom-package:lsp-treemacs.
  • Emacs functions for running and debugging Flutter projects.

TODO Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

Dart & Flutter

On Linux, the installers for Dart and Flutter use the /opt directory, and this module assumes that. However, you may set lsp-dart-sdk-dir to your Dart install directory and flutter-sdk-path to you flutter SDK folder, to make sure LSP can find the language server included with the Dart SDK.

Alternatively, these variables shouldn't be necessary if you just include Dart and Flutter on your PATH variable.

Android

You will also need to setup your system for Android development if you intend to use Flutter to develop mobile applications. Refer to your distributions package manager for details. In most distributions the /opt/android-sdk directory is used, and you might have to change some permissions in this directory since it's owned by root. The Arch Linux wiki has a great guide on this here.

Flutter mobile development on desktop

Hover is an application that can run Flutter mobile apps on your desktop, this makes the mobile development a lot easier without the need to setup an Android emulator.

Troubleshooting

Report an issue?

See the configuration section for information on the binaries for Dart and Flutter. On new installs to the /opt directory, you will likely need to edit the permissions of the /opt/dart-sdk and /opt/flutter directories (not to mention the Android SDK, as discussed above).

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?