Initial Emacs configuration with modular dev mode

- Main configuration in init.el
  - Development tools in emacs-dev-config.el (M-x enable-dev-mode)
  - Fixed diff-hl to use VC backend
  - Added Origami code folding to dev mode
  - Fixed Magit-delta to check for delta executable
  - QML files always use qml-mode in dev mode
This commit is contained in:
Jens Luedicke
2025-09-05 13:25:33 +02:00
commit ef79598cfc
9 changed files with 3061 additions and 0 deletions

63
init-bungee.el Normal file
View File

@@ -0,0 +1,63 @@
;;; init-bungee.el --- Initialize Bungee symbol finder -*- lexical-binding: t; -*-
;; Load and configure the Bungee package
(load-file "~/.emacs.d/bungee.el")
(require 'bungee)
;; Configure cache directory
(setq bungee-cache-directory ".symbol_cache") ; Use standard cache dir
;; Optional: Use Python indexer for better parsing
;; Only set if the file exists
(let ((python-indexer-path "~/sources/bungee/symbol_finder.py"))
(when (file-exists-p (expand-file-name python-indexer-path))
(setq bungee-python-indexer python-indexer-path)))
;; Optional: Save JSON cache for Python tool compatibility
(setq bungee-save-json-cache nil) ; Set to t if you need Python compatibility
;; Enable auto-update when saving files
(setq bungee-auto-update t)
;; Enable Bungee mode globally for supported files
(global-bungee-mode 1)
;; Override M-. in QML and C++ files to use Bungee
(add-hook 'qml-mode-hook
(lambda ()
(local-set-key (kbd "M-.") 'bungee-jump-to-definition)
(local-set-key (kbd "M-?") 'bungee-find-references)
(local-set-key (kbd "M-,") 'pop-tag-mark)))
(add-hook 'c++-mode-hook
(lambda ()
(local-set-key (kbd "M-.") 'bungee-jump-to-definition)
(local-set-key (kbd "M-?") 'bungee-find-references)
(local-set-key (kbd "M-,") 'pop-tag-mark)))
;; For .qml files if qml-mode is not available
(add-to-list 'auto-mode-alist '("\\.qml\\'" . js-mode))
(add-hook 'js-mode-hook
(lambda ()
(when (and buffer-file-name
(string-match-p "\\.qml\\'" buffer-file-name))
(bungee-mode 1)
(local-set-key (kbd "M-.") 'bungee-jump-to-definition)
(local-set-key (kbd "M-?") 'bungee-find-references)
(local-set-key (kbd "M-,") 'pop-tag-mark))))
;; Convenient commands
(defun bungee-reindex-project ()
"Reindex the entire project using Python indexer."
(interactive)
(if bungee-python-indexer
(bungee-index-with-python t)
(bungee-index-directory nil t)))
(defun bungee-reindex-current-project ()
"Force reindex current project."
(interactive)
(bungee-index-directory nil t))
(provide 'init-bungee)
;;; init-bungee.el ends here