Compare commits

..

3 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
4b1509acf7 Improved init performance and added configuration for LSP and DAP 2025-12-15 00:07:51 +01:00
Fabio Scotto di Santolo
457fa93727 Added package Elfeed Org in the Emacs custom config 2025-12-12 21:33:03 +01:00
Fabio Scotto di Santolo
414317c19f Fix Starship prompt 2025-12-12 21:31:29 +01:00
5 changed files with 492 additions and 165 deletions

View File

@@ -0,0 +1 @@
#s(hash-table test equal data ("/var/home/fscotto/Projects/toyforth/toyforth.c" ((:point 1061))))

16
emacs/.emacs.d/elfeed.org Normal file
View File

@@ -0,0 +1,16 @@
#+TITLE: RSS Urls
#+AUTHOR: Fabio Scotto di Santolo
#+DATE: <2025-10-25 Sat>
* root :elfeed:
** Programming :programming:
*** [[https://feeds.feedburner.com/TheHackersNews][Hacker News]] :news: :security:
** FOSS News :news:
*** [[https://blog.linuxmint.com/?feed=rss2][Linux Mint Blog]] :blog: :linux: :linuxmint:
** Youtube :youtube:
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg][DistroTube]] :emacs: :foss: :linux:
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCABhVAlCkcEG9a2UVruq9vw][Douglas Mortimer]] :fashion:
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCqZe2cxQNCvgkQxUuqsIaig][Esadecimale]] :emacs: :programming:
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCnDDucQDLncrauOCmanCIgw][MorroLinux]] :linux: :foss:
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCDDG9vOcmgwlslJJpCWjqOg][Salvatore Sanfilippo]] :programming:
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg][Tsoding Daily]] :emacs: :programming:

View File

