Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
semenInRussia committed Jun 13, 2024
1 parent e040a88 commit 21d1771
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
3 changes: 2 additions & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
30 changes: 22 additions & 8 deletions lisp/my-fonts.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion lisp/ui/my-layout.el
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 0 additions & 2 deletions lisp/ui/my-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
(require 'my-leaf)


(leaf nerd-icons :ensure t)

(leaf doom-modeline
:ensure t
:custom (;; it looks like more nice
Expand Down
15 changes: 13 additions & 2 deletions small-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 <N>" delete the Nth window
(my-load-file (locate-user-emacs-file "lisp/editing/my-buffer-navigation.el"))
Expand All @@ -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

0 comments on commit 21d1771

Please sign in to comment.