diff --git a/init.el b/init.el index 2efee568..48819449 100644 --- a/init.el +++ b/init.el @@ -162,7 +162,8 @@ Byte-compile every file of local-projects and generate autoloads file" (let ((file-name-handler-alist nil) (load-suffixes '(".elc" ".el")) - (load-rep-load-file-rep-suffixes '(""))) + (load-rep-load-file-rep-suffixes '("")) + (auto-mode-case-fold nil)) (require 'my-modules)) (put 'narrow-to-region 'disabled nil) diff --git a/lisp/my-fonts.el b/lisp/my-fonts.el index 9316b4e9..bb60d897 100644 --- a/lisp/my-fonts.el +++ b/lisp/my-fonts.el @@ -31,16 +31,30 @@ :group 'my :type 'number) -(setq-default line-spacing 0.30) +(defun font-installed-p (name) + "Return non-nil if the font with the name NAME is exist." + (find-font (font-spec :name name))) + +(unless (assoc 'font default-frame-alist) + (let ((fonts my-fonts-main)) + (while fonts + (when (font-installed-p (car fonts)) + (push (cons 'font (format "%s-%s" (car fonts) my-fonts-size)) + default-frame-alist) + (setq fonts nil)) + (setq fonts (cdr fonts))))) -(let ((fonts my-fonts-main)) - (while fonts - (when (find-font (font-spec :name (car fonts))) - (push (cons 'font (format "%s-%s" (car fonts) my-fonts-size)) - default-frame-alist) - (setq fonts nil)) - (setq fonts (cdr fonts)))) +(leaf nerd-icons + :ensure t + :require t + :config + (when (and (display-graphic-p) + (not (font-installed-p nerd-icons-font-family))) + (nerd-icons-install-fonts t))) + +(setq-default line-spacing 0.30) +;;; UTF-8 (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-language-environment 'utf-8) diff --git a/lisp/ui/my-layout.el b/lisp/ui/my-layout.el index 6c83e82e..ed8f66ab 100644 --- a/lisp/ui/my-layout.el +++ b/lisp/ui/my-layout.el @@ -10,8 +10,12 @@ inhibit-startup-message t inhibit-startup-echo-area-message t initial-scratch-message nil + ;; don't use system things, only Emacs use-file-dialog nil - use-dialog-box nil) + use-dialog-box nil + ;; Inhibit resizing frame + frame-inhibit-implied-resize t + frame-resize-pixelwise t) (defcustom my-layout-size '(70 . 35) "Cons of width and height of editor window." diff --git a/lisp/ui/my-modeline.el b/lisp/ui/my-modeline.el index c6accba1..07246931 100644 --- a/lisp/ui/my-modeline.el +++ b/lisp/ui/my-modeline.el @@ -17,8 +17,6 @@ (require 'my-leaf) -(leaf nerd-icons :ensure t) - (leaf doom-modeline :ensure t :custom (;; it looks like more nice diff --git a/small-init.el b/small-init.el index 9a558c8f..8b8a3633 100644 --- a/small-init.el +++ b/small-init.el @@ -26,25 +26,34 @@ If a compiled version is exists, load it." (declare-function pam-activate "pam") (my-load-file (locate-user-emacs-file "lisp/package-management/pam.el")) (pam-activate) + (my-load-file (locate-user-emacs-file "lisp/package-management/my-leaf.el")) (my-load-file (locate-user-emacs-file "lisp/my-libs.el")) (my-load-file (locate-user-emacs-file "lisp/my-lib.el")) + ;; highlight errors on the fly (my-load-file (locate-user-emacs-file "lisp/editing/my-flycheck.el")) + ;; snippets (my-load-file (locate-user-emacs-file "lisp/editing/my-yas.el")) + ;; auto-completion popup (my-load-file (locate-user-emacs-file "lisp/editing/my-corfu.el")) + ;; auto-enclosing parentheses (my-load-file (locate-user-emacs-file "lisp/editing/my-smartparens.el")) + ;; some small editing tips (my-load-file (locate-user-emacs-file "lisp/editing/my-editing.el")) (my-load-file (locate-user-emacs-file "lisp/editing/my-indent.el")) (my-load-file (locate-user-emacs-file "lisp/editing/my-search.el")) + ;; load fonts (my-load-file (locate-user-emacs-file "lisp/ui/my-fonts.el")) -;; multiple cursors that bound to "M-," + +;; multiple cursors that bound to "C-," (my-load-file (locate-user-emacs-file "lisp/editing/my-multiple-cursors.el")) + ;; "M-o" to jump between buffers, also you can manipulate with windows, for ;; example "M-o x " delete the Nth window (my-load-file (locate-user-emacs-file "lisp/editing/my-buffer-navigation.el")) @@ -55,7 +64,9 @@ If a compiled version is exists, load it." (my-load-file (locate-user-emacs-file "lisp/misc/my-consult.el")) ;; start a server to fast opening files in the same session -(server-start) +(require 'server) +(unless (server-running-p) + (server-start)) (provide 'small-init) ;;; small-init.el ends here