diff --git a/config.org b/config.org index 5b3778b..730b31d 100644 --- a/config.org +++ b/config.org @@ -76,10 +76,13 @@ Use a sane date style. (setq calendar-date-style 'european) #+end_src -** Turn off backup files +** Turn off backup and lock files + +Lock files don't play nice with npm. #+begin_src emacs-lisp (setq-default backup-inhibited t) +(setq create-lockfiles nil) #+end_src ** Performance tweaks @@ -87,7 +90,7 @@ Use a sane date style. As recommended by [[https://emacs-lsp.github.io/lsp-mode/page/performance/][lsp-mode]], #+begin_src emacs-lisp -(setq gc-cons-threshold 100000000 +(setq gc-cons-threshold (* 100 1024 1024) read-process-output-max (* 1024 1024)) #+end_src @@ -583,6 +586,15 @@ An even better integration may be achieved when additionall using the [[https:// :config (evil-collection-init)) #+end_src +Additional I like to press =jk= for exiting normal mode, using [[https://github.com/emacsorphanage/key-chord/][key-chord]] this is possible. + +#+begin_src emacs-lisp +(use-package key-chord + :config + (key-chord-define evil-insert-state-map "jk" 'evil-normal-state) + (key-chord-mode 1)) +#+end_src + * General packages ** diminish-mode @@ -1123,10 +1135,10 @@ Make the column for categories wider. #+begin_src emacs-lisp (setq org-agenda-prefix-format - '((agenda . " %i %-18:c%?-12t% s") - (todo . " %i %-18:c") - (tags . " %i %-18:c") - (search . " %i %-18:c"))) + '((agenda . " %i %?-12t% s") + (todo . " %i") + (tags . " %i") + (search . " %i"))) #+end_src Finally define the org-agenda display using [[https://github.com/alphapapa/org-super-agenda][org-super-agenda]] by alphapapa. @@ -1230,7 +1242,8 @@ Until now I did not think that I needed to keep a (personal) journal. But since (use-package org-journal :config (setq org-journal-dir "~/org/journal" org-journal-file-type 'monthly - org-journal-find-file 'find-file) + org-journal-find-file 'find-file + org-journal-file-format "%Y-%m-%d.org") :bind (("C-c j j" . 'org-journal-new-entry) ("C-c j s" . 'org-journal-new-scheduled-entry) ("C-c j o" . 'org-journal-open-current-journal-file) @@ -1349,8 +1362,6 @@ Source: [[https://github.com/org-roam/org-roam-bibtex][GitHub: org-roam/org-roam ** Org Roam UI -*Disabled since =org-roam-ui= is not yet released on Melpa.* And I currently have no time to setup or switch to =straight= (or to put it better: it is currently not important enough for me). - A graphical frontend for exploring your org-roam Zettelkasten Source: [[https://github.com/org-roam/org-roam-ui][GitHub: org-roam/org-roam-ui]] @@ -1498,6 +1509,17 @@ Source: [[https://github.com/company-mode/company-mode][GitHub: company-mode]] company-dabbrev-downcase nil)) #+end_src +** flycheck + +Flycheck is a syntax checking extension for Emacs which uses specialized command line tools for the languages it supports. Next to the linting and highlighting of errors it does on its own it also integrates nicely into lsp-mode. + +Source: [[https://www.flycheck.org][flycheck.org]] + +#+begin_src emacs-lisp +(use-package flycheck + :init (global-flycheck-mode)) +#+end_src + ** lsp Language Server Protocoll capabilities for Emacs @@ -1515,12 +1537,14 @@ Source: [[https://github.com/emacs-lsp/lsp-mode][GitHub:emacs-lsp/lsp-mode]] (js-mode . lsp-deferred) (lsp-mode . lsp-enable-which-key-integration)) :commands (lsp lsp-deferred) - :config - (setq lsp-keymap-prefix "C-s-l" - lsp-prefer-capf t)) + :init (setq lsp-keymap-prefix "C-c C-l") + :config (setq lsp-prefer-capf t)) (use-package lsp-ui - :commands lsp-ui-mode) + :commands lsp-ui-mode + :config + (setq lsp-ui-sideline-show-code-actions t + lsp-ui-sideline-show-hover t)) (use-package lsp-ivy :commands lsp-ivy-workspace-symbol) @@ -1585,7 +1609,19 @@ Source: [[https://github.com/emacs-typescript/typescript.el][GitHub: emacs-types #+begin_src emacs-lisp (use-package typescript-mode - :mode "\\.ts\\'") + :mode "\\.ts\\'" + :config + (setq typescript-indent-level 2)) +#+end_src + +** JavaScript + +Load the built-in JavaScript mode to set it's indentation. + +#+begin_src emacs-lisp +(use-package js + :config + (setq js-indent-level 2)) #+end_src ** Web Mode @@ -1608,7 +1644,10 @@ Source: [[https://github.com/fxbois/web-mode][GitHub: fxbois/web-mode]] :config (setq web-mode-script-padding 0) (setq web-mode-code-indent-offset 2) - (setq web-mode-markup-indent-offset 2)) + (setq web-mode-markup-indent-offset 2) + (setq web-mode-css-indent-offset 2) + (setq web-mode-style-padding 0) + (setq web-mode-enable-comment-annotation t)) #+end_src ** YAML diff --git a/packages/mmk2410-tab-bar-helpers.el b/packages/mmk2410-tab-bar-helpers.el index 8981ec5..6e45501 100644 --- a/packages/mmk2410-tab-bar-helpers.el +++ b/packages/mmk2410-tab-bar-helpers.el @@ -48,7 +48,11 @@ (mmk2410/tab-bar-switch-or-create "Agenda" #'(lambda () - (org-agenda nil "a")))) + (org-agenda nil "c") + (sit-for 1) + (split-window-horizontally) + (other-window 1) + (org-journal-open-current-journal-file)))) (defun mmk2410/tab-bar-run-journal () (interactive) @@ -61,7 +65,7 @@ (mmk2410/tab-bar-switch-or-create "Projects" #'(lambda () - (find-file "~/org/work.projects.org")))) + (find-file "~/org/projects.org")))) (defhydra mmk2410/tab-bar (:color teal :hint nil) "