diff --git a/init.el b/init.el index 66077f6..6dafec9 100644 --- a/init.el +++ b/init.el @@ -176,14 +176,26 @@ (setq lsp-headerline-breadcrumb-enable nil) (setq lsp-signature-auto-activate nil) (setq lsp-signature-doc-lines 0) - (setq lsp-ui-doc-show-with-cursor t) - (setq lsp-ui-doc-position 'top) - (setq lsp-ui-doc-delay 0.5) :config (evil-define-key 'normal lsp-mode-map (kbd "SPC l") lsp-command-map) (add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration) (add-hook 'evil-insert-state-entry-hook #'lsp-signature-activate) (add-hook 'evil-insert-state-exit-hook #'lsp-signature-stop)) -(use-package lsp-ui) +(use-package lsp-ui + :init + (setq lsp-ui-doc-show-with-cursor t) + (setq lsp-ui-doc-position 'top) + (setq lsp-ui-doc-delay 0.5) + :config + (define-key lsp-ui-mode-map [remap xref-find-definitions] #'lsp-ui-peek-find-definitions) + (define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references) + (define-key evil-normal-state-map (kbd "SPC d") #'lsp-ui-peek-find-definitions) + (define-key evil-normal-state-map (kbd "SPC r") #'lsp-ui-peek-find-references) + ;; Controls inside references popup + (define-key lsp-ui-peek-mode-map (kbd "j") #'lsp-ui-peek--select-next) + (define-key lsp-ui-peek-mode-map (kbd "k") #'lsp-ui-peek--select-prev) + (define-key lsp-ui-peek-mode-map (kbd "J") #'lsp-ui-peek--select-next-file) + (define-key lsp-ui-peek-mode-map (kbd "K") #'lsp-ui-peek--select-prev-file) + (define-key lsp-ui-peek-mode-map (kbd "o") #'lsp-ui-peek--goto-xref)) (setq gc-cons-threshold (* 1024 1024 100)) (setq read-process-output-max (* 1024 1024)) diff --git a/my-theme-theme.el b/my-theme-theme.el index c1bb419..5abbc7b 100644 --- a/my-theme-theme.el +++ b/my-theme-theme.el @@ -53,6 +53,7 @@ (common-fg '("#b7c9ee" "white" "white")) (common-bg '("#0d1017" "black" "black")) (modeline '("#156570" nil nil)) + (highlight (funcall brighten-first common-bg 0.15)) (comment '("#384345" nil nil)) (doc '("#6a866f" nil nil)) (keyword '("#349672" nil nil)) @@ -64,6 +65,8 @@ (lsp-hover-highlight (funcall brighten-first common-bg 0.05)) (company-bg (funcall brighten-first common-bg 0.1)) + + (peek-code '("#0e151a" nil nil)) ;; Extra colors #1fa345 ) (custom-theme-set-faces @@ -75,7 +78,7 @@ (funcall face 'mode-line-inactive :bg (funcall darken-first common-bg 0.35) :fg common-fg) (funcall face 'mode-line :bg modeline :fg common-fg) (funcall face 'hl-line :bg (funcall darken-first common-bg 0.15)) - (funcall face 'region :bg (funcall brighten-first common-bg 0.15)) + (funcall face 'region :bg highlight) (funcall face 'font-lock-comment-face :fg comment) (funcall face 'font-lock-doc-face :fg doc) (funcall face 'font-lock-keyword-face :fg keyword) @@ -90,7 +93,14 @@ (funcall face 'lsp-face-highlight-read :bg lsp-hover-highlight) (funcall face 'lsp-face-highlight-write :bg lsp-hover-highlight) - ;; company + (funcall face 'lsp-ui-peek-filename :fg common-fg) + (funcall face 'lsp-ui-peek-header :bg modeline) + (funcall face 'lsp-ui-peek-peek :bg peek-code) + (funcall face 'lsp-ui-peek-list :bg peek-code) + (funcall face 'lsp-ui-peek-selection :bg highlight) + (funcall face 'lsp-ui-peek-highlight :bg highlight) + + ;; Company (funcall face 'company-tooltip :bg company-bg) (funcall face 'company-tooltip-selection :bg (funcall brighten-first company-bg 0.15)) (funcall face 'company-scrollbar-fg :bg (funcall brighten-first company-bg 0.3))