Browse Source

Add dart support

main
parent
commit
3718b7d58f
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 48
      README.org
  2. BIN
      docs/images/dart.png
  3. 1
      flake.nix
  4. 13
      shells/dart.nix

48
README.org

@ -195,6 +195,7 @@ inputs.flake-utils.lib.eachDefaultSystem (system:
default = import ./shell.nix { inherit pkgs; }; default = import ./shell.nix { inherit pkgs; };
cc = import ./shells/cc.nix { inherit pkgs; }; cc = import ./shells/cc.nix { inherit pkgs; };
go = import ./shells/go.nix { inherit pkgs; }; go = import ./shells/go.nix { inherit pkgs; };
dart = import ./shells/dart.nix { inherit pkgs; };
grpc = import ./shells/grpc.nix { inherit pkgs; }; grpc = import ./shells/grpc.nix { inherit pkgs; };
java = import ./shells/java.nix { inherit pkgs; }; java = import ./shells/java.nix { inherit pkgs; };
node = import ./shells/node.nix { inherit pkgs; }; node = import ./shells/node.nix { inherit pkgs; };
@ -279,6 +280,33 @@ mkShell {
} }
#+END_SRC #+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
#<<file-warning>>
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
buildInputs = [
dart
flutter
];
shellHook = ''
FLUTTER_SDK_DIR=${flutter}/bin/cache/dart-sdk/
'';
}
#+END_SRC
** Rust ** Rust
#+ATTR_ORG: :width 400px #+ATTR_ORG: :width 400px
@ -2530,6 +2558,26 @@ epkgs.go-mode
(add-hook 'go-mode-hook #'dotfiles/go-hook) (add-hook 'go-mode-hook #'dotfiles/go-hook)
#+END_SRC #+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 *** Rustic
#+NAME: emacs-rustic-package #+NAME: emacs-rustic-package

BIN
docs/images/dart.png

After

Width: 512  |  Height: 137  |  Size: 11 KiB

1
flake.nix

@ -52,6 +52,7 @@
default = import ./shell.nix { inherit pkgs; }; default = import ./shell.nix { inherit pkgs; };
cc = import ./shells/cc.nix { inherit pkgs; }; cc = import ./shells/cc.nix { inherit pkgs; };
go = import ./shells/go.nix { inherit pkgs; }; go = import ./shells/go.nix { inherit pkgs; };
dart = import ./shells/dart.nix { inherit pkgs; };
grpc = import ./shells/grpc.nix { inherit pkgs; }; grpc = import ./shells/grpc.nix { inherit pkgs; };
java = import ./shells/java.nix { inherit pkgs; }; java = import ./shells/java.nix { inherit pkgs; };
node = import ./shells/node.nix { inherit pkgs; }; node = import ./shells/node.nix { inherit pkgs; };

13
shells/dart.nix

@ -0,0 +1,13 @@
#This file is controlled by /etc/dotfiles/README.org
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
buildInputs = [
dart
flutter
];
shellHook = ''
FLUTTER_SDK_DIR=${flutter}/bin/cache/dart-sdk/
'';
}
Loading…
Cancel
Save