;;; /path/zum/separaten-emacs-init-file.el

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(unless (package-installed-p 'dart-mode)
  (package-refresh-contents)
  (package-install 'dart-mode))
(unless (package-installed-p 'flutter)
  (package-install 'flutter))
(unless (package-installed-p 'lsp-dart)
  (package-install 'lsp-dart))
(unless (package-installed-p 'hover)
  (package-install 'hover))

(setq lsp-keymap-prefix "C-c C-l")

(require 'lsp-mode)
(add-hook 'dart-mode-hook 'lsp)
(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024))

;; Assuming usage with dart-mode
(use-package dart-mode
  ;; Optional
  :hook (dart-mode . flutter-test-mode))

(use-package flutter
  :after dart-mode
  :bind (:map dart-mode-map
              ("C-c C-c" . #'flutter-run-or-hot-reload))
  )

