diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-02 13:22:20 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-02 13:22:20 +0200 |
commit | f343690367dc97bde5abdb86767ea63e306d9bb6 (patch) | |
tree | 98cce308357eb6a93739a97555696c754da77e29 /.config/emacs/init.el | |
parent | 8ba40ae548b6a491b805107f995bf10318bcd98f (diff) | |
download | dotfiles-f343690367dc97bde5abdb86767ea63e306d9bb6.tar.gz dotfiles-f343690367dc97bde5abdb86767ea63e306d9bb6.zip |
Update auto generated config files
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r-- | .config/emacs/init.el | 56 |
1 files changed, 43 insertions, 13 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 363c125..f4df588 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el | |||
@@ -7,7 +7,12 @@ | |||
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 | (add-hook 'emacs-startup-hook #'jd/display-startup-time) | 10 | (defun jd/startup () |
11 | (electric-pair-mode 1) | ||
12 | (global-company-mode 1) | ||
13 | (jd/display-startup-time)) | ||
14 | |||
15 | (add-hook 'emacs-startup-hook #'jd/startup) | ||
11 | 16 | ||
12 | (setq user-full-name "Jakub Dlugosz" | 17 | (setq user-full-name "Jakub Dlugosz" |
13 | user-mail-address "jdlugosz963@gmail.com") | 18 | user-mail-address "jdlugosz963@gmail.com") |
@@ -93,6 +98,7 @@ | |||
93 | (define-key evil-normal-state-map (kbd ".") '()) | 98 | (define-key evil-normal-state-map (kbd ".") '()) |
94 | 99 | ||
95 | (setq inhibit-startup-message t) | 100 | (setq inhibit-startup-message t) |
101 | (setq visible-bell t) | ||
96 | (scroll-bar-mode -1) | 102 | (scroll-bar-mode -1) |
97 | (tool-bar-mode -1) | 103 | (tool-bar-mode -1) |
98 | (tooltip-mode -1) | 104 | (tooltip-mode -1) |
@@ -420,24 +426,42 @@ | |||
420 | (let ((django-mode-object (rassq 'django-mode auto-mode-alist))) | 426 | (let ((django-mode-object (rassq 'django-mode auto-mode-alist))) |
421 | (setq auto-mode-alist (delete django-mode-object auto-mode-alist))))) | 427 | (setq auto-mode-alist (delete django-mode-object auto-mode-alist))))) |
422 | 428 | ||
423 | (use-package lsp-java | ||
424 | :config (add-hook 'java-mode-hook 'lsp)) | ||
425 | |||
426 | (use-package typescript-mode | 429 | (use-package typescript-mode |
430 | :mode ("\\.ts\\'") | ||
427 | :config | 431 | :config |
428 | (setq typescript-indent-level 2) | 432 | (setq typescript-indent-level 2)) |
429 | (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))) | 433 | |
434 | (defun jd/activate-tide-mode () | ||
435 | (when (and (stringp buffer-file-name) | ||
436 | (string-match "\\.[tj]sx?\\'" buffer-file-name)) | ||
437 | (tide-setup) | ||
438 | (tide-hl-identifier-mode))) | ||
430 | 439 | ||
431 | (use-package tide | 440 | (use-package tide |
432 | :ensure t | 441 | :ensure t |
433 | :after (typescript-mode company) | 442 | :after (typescript-mode company web-mode)) |
434 | :hook ((typescript-mode . tide-setup) | ||
435 | (typescript-mode . tide-hl-identifier-mode))) | ||
436 | 443 | ||
437 | (use-package flycheck | 444 | (use-package flycheck |
438 | :ensure t | 445 | :ensure t |
439 | :hook ((after-init . global-flycheck-mode))) | 446 | :hook ((after-init . global-flycheck-mode))) |
440 | 447 | ||
448 | (use-package web-mode | ||
449 | :ensure t | ||
450 | :hook ((web-mode . jd/activate-tide-mode)) | ||
451 | :mode | ||
452 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | ||
453 | :config | ||
454 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) | ||
455 | (setq web-mode-markup-indent-offset 2) | ||
456 | (setq web-mode-css-indent-offset 2) | ||
457 | (setq web-mode-code-indent-offset 2) | ||
458 | (setq web-mode-script-padding 2) | ||
459 | (setq web-mode-block-padding 2) | ||
460 | (setq web-mode-style-padding 2) | ||
461 | (setq web-mode-enable-auto-pairing t) | ||
462 | (setq web-mode-enable-auto-closing t) | ||
463 | (setq web-mode-enable-current-element-highlight t)) | ||
464 | |||
441 | (use-package yaml-mode) | 465 | (use-package yaml-mode) |
442 | 466 | ||
443 | (use-package docker) | 467 | (use-package docker) |
@@ -567,9 +591,11 @@ | |||
567 | "p" 'dired-ranger-paste | 591 | "p" 'dired-ranger-paste |
568 | "X" 'dired-ranger-move | 592 | "X" 'dired-ranger-move |
569 | "h" 'dired-up-directory | 593 | "h" 'dired-up-directory |
570 | "l" 'dired-single-buffer | 594 | "t" 'dired-create-empty-file |
571 | "q" 'kill-current-buffer) | 595 | "T" 'dired-toggle-marks |
572 | (setq dired-kill-when-opening-new-dired-buffer t)) | 596 | "l" 'dired-single-buffer) |
597 | (setq dired-kill-when-opening-new-dired-buffer t) | ||
598 | (evil-define-key 'normal dired-mode-map (kbd "q") 'kill-current-buffer)) | ||
573 | 599 | ||
574 | (use-package emms | 600 | (use-package emms |
575 | :config | 601 | :config |
@@ -585,7 +611,11 @@ | |||
585 | 611 | ||
586 | (use-package pdf-tools) | 612 | (use-package pdf-tools) |
587 | 613 | ||
588 | ;; Load my mu4e config | ||
589 | (require 'jd-mu4e) | 614 | (require 'jd-mu4e) |
590 | 615 | ||
616 | (use-package elfeed | ||
617 | :config | ||
618 | (setq elfeed-feeds | ||
619 | '("https://www.reddit.com/r/emacs.rss"))) | ||
620 | |||
591 | (setq gc-cons-threshold (* 2 1000 1000)) | 621 | (setq gc-cons-threshold (* 2 1000 1000)) |