General, minor refactor & reformatting
This commit is contained in:
parent
bcdadcd45d
commit
296cbff097
7 changed files with 63 additions and 60 deletions
|
@ -22,24 +22,24 @@
|
|||
It is fast and optimized for UI, Famous for the [[https://flutter.io/][Flutter]] framework, also
|
||||
made by Google. Both Flutter and Dart are free and open-source.
|
||||
|
||||
This module wraps ~dart-mode~, with LSP code completion for =.dart= files,
|
||||
syntax highlighting, etc.
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
||||
** Module Flags
|
||||
The `dart` module wraps `dart-mode`, with LSP code completion for `.dart` files,
|
||||
syntax highlighting, etc. Included is a `+lsp` flag for enabling LSP features,
|
||||
and a `+flutter` flag for working with Flutter.
|
||||
|
||||
+ =+lsp= Will start LSP automatically in `dart-mode-hook`.
|
||||
+ =+flutter= Adds the `flutter` package and some settings for Flutter development.
|
||||
+ =+lsp= Enable LSP server integration.
|
||||
+ =+flutter= Adds ~flutter~ integration and some sane defaults for Flutter
|
||||
development.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/bradyt/dart-mode][dart-mode]]
|
||||
+ [[https://github.com/amake/flutter.el][flutter.el]]
|
||||
|
||||
* Prerequisites
|
||||
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.
|
||||
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,
|
||||
|
@ -50,20 +50,19 @@ 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), you can simply install the SDK via:
|
||||
#+BEGIN_SRC shell
|
||||
sudo apt-get install dart
|
||||
#+END_SRC
|
||||
Or on Arch (and its derivations, like Manjaro), you can install it using:
|
||||
#+BEGIN_SRC shell
|
||||
sudo pacman -S dart
|
||||
#+END_SRC
|
||||
And finally in MacOS, the [[https://brew.sh/][Homebrew]] can come in handy. If you have it installed
|
||||
just run:
|
||||
#+BEGIN_SRC shell
|
||||
brew tap dart-lang/dart
|
||||
brew install dart#+END_SRC
|
||||
#+END_SRC
|
||||
+ *On Debian (also Ubuntu and its derivations):*
|
||||
#+BEGIN_SRC shell
|
||||
sudo apt-get install dart
|
||||
#+END_SRC
|
||||
+ *On Arch Linux (and derivations like Manjaro):*
|
||||
#+BEGIN_SRC shell
|
||||
sudo pacman -S dart
|
||||
#+END_SRC
|
||||
+ *On macOS*:
|
||||
#+BEGIN_SRC shell
|
||||
brew tap dart-lang/dart
|
||||
brew install dart#+END_SRC
|
||||
#+END_SRC
|
||||
|
||||
** Installing Flutter SDK
|
||||
Due to complications with permissions, it is suggested not to use AUR or any
|
||||
|
@ -71,6 +70,7 @@ automatic installation tools for Flutter SDK.
|
|||
|
||||
On any system just run the following commands to install Flutter, once you have
|
||||
met dependencies named on [[https://flutter.dev/docs/get-started/install/][the site]]:
|
||||
|
||||
#+BEGIN_SRC shell
|
||||
git clone https://github.com/flutter/flutter --branch stable # to download Flutter
|
||||
export PATH="$PATH:$(pwd)/flutter/bin" # to add it to PATH
|
||||
|
@ -78,13 +78,13 @@ flutter doctor # for Dependency check and further instructions
|
|||
#+END_SRC
|
||||
|
||||
* Features
|
||||
+ Syntax highlighting and formatting for `.dart` files provided by LSP
|
||||
+ Syntax highlighting and formatting for ~.dart~ files provided by LSP
|
||||
+ Emacs functions for running and debugging Flutter projects
|
||||
|
||||
* Configuration
|
||||
** 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
|
||||
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, if it differs, to make sure LSP can find the language server
|
||||
included with the Dart SDK.
|
||||
|
||||
|
@ -93,12 +93,12 @@ 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
|
||||
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 [[https://wiki.archlinux.org/index.php/Android][Arch Linux wiki has a great guide on this here.]]
|
||||
|
||||
* Troubleshooting
|
||||
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
|
||||
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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue