From 79b1cab10e9b1923dea9a5ba17048de484a348f9 Mon Sep 17 00:00:00 2001 From: KJ Date: Fri, 2 Jun 2023 13:14:35 -0400 Subject: [PATCH] Move function to lsp.el --- configs/init-functions.el | 7 ------- configs/init-lsp.el | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configs/init-functions.el b/configs/init-functions.el index e0e4ac2..e55d02f 100644 --- a/configs/init-functions.el +++ b/configs/init-functions.el @@ -58,12 +58,5 @@ Saves to a temp file and puts the filename in the kill ring." ;; Borrar espacios, tabs y saltos de línea innecesarios al guardar (add-hook 'before-save-hook 'delete-trailing-whitespace) -;; Verifica si es está instalado alltheicons (útil para ver si se usa o no íconos) -(defun icon-displayable-p () - "Return non-nil if icons are displayable." - (and (display-graphic-p) (daemonp) - (or (featurep 'all-the-icons) - (require 'all-the-icons nil t)))) - (provide 'init-functions) ;;; init-functions.el ends here. diff --git a/configs/init-lsp.el b/configs/init-lsp.el index acbce9d..87b42e0 100644 --- a/configs/init-lsp.el +++ b/configs/init-lsp.el @@ -73,6 +73,13 @@ (apply fn args))) (advice-add #'lsp--init-if-visible :around #'my-lsp--init-if-visible) + ;; Verifica si es está instalado alltheicons (útil para ver si se usa o no íconos) + (defun icon-displayable-p () + "Return non-nil if icons are displayable." + (and (display-graphic-p) (daemonp) + (or (featurep 'all-the-icons) + (require 'all-the-icons nil t)))) + ;; Enable `lsp-mode' in sh/bash/zsh (defun my-lsp-bash-check-sh-shell (&rest _) (and (eq major-mode 'sh-mode)