From 099a5183828ce27f2f640d0dbea56fe571988fab Mon Sep 17 00:00:00 2001 From: "Florian RICHER (MrDev023)" Date: Fri, 15 Apr 2022 23:43:36 +0200 Subject: [PATCH] Update dot_doom.d/config.el --- dot_doom.d/config.el | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/dot_doom.d/config.el b/dot_doom.d/config.el index 88c219f..d7feaef 100644 --- a/dot_doom.d/config.el +++ b/dot_doom.d/config.el @@ -73,4 +73,28 @@ ;; etc). ;; ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how -;; they are implemented. +;; they are implemented.(use-package! lsp-mode) + +(defun on-switch-project-update-flutter-path () + "Perform some action after switching Projectile projects." + (if (project-current) + (setq lsp-dart-flutter-sdk-dir (concat (project-root (project-current)) ".fvm/flutter_sdk"))) +) +(add-hook 'projectile-after-switch-project-hook #'on-switch-project-update-flutter-path) + +;; (use-package! lsp-dart +;; :hook (dart-mode . lsp) +;; :init +;; :config +;; (setq lsp-dart-flutter-sdk-dir (project-root (project-current)))) + +(with-eval-after-load 'projectile + (add-to-list 'projectile-project-root-files-bottom-up "pubspec.yaml") + (add-to-list 'projectile-project-root-files-bottom-up "BUILD")) + +(use-package! lsp-mode + :init + :config + (setq lsp-rust-server 'rust-analyzer + lsp-rust-analyzer-server-display-inlay-hints t + lsp-metals-show-inferred-type t))