summaryrefslogtreecommitdiffstats
path: root/.config/emacs
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/init.el50
-rw-r--r--.config/emacs/jd/jd-mu4e.el30
2 files changed, 37 insertions, 43 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 011d660..c77dbe8 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -4,7 +4,7 @@
4 (message "Emacs loaded in %s with %d garbage collections." 4 (message "Emacs loaded in %s with %d garbage collections."
5 (format "%.2f seconds" 5 (format "%.2f seconds"
6 (float-time 6 (float-time
7 (time-subtract after-init-time before-init-time))) 7 (time-subtract after-init-time before-init-time)))
8 gcs-done)) 8 gcs-done))
9 9
10(defun jd/startup () 10(defun jd/startup ()
@@ -27,23 +27,23 @@
27(setq user-emacs-directory "~/.cache/emacs") 27(setq user-emacs-directory "~/.cache/emacs")
28 28
29(require 'package) 29(require 'package)
30 (setq package-archives '(("melpa" . "https://melpa.org/packages/") 30(setq package-archives '(("melpa" . "https://melpa.org/packages/")
31 ("org" . "https://orgmode.org/elpa/") 31 ("org" . "https://orgmode.org/elpa/")
32 ("gnu-devel" . "https://elpa.gnu.org/devel/") 32 ("gnu-devel" . "https://elpa.gnu.org/devel/")
33 ("elpa" . "https://elpa.gnu.org/packages/"))) 33 ("elpa" . "https://elpa.gnu.org/packages/")))
34 (package-initialize) 34(package-initialize)
35 35
36 (unless package-archive-contents 36(unless package-archive-contents
37 (package-refresh-contents)) 37 (package-refresh-contents))
38 38
39 (unless (package-installed-p 'use-package) 39(unless (package-installed-p 'use-package)
40 (package-install 'use-package)) 40 (package-install 'use-package))
41 41
42;; (setq use-package-always-ensure t) 42(setq use-package-always-ensure t)
43 43
44 (add-to-list 'load-path ".config/emacs/jd/") 44(add-to-list 'load-path ".config/emacs/jd/")
45 45
46 (require 'use-package) 46(require 'use-package)
47 47
48(use-package general 48(use-package general
49 :config 49 :config
@@ -135,7 +135,7 @@
135 ("C-k" . ivy-previous-line) 135 ("C-k" . ivy-previous-line)
136 ("C-j" . ivy-next-line) 136 ("C-j" . ivy-next-line)
137 :map ivy-switch-buffer-map 137 :map ivy-switch-buffer-map
138 ("C-k" . ivy-previous-line)) 138 ("C-k" . ivy-previous-line))
139 :config 139 :config
140 (ivy-mode 1)) 140 (ivy-mode 1))
141 141
@@ -405,10 +405,10 @@
405 :after lsp) 405 :after lsp)
406 406
407(defun jd/python-mode-setup () 407(defun jd/python-mode-setup ()
408 (let ((project-venv-path (concat (projectile-project-root) "venv/"))) 408 (let ((project-venv-path (concat (projectile-project-root) "venv/")))
409 (when (projectile--directory-p project-venv-path) 409 (when (projectile--directory-p project-venv-path)
410 (pyvenv-activate project-venv-path) 410 (pyvenv-activate project-venv-path)
411 (pyvenv-mode)))) 411 (pyvenv-mode))))
412 412
413;; (use-package python-mode ;;TODO: find alternative 413;; (use-package python-mode ;;TODO: find alternative
414;; :hook (python-mode . lsp-deferred) 414;; :hook (python-mode . lsp-deferred)
@@ -416,8 +416,8 @@
416;; :config 416;; :config
417;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) 417;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)))
418 418
419 (use-package pyvenv 419(use-package pyvenv
420 :after python-mode) 420 :after python-mode)
421 421
422(use-package typescript-mode 422(use-package typescript-mode
423 :mode ("\\.ts\\'") 423 :mode ("\\.ts\\'")
@@ -465,9 +465,9 @@
465 :after lsp-mode 465 :after lsp-mode
466 :hook (lsp-mode . company-mode) 466 :hook (lsp-mode . company-mode)
467 :bind (:map company-active-map 467 :bind (:map company-active-map
468 ("<tab>" . company-complete-selection)) 468 ("<tab>" . company-complete-selection))
469 (:map lsp-mode-map 469 (:map lsp-mode-map
470 ("<tab>" . company-indent-or-complete-common)) 470 ("<tab>" . company-indent-or-complete-common))
471 :custom 471 :custom
472 (company-minimum-prefix-length 1) 472 (company-minimum-prefix-length 1)
473 (company-idle-delay 0.0) 473 (company-idle-delay 0.0)
@@ -551,8 +551,6 @@
551 551
552(use-package dired-ranger) 552(use-package dired-ranger)
553 553
554(use-package dired-single)
555
556(use-package dired 554(use-package dired
557 :ensure nil 555 :ensure nil
558 :commands (dired dired-jump) 556 :commands (dired dired-jump)
@@ -565,7 +563,7 @@
565 "h" 'dired-up-directory 563 "h" 'dired-up-directory
566 "t" 'dired-create-empty-file 564 "t" 'dired-create-empty-file
567 "T" 'dired-toggle-marks 565 "T" 'dired-toggle-marks
568 "l" 'dired-single-buffer) 566 "l" 'dired-find-file)
569 (setq dired-kill-when-opening-new-dired-buffer t) 567 (setq dired-kill-when-opening-new-dired-buffer t)
570 (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer)) 568 (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer))
571 569
diff --git a/.config/emacs/jd/jd-mu4e.el b/.config/emacs/jd/jd-mu4e.el
index 084354d..cda39f2 100644
--- a/.config/emacs/jd/jd-mu4e.el
+++ b/.config/emacs/jd/jd-mu4e.el
@@ -1,8 +1,4 @@
1(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") 1(use-package org-msg)
2
3
4(use-package org-msg
5 :ensure t)
6 2
7(use-package mu4e 3(use-package mu4e
8 :defer 20 4 :defer 20
@@ -33,18 +29,18 @@
33 (mu4e-sent-messages-behavior . sent) 29 (mu4e-sent-messages-behavior . sent)
34 )) 30 ))
35 ,(make-mu4e-context 31 ,(make-mu4e-context
36 :name "Gmail" 32 :name "Gmail"
37 :match-func (lambda (msg) (when msg 33 :match-func (lambda (msg) (when msg
38 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) 34 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
39 :vars '( 35 :vars '(
40 (user-full-name . "Jakub Dlugosz") 36 (user-full-name . "Jakub Dlugosz")
41 (user-mail-address . "jdlugosz963@gmail.pl") 37 (user-mail-address . "jdlugosz963@gmail.pl")
42 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane") 38 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
43 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz") 39 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
44 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze") 40 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
45 (mu4e-refile-folder . "/gmail/Archive") 41 (mu4e-refile-folder . "/gmail/Archive")
46 (mu4e-sent-messages-behavior . sent) 42 (mu4e-sent-messages-behavior . sent)
47 )))) 43 ))))
48 44
49 (setq mail-user-agent 'mu4e-user-agent 45 (setq mail-user-agent 'mu4e-user-agent
50 message-send-mail-function 'smtpmail-send-it 46 message-send-mail-function 'smtpmail-send-it