Move function to lsp.el

This commit is contained in:
KJ 2023-06-02 13:14:35 -04:00
parent 3bfb4508df
commit 79b1cab10e
2 changed files with 7 additions and 7 deletions

View File

@ -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.

View File

@ -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)