diff --git a/init.el b/init.el index e898bc6..c7e09c1 100644 --- a/init.el +++ b/init.el @@ -328,6 +328,8 @@ visual states." (defun my/consult-setup-minibuffer-completion () (setq-local completion-in-region-function #'consult-completion-in-region)) (evil-declare-motion #'consult-line)) +(use-package consult-eglot + :commands consult-eglot-symbols) ;; integration for embark and consult (use-package embark-consult @@ -409,6 +411,7 @@ visual states." ;; eglot (use-package eglot + :demand t :hook (((c-ts-mode c++-ts-mode java-ts-mode rust-ts-mode python-ts-mode latex-mode markdown-mode blueprint-ts-mode) . eglot-ensure) (eglot-managed-mode . my/-eglot-setup)) @@ -443,7 +446,8 @@ visual states." (evil-define-key '(normal motion) 'local "K" #'evil-lookup "gR" #'eglot-rename - "gA" #'eglot-code-actions) + "gA" #'eglot-code-actions + "gs" #'consult-eglot-symbols) (eglot-inlay-hints-mode -1)) (setq eglot-autoshutdown t) :config @@ -543,7 +547,14 @@ COMMAND and COMINT are like `compile'." "Setup `nxml-mode'." (sgml-electric-tag-pair-mode 1) (setq-local completion-at-point-functions - '(rng-completion-at-point cape-file)))) + '(rng-completion-at-point cape-file))) + (add-to-list 'auto-mode-alist + `(,(concat + (regexp-opt '("gschema" "gresource" "ui")) "\\'") . nxml-mode))) + +;; blueprint +(use-package blueprint-ts-mode + :after eglot) ;; rust (use-package rust-mode)