From fdbcc61ee5c0eec68cefc0d350385f2b5b793513 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 21 May 2022 06:34:08 -0500 Subject: [PATCH] fixing org roam and adding eglot instead of lsp-mode --- README.org | 27 ++++++++++++++++++------ init.el | 60 ++++++++---------------------------------------------- 2 files changed, 30 insertions(+), 57 deletions(-) diff --git a/README.org b/README.org index 27398616..68702695 100644 --- a/README.org +++ b/README.org @@ -633,8 +633,7 @@ Part of this config includes some special capture templates for my work as a you '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)")) org-agenda-files - '("/home/chris/org/todo/inbox.org" - "/home/chris/org/todo/notes.org" + '("/home/chris/org/todo/notes.org" "/home/chris/org/repetition.org" "/home/chris/org/tfc_plans.org" "/home/chris/org/ministry_team.org" @@ -810,7 +809,7 @@ We also need to setup some capture templates to use some specific setups with my org-roam-capture-templates '(("d" "default" plain "%?" :if-new (file+head "${slug}.org" - "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\nj ") + "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n * %?") :unnarrowed t) ("b" "bible" plain "%?" :if-new (file+head "${slug}.org" @@ -824,7 +823,10 @@ We also need to setup some capture templates to use some specific setups with my '(("d" "daily" plain #'org-roam-capture--get-point "" :immediate-finish t :file-name "%<%Y-%m-%d>" - :head "#+TITLE: %<%Y-%m-%d>\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* HFL\n* Tasks\n* Family\n** How Do I Love Abbie?") + :head "#+TITLE: %<%Y-%m-%d>\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* HFL\n* Tasks\n* Family\n** How Do I Love Abbie?" + :if-new (file+head "%<%Y-%m-%d>.org" + "#+TITLE: %<%Y-%m-%d>\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* HFL\n* Tasks\n* Family\n** How Do I Love Abbie?") + ) ("b" "biblical daily" plain #'org-roam-capture--get-point "" :immediate-finish t :file-name "%<%Y-%m-%d>-bib" @@ -1912,7 +1914,7 @@ I've been transitioning more of my OS to NixOS. Let's get =nix-mode= working. *** LSP LSP is useful... -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package lsp-mode :commands (lsp lsp-deferred) :custom @@ -1928,7 +1930,8 @@ LSP is useful... :config (setq lsp-lens-enable t lsp-signature-auto-activate nil - read-process-output-max (* 1024 1024)) + read-process-output-max (* 1024 1024) + lsp-clangd-binary-path "/run/current-system/sw/bin/clangd") (lsp-enable-which-key-integration t) (add-to-list 'lsp-language-id-configuration '(qml-mode . "qml")) (lsp-register-client @@ -1946,6 +1949,18 @@ LSP is useful... (use-package lsp-treemacs :after lsp) + +(use-package consult-lsp + :after lsp) +#+end_src + +*** Eglot +Let's give eglot a try. +#+begin_src emacs-lisp +(use-package eglot + :commands eglot + :hook + (c++-mode . eglot)) #+end_src *** Fennel diff --git a/init.el b/init.el index 8dcc721b..89efdf69 100644 --- a/init.el +++ b/init.el @@ -433,8 +433,7 @@ '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)") (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)")) org-agenda-files - '("/home/chris/org/todo/inbox.org" - "/home/chris/org/todo/notes.org" + '("/home/chris/org/todo/notes.org" "/home/chris/org/repetition.org" "/home/chris/org/tfc_plans.org" "/home/chris/org/ministry_team.org" @@ -586,7 +585,7 @@ org-roam-capture-templates '(("d" "default" plain "%?" :if-new (file+head "${slug}.org" - "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\nj ") + "#+TITLE: ${title}\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n * %?") :unnarrowed t) ("b" "bible" plain "%?" :if-new (file+head "${slug}.org" @@ -600,7 +599,10 @@ '(("d" "daily" plain #'org-roam-capture--get-point "" :immediate-finish t :file-name "%<%Y-%m-%d>" - :head "#+TITLE: %<%Y-%m-%d>\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* HFL\n* Tasks\n* Family\n** How Do I Love Abbie?") + :head "#+TITLE: %<%Y-%m-%d>\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* HFL\n* Tasks\n* Family\n** How Do I Love Abbie?" + :if-new (file+head "%<%Y-%m-%d>.org" + "#+TITLE: %<%Y-%m-%d>\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* HFL\n* Tasks\n* Family\n** How Do I Love Abbie?") + ) ("b" "biblical daily" plain #'org-roam-capture--get-point "" :immediate-finish t :file-name "%<%Y-%m-%d>-bib" @@ -1337,39 +1339,10 @@ targets." (use-package nix-mode :mode "\\.nix\\'") -(use-package lsp-mode - :commands (lsp lsp-deferred) - :custom - (lsp-completion-provider :none) +(use-package eglot + :commands eglot :hook - (c++-mode . lsp-deferred) - (lsp-completion-mode . my/lsp-mode-setup-completion) - :init - (setq lsp-keymap-prefix "C-c l") - (defun my/lsp-mode-setup-completion () - (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) - '(flex))) - :config - (setq lsp-lens-enable t - lsp-signature-auto-activate nil - read-process-output-max (* 1024 1024)) - (lsp-enable-which-key-integration t) - (add-to-list 'lsp-language-id-configuration '(qml-mode . "qml")) - (lsp-register-client - (make-lsp-client :new-connection (lsp-stdio-connection "qml-lsp") - :activation-fn (lsp-activate-on "qml") - :server-id 'qml)) - :general - (general-def 'normal c++-mode-map - "gf" 'lsp-clangd-find-other-file)) - -(use-package lsp-ui - :hook (lsp-mode . lsp-ui-mode) - :custom - (lsp-ui-doc-position 'at-point)) - -(use-package lsp-treemacs - :after lsp) + (c++-mode . eglot)) (use-package fennel-mode :mode ("\\.fnl\\'" . fennel-mode)) @@ -2266,18 +2239,3 @@ interfere with the default `bongo-playlist-buffer'." gcmh-verbose nil)) (setq warning-suppress-types '((comp))) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(pdf-misc-print-program "/usr/bin/lpr") - '(pdf-misc-print-program-args '("-o media=Letter" "-o fitplot")) - '(safe-local-variable-values - '((eval org-odt-styles-file "/home/chris/org/tfcexpenses2020.odt")))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36"))))