@@ -37,8 +37,8 @@
(setq-default fill-column 120) (setq-default fill-column 120)
;; Stop Emacs from losing informations ;; Stop Emacs from losing informations
(setq undo-limit 2000000) (setq undo-limit 8000000)
(setq undo-strong-limit 4000000000) (setq undo-strong-limit 12000000)
;; Smooth scroll ;; Smooth scroll
(setq scroll-step 3) (setq scroll-step 3)
@@ -59,6 +59,29 @@
;; Setting default directory for Org files ;; Setting default directory for Org files
(setq org-directory "~/Remotes/pCloud/Org") (setq org-directory "~/Remotes/pCloud/Org")
;; --- Startup speed tweaks ----------------------------------------------------
;; Temporarily increase GC threshold during init
(defvar fscotto/gc-cons-threshold-orig gc-cons-threshold)
(setq gc-cons-threshold (* 50 1000 1000)) ;; 50MB for init
;; Speedup file-name-handler during init
(defvar fscotto/file-name-handler-alist-orig file-name-handler-alist)
(setq file-name-handler-alist nil)
;; Restore after init
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold fscotto/gc-cons-threshold-orig)
(setq file-name-handler-alist fscotto/file-name-handler-alist-orig)
(garbage-collect)))
;; LSP responsiveness
(setq read-process-output-max (* 1024 1024)) ;; 1MB, utile per lsp-mode
(setq lsp-idle-delay 0.5) ;; meno ritardo prima che LSP aggiorni info
(setq inhibit-compacting-font-caches t)
;; ---------------------------------------------------------------------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; EDITOR OPTIONS ;; ;; EDITOR OPTIONS ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -71,6 +94,55 @@
(prefer-coding-system 'utf-8-unix) (prefer-coding-system 'utf-8-unix)
(setq custom-file (null-device)) (setq custom-file (null-device))
;;;;;;;;;;;;;;;;;;;;
;; USER FUNCTIONS ;;
;;;;;;;;;;;;;;;;;;;;
;;functions to support syncing .elfeed between machines
;;makes sure elfeed reads index from disk before launching
(defun fscotto/elfeed-load-db-and-open ()
"Wrapper to load the elfeed db from disk before opening URL https://pragmaticemacs.wordpress.com/2016/08/17/read-your-rss-feeds-in-emacs-with-elfeed/
Created: 2016-08-17
Updated: 2025-06-13"
(interactive)
(elfeed)
(elfeed-db-load)
;; (elfeed-search-update--force)
(elfeed-update)
(elfeed-db-save))
(defun fscotto/project-root ()
"Return projectile project root or fallback to default-directory."
(if (featurep 'projectile)
(or (projectile-project-root) default-directory)
default-directory))
(defun fscotto/project-dashboard ()
"Open a project dashboard: root + Magit + LSP."
(interactive)
(let ((root (fscotto/project-root)))
(dired root)
(magit-status root)
(lsp)))
(defun fscotto/project-vterm ()
"Open vterm in project root."
(interactive)
(let ((default-directory (fscotto/project-root)))
(vterm)))
(defun fscotto/project-magit-status ()
"Open magit-status in project root."
(interactive)
(let ((default-directory (fscotto/project-root)))
(magit-status)))
(defun fscotto/magit-dispatch ()
"Load Magit if necessary and open magit-dispatch."
(interactive)
(require 'magit)
(call-interactively #'magit-dispatch))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PACKAGES ;; ;; PACKAGES ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -92,81 +164,239 @@
("MELPA" . "https://melpa.org/packages/") ("MELPA" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))) ("gnu" . "https://elpa.gnu.org/packages/"))))
;; (use-package catppuccin-theme
;; :ensure t
;; :config
;; (load-theme 'catppuccin :no-confirm)
;; (setq catppuccin-flavor 'mocha))
;; Status line like Doom Emacs ;; Status line like Doom Emacs
(use-package doom-modeline (use-package doom-modeline
:ensure t :ensure t
:config
(setq doom-modeline-height 25
doom-modeline-bar-width 3
doom-modeline-project-detection 'projectile)
:init (doom-modeline-mode 1)) :init (doom-modeline-mode 1))
;; Help to remember or discover keybindings ;; Help to remember or discover keybindings
(use-package which-key (use-package which-key
:ensure t :ensure t
:commands (which-key-mode) :defer 1
:init (which-key-mode)) :config
(which-key-mode)
(setq which-key-idle-delay 0.45
which-key-idle-secondary-delay 0.05
which-key-max-display-columns 3
which-key-max-description-length 45))
;; ============================================================================
;; Doom-style which-key hierarchy for fscotto
;; ============================================================================
(with-eval-after-load 'which-key
;; --------------------------------------------------------------------------
;; Top-level prefixes
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c !" "Analyze"
"C-c o" "Open"
"C-c v" "Version control"
"C-c l" "LSP"
"C-c t" "TODO / Annotations"
"C-c b" "Buffers"
"C-c p" "Project"
"C-c d" "Debug"
"C-c g" "Git"
"C-c e" "Email / Elfeed")
;; --------------------------------------------------------------------------
;; Open (C-c o …)
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c o f" "RSS (Elfeed)"
"C-c o m" "mu4e (Email Client)"
"C-c o T" "Terminal (vterm)")
;; --------------------------------------------------------------------------
;; Version control
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c v" "Version control"
"C-c v g" "Magit status (legacy)")
(which-key-add-key-based-replacements
"C-c g" "Git"
;; Core
"C-c g g" "Status"
"C-c g s" "Status"
;; "C-c g b" "Branch"
;; "C-c g c" "Commit"
"C-c g p" "Push / Pull"
"C-c g f" "Fetch"
"C-c g l" "Log"
"C-c g S" "Stash"
;; Files
"C-c g d" "Diff"
"C-c g D" "Diff (cached)"
"C-c g B" "Blame"
;; Rebase / Reset
"C-c g r" "Rebase"
"C-c g R" "Reset"
;; Remote
"C-c g y" "Show refs"
"C-c g o" "Browse remote")
;; --------------------------------------------------------------------------
;; Buffers
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-x C-b" "ibuffer")
;; --------------------------------------------------------------------------
;; TODO / hl-todo
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-t" "hl-todo"
"C-t p" "Previous TODO"
"C-t n" "Next TODO"
"C-t o" "Occur (list)"
"C-t i" "Insert TODO")
;; --------------------------------------------------------------------------
;; LSP (C-c l …)
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c l" "LSP"
"C-c l a" "Code actions"
"C-c l r" "Rename symbol"
"C-c l f" "Format buffer"
"C-c l d" "Go to definition"
"C-c l D" "Go to type definition"
"C-c l i" "Go to implementation"
"C-c l h" "Hover documentation"
"C-c l s" "Workspace symbols"
"C-c l R" "Restart server")
;; --------------------------------------------------------------------------
;; Elfeed modes
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"w" "Yank"
"R" "Update feeds"
"q" "Quit")
;; --------------------------------------------------------------------------
;; Debug / DAP
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c d" "Debug"
"C-c d d" "Start debug session"
"C-c d b" "Toggle breakpoint"
"C-c d c" "Continue"
"C-c d n" "Next"
"C-c d i" "Step in"
"C-c d o" "Step out")
;; --------------------------------------------------------------------------
;; Project (future)
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c p" "Project"
;; Core
"C-c p p" "Switch project"
"C-c p f" "Find file"
"C-c p d" "Find directory"
"C-c p b" "Switch buffer"
"C-c p k" "Kill project buffers"
"C-c p r" "Recent files"
;; Search
"C-c p s" "Search"
"C-c p s g" "Grep (ripgrep)"
"C-c p s r" "Replace in project"
;; Actions
"C-c p c" "Compile"
"C-c p t" "Test"
"C-c p v" "Open term in project"
"C-c p e" "Edit project config"
"C-c p g" "Project Git status"
"C-c p D" "Project Dashboard"
"C-c p x" "Open Terminal"
"C-c p 4" "Other Window"
"C-c p 5" "Other Frame"
"C-c p x 4" "Other Window"
;; Cache
"C-c p i" "Invalidate cache")
;; --------------------------------------------------------------------------
;; Cleanup annoying +prefix
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"+prefix" "Prefix"
"+lsp" "LSP"
"+debug" "Debug"
"+project" "Project"))
;; Configuration for mu4e, an interface for mu email index, running inside Emacs ;; Configuration for mu4e, an interface for mu email index, running inside Emacs
;; (use-package mu4e (use-package mu4e
;; :ensure nil :ensure nil
;; ;; :load-path "/usr/share/emacs/site-lisp/mu4e/" ;; :load-path "/usr/share/emacs/site-lisp/mu4e/"
;; :defer 20 ; Wait until 20 seconds after startup :defer 20 ; Wait until 20 seconds after startup
;; :bind (:map global-map ("C-c e" . mu4e)) :bind (:map global-map ("C-c o m" . mu4e))
;; :config :config
;; ;; This is set to 't' to avoid mail syncing issues when using mbsync ;; This is set to 't' to avoid mail syncing issues when using mbsync
;; (setq mu4e-change-filenames-when-moving t) (setq mu4e-change-filenames-when-moving t)
;; ;; Refresh mail using isync every 10 minutes ;; Refresh mail using isync every 10 minutes
;; (setq mu4e-update-interval (* 10 60)) (setq mu4e-update-interval (* 10 60))
;; (setq mu4e-get-mail-command "~/.emacs.d/scripts/email_sync.sh") (setq mu4e-get-mail-command "~/.emacs.d/scripts/email_sync.sh")
;; (setq mu4e-maildir "~/Maildir") (setq mu4e-maildir "~/Maildir")
;; ;; Configure email accounts ;; Configure email accounts
;; (setq mu4e-contexts (setq mu4e-contexts
;; (list (list
;; ;; Protonmail Account ;; Protonmail Account
;; (make-mu4e-context (make-mu4e-context
;; :name "Protonmail" :name "Protonmail"
;; :match-func :match-func
;; (lambda (msg) (lambda (msg)
;; (when msg (when msg
;; (string-prefix-p "/ProtonMailAccount" (mu4e-message-field msg :maildir)))) (string-prefix-p "/ProtonMailAccount" (mu4e-message-field msg :maildir))))
;; :vars '((user-mail-address . "fscottodisantolo@protonmail.com") :vars '((user-mail-address . "fscottodisantolo@protonmail.com")
;; (user-full-name . "Fabio Scotto di Santolo") (user-full-name . "Fabio Scotto di Santolo")
;; (mu4e-drafts-folder . "/ProtonMailAccount/Drafts") (mu4e-drafts-folder . "/ProtonMailAccount/Drafts")
;; (mu4e-sent-folder . "/ProtonMailAccount/Sent") (mu4e-sent-folder . "/ProtonMailAccount/Sent")
;; (mu4e-refile-folder . "/ProtonMailAccount/All Mail") (mu4e-refile-folder . "/ProtonMailAccount/All Mail")
;; (mu4e-trash-folder . "/ProtonMailAccount/Trash"))) (mu4e-trash-folder . "/ProtonMailAccount/Trash")))
;; ;; iCloud Account ;; iCloud Account
;; (make-mu4e-context (make-mu4e-context
;; :name "iCloud Mail" :name "iCloud Mail"
;; :match-func :match-func
;; (lambda (msg) (lambda (msg)
;; (when msg (when msg
;; (string-prefix-p "/iCloudAccount" (mu4e-message-field msg :maildir)))) (string-prefix-p "/iCloudAccount" (mu4e-message-field msg :maildir))))
;; :vars '((user-mail-address . "fscottodisantolo@icloud.com") :vars '((user-mail-address . "fscottodisantolo@icloud.com")
;; (user-full-name . "Fabio Scotto di Santolo") (user-full-name . "Fabio Scotto di Santolo")
;; (mu4e-drafts-folder . "/iCloudAccount/Drafts") (mu4e-drafts-folder . "/iCloudAccount/Drafts")
;; (mu4e-sent-folder . "/iCloudAccount/Sent Messages") (mu4e-sent-folder . "/iCloudAccount/Sent Messages")
;; (mu4e-refile-folder . "/iCloudAccount/INBOX") (mu4e-refile-folder . "/iCloudAccount/INBOX")
;; (mu4e-trash-folder . "/iCloudAccount/Junk"))))) (mu4e-trash-folder . "/iCloudAccount/Junk")))))
;; (setq sendmail-program "/usr/bin/msmtp" (setq sendmail-program "/usr/bin/msmtp"
;; send-mail-function 'sendmail-send-it send-mail-function 'sendmail-send-it
;; message-sendmail-f-is-evil t message-sendmail-f-is-evil t
;; message-sendmail-extra-arguments '("--read-envelope-from") message-sendmail-extra-arguments '("--read-envelope-from")
;; message-send-mail-function 'message-send-mail-with-sendmail)) message-send-mail-function 'message-send-mail-with-sendmail))
;; Configure elfeed for RSS feed ;; Configure elfeed for RSS feed
(use-package elfeed (use-package elfeed
:ensure t :ensure t
:custom :custom
(elfeed-db-directory "~/.cache/elfeed")
(elfeed-enclosure-default-dir "~/Downloads/") (elfeed-enclosure-default-dir "~/Downloads/")
(elfeed-search-remain-on-entry t) (elfeed-search-remain-on-entry t)
(elfeed-search-title-max-width 100) (elfeed-search-title-max-width 100)
@@ -175,13 +405,32 @@
(elfeed-show-truncate-long-urls t) (elfeed-show-truncate-long-urls t)
(elfeed-sort-order 'descending) (elfeed-sort-order 'descending)
(elfeed-search-filter "+unread") (elfeed-search-filter "+unread")
(elfeed-feeds :bind
'(("https://blog.linuxmint.com/?feed=rss2" linux linuxmint) ("C-c o f" . fscotto/elfeed-load-db-and-open)
("https://feeds.feedburner.com/TheHackersNews" hackernews news security programming))) (:map elfeed-search-mode-map
:bind (("C-c f" . elfeed))) ("w" . elfeed-search-yank)
("R" . elfeed-update)
("q" . elfeed-kill-buffer))
(:map elfeed-show-mode-map
("S" . elfeed-show-new-live-search) ; moved to free up 's'
("c" . (lambda () (interactive) (org-capture nil "capture")))
("e" . email-elfeed-entry)
("f" . elfeed-show-fetch-full-text)
("w" . elfeed-show-yank))
:hook
(elfeed-show-mode . visual-line-mode))
(use-package elfeed-org (use-package elfeed-org
:ensure t) :ensure t
:after elfeed
:custom
;; Optionally specify a number of files containing elfeed
;; configuration. If not set then the location below is used.
;; Note: The customize interface is also supported.
(rmh-elfeed-org-files (list "~/.emacs.d/elfeed.org")))
(with-eval-after-load 'elfeed
(elfeed-org))
;; Terminal ;; Terminal
(use-package vterm (use-package vterm
@@ -207,7 +456,25 @@
;; Git plugin ;; Git plugin
(use-package magit (use-package magit
:ensure t :ensure t
:bind (:map global-map ("C-c v g" . magit-status))) :commands (magit-status magit-log)
:init
;; Entry point principale
(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1)
:config
;; Performance & UX
(setq magit-refresh-status-buffer nil)
(setq magit-repository-directories
'(("~/Projects" . 2)
("~/Work" . 2))))
;; Legacy alias (keep muscle memory)
(global-set-key (kbd "C-c v g") #'magit-status)
(global-set-key (kbd "C-c g") #'fscotto/magit-dispatch)
;; Git leader key (Doom-style)
;; (with-eval-after-load 'magit
;; (define-key global-map (kbd "C-c g") 'magit-dispatch))
;; Highlight keywords to remember the activity when coding. ;; Highlight keywords to remember the activity when coding.
(use-package hl-todo (use-package hl-todo
@@ -253,38 +520,151 @@
(lambda () (lambda ()
(ibuffer-projectile-set-filter-groups))) (ibuffer-projectile-set-filter-groups)))
;; TODO adding lsp-mode, dap-mode, autocomplete and project handling for C, Go, Bash and Python ;; ============================================================================
;; Projectile - Project management (Doom-style)
;; ============================================================================
(use-package projectile
:ensure t
:defer 1
:init
;; Root detection
(setq projectile-project-search-path '("~/Projects" "~/Work"))
(setq projectile-completion-system 'ivy)
:config
;; Performance
(setq projectile-enable-caching t)
(setq projectile-indexing-method 'hybrid)
(setq projectile-sort-order 'recently-active)
;; Projectile as single source of truth
(setq projectile-switch-project-action #'projectile-dired)
;; Use ripgrep if available
(when (executable-find "rg")
(setq projectile-generic-command "rg --files --hidden --glob '!.git'"))
;; Enable globally
(projectile-mode 1))
;; Projectile keybindings (Doom-style)
(with-eval-after-load 'projectile
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map))
(with-eval-after-load 'projectile
(define-key projectile-command-map (kbd "v") #'fscotto/project-vterm))
(with-eval-after-load 'projectile
(define-key projectile-command-map (kbd "g") #'fscotto/project-magit-status))
(global-set-key (kbd "C-c p D") #'fscotto/project-dashboard) (global-set-key (kbd "C-c p D") #'fscotto/project-dashboard)
;; Add autocomplete feature to Emacs ;; Add autocomplete feature to Emacs
(use-package company (use-package company
:commands (global-company-mode)
:init (global-company-mode)
:ensure t :ensure t
:custom :custom
(company-tooltip-align-annotations 't) (company-tooltip-align-annotations 't)
(company-idle-delay 0.1)) (company-minimum-prefix-length 1)
(company-idle-delay 0.1)
:hook (prog-mode . company-mode)) :hook (prog-mode . company-mode))
(use-package flycheck (use-package flycheck
:ensure t
:hook (prog-mode . flycheck-mode))
(use-package treesit
:ensure nil :ensure nil
(add-hook 'after-init-hook #'global-flycheck-mode)) :config
(setq treesit-font-lock-level 4)
(setq major-mode-remap-alist
'((c-mode . c-ts-mode)
(c++-mode . c++-ts-mode)
(python-mode . python-ts-mode)
(bash-mode . bash-ts-mode)))
(setq treesit-language-source-alist
'((c "https://github.com/tree-sitter/tree-sitter-c")
(cpp "https://github.com/tree-sitter/tree-sitter-cpp")
(python "https://github.com/tree-sitter/tree-sitter-python")
(bash "https://github.com/tree-sitter/tree-sitter-bash")
(go "https://github.com/tree-sitter/tree-sitter-go")))) (go "https://github.com/tree-sitter/tree-sitter-go"))))
(use-package lsp-mode (use-package lsp-mode
:ensure t
:commands lsp :commands lsp
:init :init
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
:hook ((c-mode . lsp)) (setq lsp-keymap-prefix "C-c l")
:commands lsp) :hook
((c-mode
c-ts-mode
c++-mode
c++-ts-mode
python-mode
python-ts-mode
go-mode
go-ts-mode
bash-mode
bash-ts-mode) . lsp)
:config
;; Performance
(setq lsp-enable-symbol-highlighting t
lsp-enable-snippet t
lsp-log-io nil
lsp-completion-provider :capf
;; Disable for huge projects
;; lsp-enable-file-watchers nil
lsp-headerline-breadcrumb-enable nil
lsp-idle-delay 0.5)) lsp-idle-delay 0.5))
:ensure t) (use-package lsp-ui
:ensure t
:config
(setq lsp-ui-doc-enable t
lsp-ui-doc-delay 0.3
lsp-ui-sideline-enable t
lsp-ui-sideline-show-code-actions t)) lsp-ui-sideline-show-code-actions t))
(use-package lsp-ivy (use-package lsp-ivy
:ensure t) :ensure t)
:ensure t) (use-package dap-mode
:ensure t
:after lsp-mode
:commands dap-debug
:init
;; Debug prefix
(setq dap-auto-configure-features '(sessions locals controls tooltip))
:config
(dap-mode 1)
(dap-ui-mode 1)
(dap-tooltip-mode 1)
;; Auto show breakpoints + REPL
(setq dap-ui-buffer-configurations
'((dap-ui-repl . ((side . right) (slot . 1) (window-width . 0.33)))
(dap-ui-locals . ((side . right) (slot . 2) (window-width . 0.33)))
(dap-ui-breakpoints . ((side . left) (slot . 1) (window-width . 0.20))))))
;;;;;;;;;;;;;;;;;;;;;;
;; Enable debuggers ;;
;;;;;;;;;;;;;;;;;;;;;;
;; For C/C++
(require 'dap-gdb-lldb)
(setq dap-gdb-lldb-debug-program '("gdb"))
;; For Go
(require 'dap-go)
;; For Python
(require 'dap-python)
(setq dap-python-debugger 'debugpy)
(with-eval-after-load 'dap-mode
(global-set-key (kbd "C-c d d") #'dap-debug)
(global-set-key (kbd "C-c d b") #'dap-breakpoint-toggle)
(global-set-key (kbd "C-c d c") #'dap-continue)
(global-set-key (kbd "C-c d n") #'dap-next)
(global-set-key (kbd "C-c d i") #'dap-step-in)
(global-set-key (kbd "C-c d o") #'dap-step-out)
(global-set-key (kbd "C-c d r") #'dap-restart-frame)
(global-set-key (kbd "C-c d q") #'dap-disconnect)) (global-set-key (kbd "C-c d q") #'dap-disconnect))

View File

@@ -0,0 +1 @@
("~/.dotfiles/" "~/Projects/toyforth/" "~/Projects/workstation/" "~/Projects/system-programming/" "~/Projects/pymorg/" "~/Projects/operating-systems/" "~/Projects/fileserver/" "~/Projects/exkernel/" "~/Projects/docker-compose/")

View File

@@ -13,15 +13,7 @@ $docker_context\
$buf\ $buf\
$guix_shell\ $guix_shell\
$nix_shell\ $nix_shell\
$conda\
$meson\ $meson\
$spack\
$memory_usage\
$direnv\
$env_var\
$custom\
$sudo\
$cmd_duration\
$line_break\ $line_break\
$time\ $time\
$status\ $status\
@@ -42,7 +34,7 @@ $azure
""" """
# Sets user-defined palette # Sets user-defined palette
palette = "catppuccin_mocha" #palette = "catppuccin_mocha"
# palette tables should be last in the config ⚓️ # palette tables should be last in the config ⚓️
[palettes.catppuccin_macchiato] [palettes.catppuccin_macchiato]
@@ -159,7 +151,7 @@ crust = "#11111b"
[character] [character]
# Note the use of Catppuccin color 'maroon' # Note the use of Catppuccin color 'maroon'
success_symbol = "[](maroon)" success_symbol = "[](blue)"
error_symbol = "[](red)" error_symbol = "[](red)"
vimcmd_symbol = "[](green)" vimcmd_symbol = "[](green)"
@@ -175,15 +167,6 @@ symbol = " "
[c] [c]
symbol = " " symbol = " "
[conda]
symbol = " "
[crystal]
symbol = " "
[dart]
symbol = " "
[directory] [directory]
read_only = " 󰌾" read_only = " 󰌾"
truncate_to_repo = false truncate_to_repo = false
@@ -211,12 +194,6 @@ symbol = " "
format = "[$env_value]($style)" format = "[$env_value]($style)"
style = 'green italic' style = 'green italic'
[fennel]
symbol = " "
[fossil_branch]
symbol = " "
[git_branch] [git_branch]
symbol = " " symbol = " "
@@ -236,9 +213,6 @@ symbol = " "
[haskell] [haskell]
symbol = " " symbol = " "
[haxe]
symbol = " "
[hg_branch] [hg_branch]
symbol = " " symbol = " "
@@ -267,85 +241,43 @@ symbol = "󰍛 "
[meson] [meson]
symbol = "󰔷 " symbol = "󰔷 "
[nim]
symbol = "󰆥 "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
[nodejs] [nodejs]
symbol = " " symbol = " "
[ocaml]
symbol = " "
[os] [os]
disabled = false disabled = false
format = "[$symbol]($style)" format = "[$symbol]($style)"
[os.symbols] [os.symbols]
Alpaquita = ""
Alpine = ""
AlmaLinux = " "
Amazon = ""
Android = " "
Arch = " " Arch = " "
Artix = "" Bluefin = ""
CentOS = ""
Debian = " " Debian = " "
DragonFly = ""
Emscripten = " "
EndeavourOS = " " EndeavourOS = " "
Fedora = " " Fedora = " "
FreeBSD = " " FreeBSD = " "
Garuda = "󰛓"
Gentoo = " " Gentoo = " "
HardenedBSD = "󰞌"
Illumos = "󰈸"
Kali = " "
Linux = ""
Mabox = ""
Macos = " " Macos = " "
Manjaro = " " Manjaro = " "
Mariner = ""
MidnightBSD = ""
Mint = " " Mint = " "
NetBSD = " " NetBSD = " "
NixOS = " " NixOS = " "
OpenBSD = "󰈺 " OpenBSD = "󰈺 "
openSUSE = " " openSUSE = " "
OracleLinux = "󰌷"
Pop = " " Pop = " "
Raspbian = " " Raspbian = " "
Redhat = ""
RedHatEnterprise = ""
RockyLinux = ""
Redox = "󰀘"
Solus = "󰠳"
SUSE = ""
Ubuntu = " " Ubuntu = " "
Unknown = ""
Void = " " Void = " "
Windows = "󰍲 " Windows = "󰍲 "
[package] [package]
symbol = "󰏗 " symbol = "󰏗 "
[perl]
symbol = " "
[php]
symbol = " "
[pijul_channel]
symbol = " "
[python] [python]
symbol = " " symbol = " "
[rlang]
symbol = "󰟔 "
[ruby] [ruby]
symbol = " " symbol = " "
@@ -355,9 +287,6 @@ symbol = " "
[scala] [scala]
symbol = " " symbol = " "
[swift]
symbol = " "
[username] [username]
show_always = true show_always = true