diff --git a/config.org b/config.org index 97c632a..47244b1 100644 --- a/config.org +++ b/config.org @@ -1805,34 +1805,37 @@ Source: [[https://www.flycheck.org][flycheck.org]] :init (global-flycheck-mode)) #+end_src -** eglot +** lsp -A client for Language Server Protocol servers +Language Server Protocoll capabilities for Emacs -Source: [[https://github.com/joaotavora/eglot][GitHub:joaotavora/eglot]] +Source: [[https://github.com/emacs-lsp/lsp-mode][GitHub:emacs-lsp/lsp-mode]] #+begin_src emacs-lisp -(use-package eglot - :hook ((python-mode . eglot-ensure) - (go-mode . eglot-ensure) - (php-mode . eglot-ensure) - (vue-mode . eglot-ensure) - (web-mode . eglot-ensure) - (typescript-mode . eglot-ensure) - (js-mode . eglot-ensure)) - :commands (eglot eglot-ensure)) -#+end_src +(use-package lsp-mode + :hook ((python-mode . lsp-deferred) + (go-mode . lsp-deferred) + (php-mode . lsp-deferred) + (vue-mode . lsp-deferred) + (web-mode . lsp-deferred) + (typescript-mode . lsp-deferred) + (js-mode . lsp-deferred) + (lsp-mode . lsp-enable-which-key-integration)) + :commands (lsp lsp-deferred) + :init (setq lsp-keymap-prefix "C-c C-l") + :config (setq lsp-prefer-capf t)) -** eldoc-box +(use-package lsp-ui + :commands lsp-ui-mode + :config + (setq lsp-ui-sideline-show-code-actions t + lsp-ui-sideline-show-hover t)) -childframe doc for eglot and anything that uses eldoc. +(use-package lsp-ivy + :commands lsp-ivy-workspace-symbol) -Source: [[https://github.com/casouri/eldoc-box][GitHub:casouri/eldoc-box]] - -#+begin_src emacs-lisp -(use-package eldoc-box - :after eglot - :hook ((eglot-managed-mode . eldoc-box-hover-at-point-mode))) +(use-package lsp-treemacs + :commands lsp-treemacs-errors-list) #+end_src ** editorconfig @@ -2103,9 +2106,6 @@ Source: [[https://github.com/akermu/emacs-libvterm][GitHub: akermu/emacs-libvter Let's try out eshell. -Resources: -- [[https://www.masteringemacs.org/article/complete-guide-mastering-eshell][Mikey Petersen: Mastering Eshell]] - #+begin_src emacs-lisp (use-package eshell :bind (("C-c s" . 'eshell))) @@ -2195,10 +2195,6 @@ Emacs client for Mastodon. Managing e-mails is maybe one of the most critical tasks in my life. Over the last years I tried countless different clients, including the famous (neo)mutt, KMail, and Thunderbird. But it seems that I always go back to one specific: mu4e. Maybe because it is integrated in Emacs and Org-mode, maybe because I like using a keyboard-focused client and that's where I end. I don't now. But what I know is: I enjoy using it! -Resources: -- [[https://sites.uw.edu/bxf4/2022/09/01/getting-uw-outlook-365-oauth2-to-work-with-emacs-mu4e-mbsync-and-msmtp/][Getting UW Outlook 365 OAUTH2 to work with emacs, mu4e, mbsync, and msmtp]] -- [[https://github.com/harishkrupo/oauth2ms][harishkrupo/oauth2ms]] - ** Load mu4e Not all systems that I use have mu/mu4e installed. Either because I cannot really use it at work or because I'm running a native Windows instance or because I didn't completely setup the machine. Therefore I only load/execute the complete mu4e configuration if Emacs can find a =mu= executable. diff --git a/packages/mmk2410-tab-bar-helpers.el b/packages/mmk2410-tab-bar-helpers.el index 7a0bf30..10285d2 100644 --- a/packages/mmk2410-tab-bar-helpers.el +++ b/packages/mmk2410-tab-bar-helpers.el @@ -1,12 +1,6 @@ -;;; tab-bar-helpers.el --- Helpers for using tab-bar mode -*- lexical-binding: t; -*- - -;;; Commentary: -;;; Personal helpers and shortcuts to work more effectively with tab-bar mode. - -;;; Code: +;;; tab-bar-helpers.el -*- lexical-binding: t; -*- (defun mmk2410/tab-bar-new-tab (name func) - "Create new tab using FUNC with name NAME." (when (eq nil tab-bar-mode) (tab-bar-mode)) (tab-bar-new-tab) @@ -14,30 +8,25 @@ (funcall func)) (defun mmk2410/tab-bar-tab-exists (name) - "Check whether a tab named NAME exists." (member name (mapcar #'(lambda (tab) (alist-get 'name tab)) (tab-bar-tabs)))) (defun mmk2410/tab-bar-switch-or-create (name func) - "Switch to tab with name NAME or create one using FUNC." (if (mmk2410/tab-bar-tab-exists name) (tab-bar-switch-to-tab name) (mmk2410/tab-bar-new-tab name func))) +(defun mmk2410/tab-bar-run-elfeed () + (interactive) + (mmk2410/tab-bar-switch-or-create "RSS" #'elfeed)) + (defun mmk2410/tab-bar-new-named-tab (name) - "Create new tab with named NAME." (interactive "sTab Name: ") (tab-bar-new-tab) (tab-bar-rename-tab name)) -(defun mmk2410/tab-bar-run-elfeed () - "Switch to or start elfeed." - (interactive) - (mmk2410/tab-bar-switch-or-create "RSS" #'elfeed)) - (defun mmk2410/tab-bar-run-mail () - "Switch to or start mu4e." (interactive) (mmk2410/tab-bar-switch-or-create "Mail" @@ -46,7 +35,6 @@ (mu4e)))) (defun mmk2410/tab-bar-run-irc () - "Switch to or start ERC session." (interactive) (mmk2410/tab-bar-switch-or-create "IRC" @@ -56,15 +44,6 @@ (switch-to-buffer "Libera.Chat")))) (defun mmk2410/tab-bar-run-agenda () - "Switch to or open agenda tab." - (interactive) - (mmk2410/tab-bar-switch-or-create - "Agenda" - #'(lambda () - (org-agenda nil "d")))) - -(defun mmk2410/tab-bar-run-agenda-journal () - "Switch to or open agenda+journal tab." (interactive) (mmk2410/tab-bar-switch-or-create "Agenda" @@ -76,49 +55,44 @@ (org-roam-dailies-goto-today)))) (defun mmk2410/tab-bar-run-journal () - "Switch to or create org-roam daily journal." (interactive) (mmk2410/tab-bar-switch-or-create "Journal" #'org-roam-dailies-goto-today)) +(defun mmk2410/tab-bar-run-projects () + (interactive) + (mmk2410/tab-bar-switch-or-create + "Projects" + #'(lambda () + (find-file "~/org/projects.org")))) + (defun mmk2410/tab-bar-run-mastodon () - "Switch to or create a tab running mastodon.el." + "Switch or create a tab running mastodon.el." (interactive) (mmk2410/tab-bar-switch-or-create "Mastodon" #'mastodon)) -(defun mmk2410/tab-bar-run-vterm () - "Switch to or create a tab running a shell using vterm." - (interactive) - (mmk2410/tab-bar-switch-or-create "term" #'vterm)) - (defhydra mmk2410/tab-bar (:color teal :hint nil) " - ^Apps^ ^Org^ ^Helpers^ ^Misc ---^^^^^^--------------------------------------------------------------------------- - _e_: RSS (Elfeed) _a_: Agenda _RET_: Search _q_: Cancel - _m_: Mail _A_: Agenda + Journal _SPC_: New - _i_: IRC (erc) _j_: Journal _f_: Previous Tab - _M_: Mastodon _Q_: Close Tab - _t_: vterm + ^Apps^ ^Org^ ^Helpers^ ^Misc +--^^^^^^----------------------------------------------------------------- + _e_: RSS (Elfeed) _a_: Agenda _RET_: Search _q_: Cancel + _m_: Mail _j_: Journal _SPC_: New + _i_: IRC (erc) _p_: Projects _f_: Previous Tab + _M_: Mastodon _Q_: Close Tab " - ;; Apps - ("e" mmk2410/tab-bar-run-elfeed) - ("m" mmk2410/tab-bar-run-mail) - ("i" mmk2410/tab-bar-run-irc) - ("M" mmk2410/tab-bar-run-mastodon) - ("t" mmk2410/tab-bar-run-vterm) - ;; Org ("a" mmk2410/tab-bar-run-agenda) - ("A" mmk2410/tab-bar-run-agenda-journal) + ("e" mmk2410/tab-bar-run-elfeed) + ("i" mmk2410/tab-bar-run-irc) ("j" mmk2410/tab-bar-run-journal) - ;; Helpers + ("m" mmk2410/tab-bar-run-mail) + ("p" mmk2410/tab-bar-run-projects) + ("M" mmk2410/tab-bar-run-mastodon) ("RET" tab-bar-select-tab-by-name) ("SPC" mmk2410/tab-bar-new-named-tab) ("f" tab-bar-switch-to-recent-tab) ("Q" tab-bar-close-tab) - ;; Misc ("q" nil)) (provide 'mmk2410-tab-bar-helpers)