mirror of
https://github.com/Ascyii/emacs.git
synced 2026-01-01 06:04:24 -05:00
Some working configuration
This commit is contained in:
43
lisp/init-org.el
Normal file
43
lisp/init-org.el
Normal file
@@ -0,0 +1,43 @@
|
||||
;; Load org mode
|
||||
|
||||
(use-package org
|
||||
:ensure t
|
||||
:hook ((org-mode . visual-line-mode) ;; wrap lines nicely
|
||||
(org-mode . org-indent-mode)) ;; clean indentation
|
||||
:config
|
||||
;; Better heading bullets (requires org-modern or org-superstar)
|
||||
(use-package org-superstar
|
||||
:ensure t
|
||||
:hook (org-mode . org-superstar-mode))
|
||||
|
||||
;; Show inline images after evaluating a block
|
||||
(setq org-startup-with-inline-images t)
|
||||
(setq org-image-actual-width nil) ;; scale to window
|
||||
|
||||
;; Hide emphasis markers (*bold* → bold, no stars shown)
|
||||
(setq org-hide-emphasis-markers t)
|
||||
|
||||
;; Start folded, except top-level headings
|
||||
(setq org-startup-folded 'content)
|
||||
|
||||
;; Use syntax highlighting in code blocks
|
||||
(setq org-src-fontify-natively t
|
||||
org-src-tab-acts-natively t
|
||||
org-edit-src-content-indentation 0)
|
||||
|
||||
;; Confirm before evaluating code blocks
|
||||
(setq org-confirm-babel-evaluate t)
|
||||
|
||||
;; Enable a few languages in org-babel
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((emacs-lisp . t)
|
||||
(python . t)
|
||||
(shell . t)))
|
||||
|
||||
;; Pretty UTF-8 symbols (like → instead of =>)
|
||||
(use-package org-modern
|
||||
:ensure t
|
||||
:hook (org-mode . org-modern-mode)))
|
||||
|
||||
(provide 'init-org)
|
||||
20
lisp/keybinds.el
Normal file
20
lisp/keybinds.el
Normal file
@@ -0,0 +1,20 @@
|
||||
;; Variables
|
||||
(defvar my-zettelkasten-dir "/webdav/notes"
|
||||
"Path to zettelkasten directory.")
|
||||
|
||||
;; Functions
|
||||
(defun jonas/open-notes ()
|
||||
"Open zettelkasten directory in dired."
|
||||
(interactive)
|
||||
(dired my-zettelkasten-dir))
|
||||
|
||||
;; Helpers
|
||||
(global-set-key (kbd "C-c z") #'jonas/open-notes)
|
||||
|
||||
;; Org mode
|
||||
(with-eval-after-load 'org
|
||||
(define-key org-mode-map (kbd "C-c t") #'org-todo)
|
||||
(define-key org-mode-map (kbd "C-c TAB") #'org-cycle)
|
||||
(define-key org-mode-map (kbd "C-c l") #'org-insert-link))
|
||||
|
||||
(provide 'keybinds)
|
||||
8
lisp/navigation.el
Normal file
8
lisp/navigation.el
Normal file
@@ -0,0 +1,8 @@
|
||||
;; Activate evil mode
|
||||
|
||||
(unless (package-installed-p 'evil)
|
||||
(package-install 'evil))
|
||||
(require 'evil)
|
||||
(evil-mode 1)
|
||||
|
||||
(provide 'navigation)
|
||||
13
lisp/options.el
Normal file
13
lisp/options.el
Normal file
@@ -0,0 +1,13 @@
|
||||
;; Set all common options here
|
||||
|
||||
(custom-set-variables
|
||||
'(custom-enabled-themes '(leuven-dark))
|
||||
'(package-selected-packages nil))
|
||||
|
||||
(setq inhibit-startup-message t)
|
||||
(scroll-bar-mode -1)
|
||||
|
||||
;; Disable just the white menu bar
|
||||
(menu-bar-mode -1)
|
||||
|
||||
(provide 'options)
|
||||
10
lisp/utils.el
Normal file
10
lisp/utils.el
Normal file
@@ -0,0 +1,10 @@
|
||||
;; Utility macros and tools
|
||||
|
||||
;; Setup recent files
|
||||
(require 'recentf)
|
||||
(recentf-mode 1)
|
||||
(setq recentf-max-menu-items 25)
|
||||
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
|
||||
(custom-set-faces)
|
||||
|
||||
(provide 'utils)
|
||||
Reference in New Issue
Block a user