added debug capability to Doom Emacs and python debug config

This commit is contained in:
paul-loedige
2024-01-09 17:07:28 +01:00
parent 6b6d6ec4f3
commit 1b828968c1
+41 -26
View File
@@ -28,11 +28,13 @@
- [[#org-mode][Org Mode]] - [[#org-mode][Org Mode]]
- [[#default-location][Default Location]] - [[#default-location][Default Location]]
- [[#visual][Visual]] - [[#visual][Visual]]
- [[#org-agenda-setup][Org Agenda Setup]]
- [[#caldav-sync][CalDAV Sync]] - [[#caldav-sync][CalDAV Sync]]
- [[#org-agenda-setup][Org Agenda Setup]]
- [[#org-roam][Org Roam]] - [[#org-roam][Org Roam]]
- [[#org-transclusion][Org Transclusion]] - [[#org-transclusion][Org Transclusion]]
- [[#bibliography][Bibliography]] - [[#bibliography][Bibliography]]
- [[#python][Python]]
- [[#set-debugger-to-debugpy][Set Debugger to debugpy]]
* Config File Headers * Config File Headers
We start by simply defining the standard headers used by the three files. These headers come from the initial files generated by =doom install=, and contain either some Emacs-LISP relevant indicators like =lexical-binding=, or instructions about the contents of the file. We start by simply defining the standard headers used by the three files. These headers come from the initial files generated by =doom install=, and contain either some Emacs-LISP relevant indicators like =lexical-binding=, or instructions about the contents of the file.
@@ -260,7 +262,7 @@ We start by simply defining the standard headers used by the three files. These
;;ansible ;;ansible
biblio ; Writes a PhD for you (citation needed) biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends ;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs (debugger +lsp) ; FIXME stepping through code, to help you add bugs
;;direnv ;;direnv
;;docker ;;docker
;;editorconfig ; let someone else argue about tabs vs spaces ;;editorconfig ; let someone else argue about tabs vs spaces
@@ -278,7 +280,7 @@ We start by simply defining the standard headers used by the three files. These
;;taskrunner ; taskrunner for all your projects ;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code ;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux ;;tmux ; an API for interacting with tmux
;;tree-sitter ; syntax and parsing, sitting in a tree... tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp ;;upload ; map local to remote projects via ssh/ftp
:os :os
@@ -330,7 +332,7 @@ We start by simply defining the standard headers used by the three files. These
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional
python ; beautiful is better than ugly (python +conda +lsp +pyright +pyenv +tree-sitter) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
@@ -367,6 +369,8 @@ We start by simply defining the standard headers used by the three files. These
(default +bindings +smartparens)) (default +bindings +smartparens))
#+end_src #+end_src
#+RESULTS:
* General Configuration * General Configuration
** User Information ** User Information
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
@@ -461,26 +465,6 @@ This function could also become useful if we ever want to extend the compile com
(setq org-startup-latex-with-latex-preview t)) (setq org-startup-latex-with-latex-preview t))
#+end_src #+end_src
** Org Agenda Setup
*** Progress States
To get a more nuanced overview of my current TODOs I add more progress states.
| | TODO | BLOCKED | IN_PROGRESS | REVIEW | TESTING | | DONE | DELEGATED | CANCELED |
|------------+------+---------+-------------+--------+---------+---+------+-----------+----------|
| Access Key | t | b | i | r | t | | d | | c |
| Log Type | time | note | time | note | note | | time | note | note |
#+begin_src emacs-lisp :tangle config.el
(after! org
(setq org-todo-keywords
'((sequence "TODO(t!)" "IN_PROGRESS(i!)" "BLOCKED(b@)" "REVIEW(r@)" "TESTING(t@)" "|" "DONE(d!)" "DELEGATED(!)" "CANCELED(c@)"))))
#+end_src
*** Add "~/org" to Agenda
#+begin_src emacs-lisp :tangle config.el
(after! org
(setq org-agenda-files (f-files "~/org"
(lambda (f)
(string= (f-ext f) "org"))
'recursive)))
#+end_src
** CalDAV Sync ** CalDAV Sync
[[https://github.com/dengste/org-caldav][org-caldav]] provides a tool for syncing with a CalDAV server (in my case Nextcloud). [[https://github.com/dengste/org-caldav][org-caldav]] provides a tool for syncing with a CalDAV server (in my case Nextcloud).
A lot of the config is also taken from [[https://www.reddit.com/r/orgmode/comments/8rl8ep/comment/e0sb5j0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button][this]] reddit post. A lot of the config is also taken from [[https://www.reddit.com/r/orgmode/comments/8rl8ep/comment/e0sb5j0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button][this]] reddit post.
@@ -492,10 +476,8 @@ A lot of the config is also taken from [[https://www.reddit.com/r/orgmode/commen
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(after! org-caldav (after! org-caldav
(setq org-icalendar-include-todo 'all (setq org-icalendar-include-todo 'all
org-caldav-todo-percent-states '((0 "TODO") (1 "IN_PROGRESS") (2 "BLOCKED") (90 "REVIEW") (90 "TESTING") (100 "DONE") (100 "DELEGATED") (100 "CANCELED"))
org-caldav-sync-todo t)) org-caldav-sync-todo t))
#+end_src #+end_src
*** Configure Sync *** Configure Sync
add the calendars to the org-caldav config add the calendars to the org-caldav config
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
@@ -505,6 +487,31 @@ add the calendars to the org-caldav config
(setq org-caldav-calendars (setq org-caldav-calendars
'((:calendar-id "todo" :files ("~/org/todo.org"))))) '((:calendar-id "todo" :files ("~/org/todo.org")))))
#+end_src #+end_src
** Org Agenda Setup
*** Progress States
To get a more nuanced overview of my current TODOs I add more progress states.
| | TODO | BLOCKED | IN_PROGRESS | REVIEW | TESTING | | DONE | DELEGATED | CANCELED |
|------------+------+---------+-------------+--------+---------+---+------+-----------+----------|
| Access Key | t | b | i | r | t | | d | | c |
| Log Type | time | note | time | note | note | | time | note | note |
#+begin_src emacs-lisp :tangle config.el
(after! org
(setq org-todo-keywords
'((sequence "INACTIVE(i!)" "TODO(t!)" "IN_PROGRESS(p!)" "BLOCKED(b@)" "REVIEW(r@)" "TESTING(e@)" "|" "DONE(d!)" "DELEGATED(x@)" "CANCELED(c@)"))))
#+end_src
Also set the percent states for [[*CalDAV Sync][CalDAV Sync]]
#+begin_src emacs-lisp :tangle config.el
(after! org-caldav
(setq org-caldav-todo-percent-states '((0 "INACTIVE") (1 "TODO") (2 "IN_PROGRESS") (3 "BLOCKED") (90 "REVIEW") (90 "TESTING") (100 "DONE") (100 "DELEGATED") (100 "CANCELED"))))
#+end_src
*** Add "~/org" to Agenda
#+begin_src emacs-lisp :tangle config.el
(after! org
(setq org-agenda-files (f-files "~/org"
(lambda (f)
(string= (f-ext f) "org"))
'recursive)))
#+end_src
** Org Roam ** Org Roam
*** set base directory *** set base directory
Both the org files themselves and the database should be located in the same directory to enable syncing via Nextcloud Both the org files themselves and the database should be located in the same directory to enable syncing via Nextcloud
@@ -585,3 +592,11 @@ In [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#citar]
(after! citar (after! citar
(add-to-list 'citar-file-open-functions '("pdf" . citar-file-open-external))) (add-to-list 'citar-file-open-functions '("pdf" . citar-file-open-external)))
#+end_src #+end_src
* Python
** Set Debugger to debugpy
as per the [[https://github.com/doomemacs/doomemacs/tree/master/modules/tools/debugger#dap-python][Doom Emacs Documentation]] it is recommended to set the debugger used for python debugging to debugpy
#+begin_src emacs-lisp :tangle config.el
(after! dap-mode
(setq dap-python-debugger 'debugpy))
#+end_src