diff --git a/README.org b/README.org index c0aa146..081e511 100644 --- a/README.org +++ b/README.org @@ -195,6 +195,7 @@ inputs.flake-utils.lib.eachDefaultSystem (system: default = import ./shell.nix { inherit pkgs; }; cc = import ./shells/cc.nix { inherit pkgs; }; go = import ./shells/go.nix { inherit pkgs; }; + dart = import ./shells/dart.nix { inherit pkgs; }; grpc = import ./shells/grpc.nix { inherit pkgs; }; java = import ./shells/java.nix { inherit pkgs; }; node = import ./shells/node.nix { inherit pkgs; }; @@ -279,6 +280,33 @@ mkShell { } #+END_SRC +** Dart + +#+ATTR_ORG: :width 400px +#+ATTR_HTML: :width 400px +#+ATTR_LATEX: :width 400px +[[./docs/images/dart.png]] + +[[https://dart.dev][Dart]] is a programming language designed for client development, such as for the web and mobile apps. It is developed by Google and can be used to build server and desktop applications. It is an object-oriented, class-based, garbage-collected language with C-style syntax. + +Import this shell with ~nix develop $DOTFILES#dart~ + +#+BEGIN_SRC nix :noweb yes :tangle shells/dart.nix +#<> +{ pkgs ? import { } }: + +with pkgs; +mkShell { + buildInputs = [ + dart + flutter + ]; + shellHook = '' + FLUTTER_SDK_DIR=${flutter}/bin/cache/dart-sdk/ + ''; +} +#+END_SRC + ** Rust #+ATTR_ORG: :width 400px @@ -2530,6 +2558,26 @@ epkgs.go-mode (add-hook 'go-mode-hook #'dotfiles/go-hook) #+END_SRC +*** Dart Mode + +#+NAME: emacs-dart-package +#+BEGIN_SRC nix +epkgs.dart-mode +epkgs.lsp-dart +epkgs.hover +#+END_SRC + +[[https://github.com/emacs-lsp/lsp-dart][Emacs Dart IDE]] using LSP Mode to connect to Dart Analysis Server. + +#+NAME: emacs-dart-elisp +#+BEGIN_SRC emacs-lisp +;; Configure `dart-mode' to work with `lsp-mode'. +(add-hook 'dart-mode-hook 'lsp) + +;; Help Emacs find Flutter packages. +(setq lsp-dart-sdk-dir (getenv "$FLUTTER_SDK_DIR")) +#+END_SRC + *** Rustic #+NAME: emacs-rustic-package diff --git a/docs/images/dart.png b/docs/images/dart.png new file mode 100644 index 0000000..44b98c4 Binary files /dev/null and b/docs/images/dart.png differ diff --git a/flake.nix b/flake.nix index 6329bc1..c08ada8 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,7 @@ default = import ./shell.nix { inherit pkgs; }; cc = import ./shells/cc.nix { inherit pkgs; }; go = import ./shells/go.nix { inherit pkgs; }; + dart = import ./shells/dart.nix { inherit pkgs; }; grpc = import ./shells/grpc.nix { inherit pkgs; }; java = import ./shells/java.nix { inherit pkgs; }; node = import ./shells/node.nix { inherit pkgs; }; diff --git a/shells/dart.nix b/shells/dart.nix new file mode 100644 index 0000000..708d07a --- /dev/null +++ b/shells/dart.nix @@ -0,0 +1,13 @@ +#This file is controlled by /etc/dotfiles/README.org +{ pkgs ? import { } }: + +with pkgs; +mkShell { + buildInputs = [ + dart + flutter + ]; + shellHook = '' + FLUTTER_SDK_DIR=${flutter}/bin/cache/dart-sdk/ + ''; +}