Popravek, ciscenje

deblo
Jurij Podgoršek 2024-12-15 18:34:12 +01:00
parent 3755344f7c
commit bf012bcda9
1 changed files with 10 additions and 30 deletions

View File

@ -61,7 +61,6 @@ Nastavimo vire nalaganja paketov in pa vklopimo privzeto nalaganje ~use-package~
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/") t) (add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/") t)
(package-initialize) (package-initialize)
;(require 'use-package)
#+end_src #+end_src
Vklop merjenja časa nalaganja posameznih paketov. Vklop merjenja časa nalaganja posameznih paketov.
@ -111,8 +110,7 @@ In pa ukaz za ponovno naložit konfiguracijo emacsa.
"[" 'previous-buffer "[" 'previous-buffer
"]" 'next-buffer "]" 'next-buffer
"r" 'ponovno-nalozi-config "r" 'ponovno-nalozi-config
"u" 'font-lock-update "u" 'font-lock-update)
)
#+end_src #+end_src
** Upravljanje z okni ** Upravljanje z okni
@ -270,7 +268,7 @@ V evil mode lahko linke znotraj ORG dokumentov odpiramo kar z ~RET~.
Evil v ~treemacs~ drevesu datotečnega sistema. Evil v ~treemacs~ drevesu datotečnega sistema.
#+begin_src emacs-lisp #+begin_src emacs-lisp
;(use-package treemacs-evil :after treemacs) (use-package treemacs-evil :after treemacs)
#+end_src #+end_src
* Emacs splošno * Emacs splošno
@ -355,7 +353,6 @@ Paket za dopolnjevanje, nadomestek ~ivy~. Nudi nekoliko lepšo iskušnjo priporo
(use-package consult (use-package consult
:config :config
(general-define-key (general-define-key
;(global-set-key (kbd "M-x") 'counsel-M-x)
"C-s" 'consult-line "C-s" 'consult-line
"C-c j" 'consult-git-grep "C-c j" 'consult-git-grep
"C-c k" 'consult-ag "C-c k" 'consult-ag
@ -364,31 +361,15 @@ Paket za dopolnjevanje, nadomestek ~ivy~. Nudi nekoliko lepšo iskušnjo priporo
"RET" 'consult-bookmark "RET" 'consult-bookmark
"/" 'consult-ripgrep "/" 'consult-ripgrep
"b b" 'consult-buffer "b b" 'consult-buffer
"f r" 'consult-recent-file :wk "nedavno odprto") "f r" 'consult-recent-file :wk "nedavno odprto"))
#+end_src #+end_src
~counsel-M-x~ poganjalnik ukazov doplnimo s paketom ~smex~ za prikazovanje nedavno uporabljenih ukazov pri vrhu. ~M-x~ poganjalnik ukazov dopolnimo s paketom ~smex~ za prikazovanje nedavno uporabljenih ukazov pri vrhu.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package smex) (use-package smex)
#+end_src #+end_src
Šum pri iskalnih rezultatih ripgrep-a zmanjšamo z ignoriranjem ~node_modules~ direktorija javascript odvisnih paketov.
#+begin_src emacs-lisp
(defvar my-rg-excludes '("node_modules")
"List of directories to exclude from `counsel-rg' results.")
(define-advice counsel-rg
(:around (fn &optional in dir opts &rest args) my-glob)
"Exclude `my-rg-excludes' from `counsel-rg' results."
(let ((dir (or dir default-directory)))
(dolist (x my-rg-excludes)
(let ((glob (and (file-in-directory-p x dir)
(file-relative-name (expand-file-name "**" x) dir))))
(when glob (setq opts (concat "-g !" glob (and opts " ") opts))))))
(apply fn in dir opts args)))
#+end_src
** Pomoč / introspekcija ** Pomoč / introspekcija
Paket ~helpful~ obarva strani za pomoč ter doda več kontekstualnih informacij in pa nekaj funkcij za lažje razumevanje kaj je kje, recimo ~helpful-at-point~, ~helpful-callable~, ~helpful-command~... Paket ~helpful~ obarva strani za pomoč ter doda več kontekstualnih informacij in pa nekaj funkcij za lažje razumevanje kaj je kje, recimo ~helpful-at-point~, ~helpful-callable~, ~helpful-command~...
@ -423,10 +404,9 @@ Paziti pa moramo na verzije emacsa; zaznali smo težave pri mešanju emacs 30/29
:general :general
(start/leader-keys (start/leader-keys
"c" '(:ignore t :wk "crdt") "c" '(:ignore t :wk "crdt")
"c c" 'crdt-connect "c c" 'crdt-connect)
; "c c" 'crdt-connect) :general-config
;:general-config (start/leader-keys
;(start/leader-keys
"c" '(:ignore t :wk "crdt") "c" '(:ignore t :wk "crdt")
"c u" 'crdt-list-users "c u" 'crdt-list-users
"c s" 'crdt-share-buffer "c s" 'crdt-share-buffer
@ -492,9 +472,9 @@ Nekoliko bolj prijazen elisp REPL, ki ima med drugim zgodovino.
";" 'ielm) ";" 'ielm)
:config :config
(advice-add 'ielm-send-input :after 'g-ielm-write-history) (advice-add 'ielm-send-input :after 'g-ielm-write-history)
(general-define-key (general-define-key
:keymaps 'inferior-emacs-list-mode-map :keymaps 'inferior-emacs-list-mode-map
"C-l" 'comint-clear-buffer) "C-l" 'comint-clear-buffer))
#+end_src #+end_src
* ORG * ORG