aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYousef Jan <yousefjan24000@gmail.com>2026-06-30 15:27:21 +0300
committerYousef Jan <yousefjan24000@gmail.com>2026-06-30 15:27:21 +0300
commiteef237fd3c04a84ab771e8f94e001b4184b53a33 (patch)
tree5cd3066687f8e5399df72e0151af7af98692f03b
parent2ba427332f2c0b8d1480434c688efaee1110ca51 (diff)
Tweaks
-rw-r--r--bash/.bashrc4
-rw-r--r--doom/config.el18
-rw-r--r--doom/init.el2
3 files changed, 22 insertions, 2 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index c82d29c..0b4c41e 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -7,6 +7,7 @@ PS1='[\u@\h \[\e[38;2;175;215;255m\]\w\[\e[0m\]]\$ '
alias python=python3
alias ls='ls -larth'
alias e='emacsclient -nc -a ""'
+alias ke='emacsclient -e "(kill-emacs)"'
alias copy='xclip -selection clipboard'
alias paste='xclip -o -selection clipboard'
@@ -47,7 +48,8 @@ if [ -d ~/.bashrc.d ]; then
done
fi
unset rc
-. "$HOME/.cargo/env"
+
+[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"
# pnpm
export PNPM_HOME="/home/yousefjan/.local/share/pnpm"
diff --git a/doom/config.el b/doom/config.el
index 02c1997..567cc2a 100644
--- a/doom/config.el
+++ b/doom/config.el
@@ -293,6 +293,16 @@
(setq org-startup-with-inline-images t)
+(defun my/open-pdf-in-sioyek ()
+ "Open PDF files in sioyek and close the Emacs buffer."
+ (when (and buffer-file-name
+ (string-match-p "\\.pdf\\'" buffer-file-name))
+ (let ((file buffer-file-name))
+ (kill-buffer (current-buffer))
+ (start-process "sioyek" nil "flatpak" "run" "com.github.ahrm.sioyek" file))))
+
+(add-hook 'find-file-hook #'my/open-pdf-in-sioyek)
+
;; Move visual-line selection up/down with J/K; preserve original behavior in other visual modes
(map! :v "J" (cmd! (if (eq evil-visual-selection 'line)
(drag-stuff-down 1)
@@ -300,3 +310,11 @@
:v "K" (cmd! (if (eq evil-visual-selection 'line)
(drag-stuff-up 1)
(evil-lookup))))
+
+;; Use ROCm's bundled clangd for C/C++ (HIP) — same LLVM toolchain as hipcc,
+;; so it understands hip/hip_runtime.h and hip* types via compile_commands.json.
+(after! lsp-clangd
+ (setq lsp-clients-clangd-executable "/usr/lib64/rocm/llvm/bin/clangd"
+ lsp-clients-clangd-args '("--header-insertion=never"
+ "--background-index"
+ "--compile-commands-dir=.")))
diff --git a/doom/init.el b/doom/init.el
index 1f0bf7f..a46cdf5 100644
--- a/doom/init.el
+++ b/doom/init.el
@@ -189,5 +189,5 @@
;;(rss +org) ; emacs as an RSS reader
:config
- literate
+ ;;literate ; disabled: no config.org; tangle hook kill-emacs 3 aborted 'doom sync'
(default +bindings +smartparens))