feat: more more minor changes

This commit is contained in:
Flinner Yuu 2025-04-23 15:05:48 +03:00
parent 4bf7bb8cfa
commit dc8d190fa1
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
2 changed files with 66 additions and 56 deletions

View File

@ -3,8 +3,8 @@
# ----- Parameters ------ # # ----- Parameters ------ #
# Coordinates: https://www.mapcoordinates.net/en # Coordinates: https://www.mapcoordinates.net/en
# Set lat and long explicitly, or leave commented to get them automatically from ipinfo.io # Set lat and long explicitly, or leave commented to get them automatically from ipinfo.io
lat='' lat="${lat:-}"
long='' long="${long:-}"
# Calculation Method: https://api.aladhan.com/v1/methods # Calculation Method: https://api.aladhan.com/v1/methods
method='4' method='4'
# Print Text Language (en/ar) # Print Text Language (en/ar)

View File

@ -69,22 +69,31 @@ remove warning by use-package
* Basic Configuration * Basic Configuration
** Better Defaults ** Better Defaults
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq inhibit-startup-message t) (setq inhibit-startup-message t)
(scroll-bar-mode -1) ; Disable visible scrollbar (scroll-bar-mode -1) ; Disable visible scrollbar
(tool-bar-mode -1) ; Disable the toolbar (tool-bar-mode -1) ; Disable the toolbar
(tooltip-mode -1) ; Disable tooltips (tooltip-mode -1) ; Disable tooltips
(set-fringe-mode 10) ; Give some breathing room (set-fringe-mode 10) ; Give some breathing room
(menu-bar-mode -1) ; Disable the menu bar (menu-bar-mode -1) ; Disable the menu bar
(winner-mode 1) ; Disable the menu bar (winner-mode 1) ; Disable the menu bar
(setq visible-bell nil) ; Set up the visible bell (setq visible-bell nil) ; Set up the visible bell
(column-number-mode) ; Display Column Number in the modline (column-number-mode) ; Display Column Number in the modline
(setq use-dialog-box nil) ; I don't like to confirm anything with a mouse! (setq use-dialog-box nil) ; I don't like to confirm anything with a mouse!
(defalias 'yes-or-no-p 'y-or-n-p) ; I don't want to type 'yes' everytime!, 'y' is enough (setq max-mini-window-height 1) ; Maximum height for resizing mini-windows (the minibuffer and the echo area). = 1 line
(defalias 'yes-or-no-p 'y-or-n-p) ; I don't want to type 'yes' everytime!, 'y' is enough
;(setq native-comp-deferred-compilation t); emacs 30+ i guess
(setq comp-deferred-compilation-deny-list '()) ;; turn off bytecompiler warnings
(setq native-comp-async-report-warnings-errors nil)
;; This is to refresh org buffers when reloading agenda
;; When I sync from another device.
(global-auto-revert-mode 1)
(setq auto-revert-use-notify 1) ; same thing with set to 1
(setq auto-revert-verbose t)
;(setq native-comp-deferred-compilation t); emacs 30+ i guess
(setq comp-deferred-compilation-deny-list '()) ;; turn off bytecompiler warnings
(setq native-comp-async-report-warnings-errors nil)
#+end_src #+end_src
Emacs Backups trashing local dir! Emacs Backups trashing local dir!
@ -830,7 +839,7 @@ slow loading! defer it
:custom :custom
(company-tooltip-minimum-width 40) ;reduce flicker due to changing width (company-tooltip-minimum-width 40) ;reduce flicker due to changing width
(global-company-mode t) (global-company-mode t)
(company-idle-delay 0.01) ;; how long to wait until popup (company-idle-delay 0.1) ;; how long to wait until popup
(company-minimum-prefix-length 1) ;; The minimum prefix length for idle completion. (company-minimum-prefix-length 1) ;; The minimum prefix length for idle completion.
(company-selection-wrap-around t) (company-selection-wrap-around t)
;; (company-begin-commands nil) ;; uncomment to disable popup ;; (company-begin-commands nil) ;; uncomment to disable popup
@ -1172,7 +1181,7 @@ From: https://yiufung.net/post/anki-org/
*** Weeks per semester *** Weeks per semester
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun org-week-to-class-week (week) (defun org-week-to-class-week (week)
(- week 34)) (- week 0))
(advice-add 'org-days-to-iso-week :filter-return (advice-add 'org-days-to-iso-week :filter-return
#'org-week-to-class-week) #'org-week-to-class-week)
@ -1305,14 +1314,14 @@ From: https://yiufung.net/post/anki-org/
(setq org-agenda-span 'day); a week is too much (setq org-agenda-span 'day); a week is too much
(setq org-super-agenda-groups (setq org-super-agenda-groups
'((:log t :order 99); logs at bottom '((:log t :order 99); logs at bottom
(:name "S" (:name "Study"
:order 97 :order 97
:tag ("S")) :tag ("S"))
(:name "Life" (:name "Life"
:order 97 :order 98
:tag ("L")) :tag ("L"))
(:name "Habits" (:name "Habits"
:order 98 :order 99
:habit t) :habit t)
(:name "Overdue" (:name "Overdue"
:deadline past :deadline past
@ -1644,36 +1653,37 @@ This is done in Performance section
*** lsp-mode *** lsp-mode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package lsp-mode (use-package lsp-mode
:commands (lsp lsp-deferred) :commands (lsp lsp-deferred)
;; :hook ;; :hook
;; (lsp-mode . my/lsp/lsp-mode-setup) ;; (lsp-mode . my/lsp/lsp-mode-setup)
:custom :custom
(lsp-headerline-breadcrumb-segments '(path-up-to-project file)) (lsp-headerline-breadcrumb-segments '(path-up-to-project file))
(lsp-rust-analyzer-cargo-watch-command "clippy") (lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t) (lsp-eldoc-render-all t)
(lsp-eldoc-enable-hover nil) (lsp-eldoc-enable-hover nil)
(lsp-ui-doc-show-with-mouse nil) (lsp-ui-doc-show-with-mouse nil)
(lsp-keep-workspace-alive nil) (lsp-keep-workspace-alive nil)
(lsp-idle-delay 0.6) (lsp-auto-execute-action nil) ; always ask for actions, even if there is only one option!
(lsp-completion-provider :capf) (lsp-idle-delay 0.6)
(lsp-prefer-flymake nil) (lsp-completion-provider :capf)
(lsp-idle-delay 0.6) (lsp-prefer-flymake nil)
(lsp-rust-analyzer-server-display-inlay-hints t) (lsp-idle-delay 0.6)
(lsp-rust-analyzer-display-parameter-hints t) (lsp-rust-analyzer-server-display-inlay-hints t)
;(setq lsp-keymap-prefix "C-c l") ;; Or 'C-l', 's-l' (lsp-rust-analyzer-display-parameter-hints t)
:config ;(setq lsp-keymap-prefix "C-c l") ;; Or 'C-l', 's-l'
(lsp-enable-which-key-integration t) :config
(setq lsp-headerline-breadcrumb-enable nil); anonying tabs (lsp-enable-which-key-integration t)
(setq lsp-log-io nil) ; if set to true can cause a performance hit (setq lsp-headerline-breadcrumb-enable nil); anonying tabs
(add-hook 'lsp-mode-hook 'lsp-ui-mode) (setq lsp-log-io nil) ; if set to true can cause a performance hit
(lsp-headerline-breadcrumb-mode -1) (add-hook 'lsp-mode-hook 'lsp-ui-mode)
(flycheck-mode 1) (lsp-headerline-breadcrumb-mode -1)
:bind (flycheck-mode 1)
(:map lsp-mode-map :bind
;; ("<tab>" . company-indent-or-complete-common); commented cuz tabs for yasnippet! (:map lsp-mode-map
) ;; ("<tab>" . company-indent-or-complete-common); commented cuz tabs for yasnippet!
) )
)
#+end_src #+end_src
Lsp UI Lsp UI
@ -1739,11 +1749,11 @@ Use the Debug Adapter Protocol for running tests and debugging
#+end_src #+end_src
*** Highlihght Indenation Mode *** Highlihght Indenation Mode
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle no
(use-package highlight-indent-guides (use-package highlight-indent-guides
:hook (prog-mode . highlight-indent-guides-mode) :hook (prog-mode . highlight-indent-guides-mode)
:custom (highlight-indent-guides-method 'character) :custom (highlight-indent-guides-method 'character)
(highlight-indent-guides-responsive 'top)) (highlight-indent-guides-responsive 'top))
#+end_src #+end_src
** Git ** Git
@ -2136,7 +2146,7 @@ CMake
(add-hook 'before-save-hook 'lsp-format-buffer nil t)))) (add-hook 'before-save-hook 'lsp-format-buffer nil t))))
#+end_src #+end_src
*** python *** COMMENT python
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package elpy (use-package elpy
:ensure t :ensure t