aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/users/fcuny/configs/emacs/early-init.el2
-rw-r--r--nix/users/fcuny/configs/emacs/init.el2
-rw-r--r--nix/users/fcuny/configs/emacs/site-lisp/init-text.el127
-rw-r--r--nix/users/fcuny/configs/emacs/site-lisp/init-ui.el2
-rw-r--r--nix/users/fcuny/emacs.nix9
5 files changed, 140 insertions, 2 deletions
diff --git a/nix/users/fcuny/configs/emacs/early-init.el b/nix/users/fcuny/configs/emacs/early-init.el
index e98d23a..3953c90 100644
--- a/nix/users/fcuny/configs/emacs/early-init.el
+++ b/nix/users/fcuny/configs/emacs/early-init.el
@@ -24,7 +24,7 @@
;; disable GUI elements
(scroll-bar-mode -1) ; hide the scroll bar
(tool-bar-mode -1) ; hide the tool bar
-(menu-bar-mode -1) ; hide the menu
+(menu-bar-mode +1) ; show the menu
(blink-cursor-mode -1) ; don't blink the cursor
(setq make-pointer-invisible t) ;; hide cursor while typing
diff --git a/nix/users/fcuny/configs/emacs/init.el b/nix/users/fcuny/configs/emacs/init.el
index a6cc8c7..fdf0a3a 100644
--- a/nix/users/fcuny/configs/emacs/init.el
+++ b/nix/users/fcuny/configs/emacs/init.el
@@ -12,7 +12,9 @@
(require 'init-base)
(require 'init-ui)
(require 'init-completion)
+(require 'init-text)
(require 'init-programming)
+(require 'init-llm)
(use-package server
:config
diff --git a/nix/users/fcuny/configs/emacs/site-lisp/init-text.el b/nix/users/fcuny/configs/emacs/site-lisp/init-text.el
new file mode 100644
index 0000000..d41c486
--- /dev/null
+++ b/nix/users/fcuny/configs/emacs/site-lisp/init-text.el
@@ -0,0 +1,127 @@
+;;; init-text.el --- Configure text modes -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;; Configure completions
+
+;;; Code:
+
+(use-package flyspell
+ :hook ((text-mode . flyspell-mode)
+ (org-mode . flyspell-mode)
+ (git-commit-mode . flyspell-mode)
+ (prog-mode . flyspell-prog-mode))
+ :diminish flyspell-mode
+ :custom
+ (ispell-program-name "aspell")
+ (ispell-silently-savep t)
+ (ispell-local-dictionary "en_US")
+ (ispell-extra-args '("--camel-case")))
+
+(use-package markdown-mode
+ :mode (("\\`README\\.md\\'" . gfm-mode)
+ ("\\.md\\'" . markdown-mode)
+ ("\\.markdown\\'" . markdown-mode))
+ :custom
+ (markdown-command "pandoc -f markdown_github+smart")
+ (markdown-command-needs-filename t)
+ (markdown-enable-math t)
+ (markdown-open-command "marked")
+ :init
+ (setq markdown-command "multimarkdown"))
+
+(use-package org
+ :hook
+ (org-mode . turn-on-flyspell)
+ (org-mode . visual-line-mode)
+ (org-mode . org-indent-mode)
+
+ :config
+ (font-lock-add-keywords 'org-mode
+ '(("^ *\\(-\\) "
+ (0 (ignore (compose-region (match-beginning 1) (match-end 1) "•"))))))
+
+ :custom
+ (org-directory "~/Documents/org")
+ (org-default-notes-file (expand-file-name "notes.org" org-directory))
+
+ (org-startup-folded t)
+ (org-startup-indented t)
+ (org-startup-with-inline-images t)
+
+ ;; enable todo and checkbox dependencies
+ (org-enforce-todo-dependencies t)
+ (org-enforce-todo-checkbox-dependencies t)
+
+ ;; quick access for todo states
+ (org-todo-keywords
+ '((sequence "TODO(t)" "NEXT(n)" "WAITING(w!)" "SOMEDAY(S!)" "|" "DONE(d)")
+ (sequence "|" "CANCELLED(c)")))
+
+ (org-log-done 'time)
+ (org-log-into-drawer t)
+
+ ;; no empty lines between items
+ (org-blank-before-new-entry '((heading . nil) (plain-list-item . nil)))
+
+ (org-hide-emphasis-markers t)
+ (org-hide-leading-stars t)
+ (org-pretty-entities t)
+
+ (org-return-follows-link t)
+
+ (org-export-backends '(html md))
+
+ (org-imenu-depth 4)
+
+ (org-insert-heading-respect-content t)
+
+ (org-outline-path-complete-in-steps nil)
+
+ (org-src-fontify-natively t)
+ (org-src-preserve-indentation t)
+ (org-src-tab-acts-natively t)
+ (org-src-window-setup 'current-window)
+
+ (org-yank-adjusted-subtrees t)
+
+ (org-structure-template-alist
+ '(("s" . "src")
+ ("E" . "src emacs-lisp")
+ ("p" . "src python")
+ ("e" . "example")
+ ("q" . "quote"))))
+
+(use-package org-agenda
+ :ensure nil
+ :after org
+ :bind
+ ("C-c a" . org-agenda)
+ :custom
+ (org-agenda-start-on-weekday 1))
+
+(use-package denote
+ :defer t
+ :custom
+ (denote-sort-keywords t)
+ :hook
+ (dired-mode . denote-dired-mode)
+ :custom-face
+ (denote-faces-link ((t (:slant italic))))
+ :init
+ (require 'denote-org)
+ :bind
+ (("C-c w d b" . denote-find-backlink)
+ ("C-c w d d" . denote-date)
+ ("C-c w d l" . denote-find-link)
+ ("C-c w d h" . denote-org-link-to-heading)
+ ("C-c w d i" . denote-link-or-create)
+ ("C-c w d k" . denote-rename-file-keywords)
+ ("C-c w d n" . denote)
+ ("C-c w d r" . denote-rename-file)
+ ("C-c w d R" . denote-rename-file-using-front-matter)))
+
+(provide 'init-text)
+
+;;; init-text.el ends here
diff --git a/nix/users/fcuny/configs/emacs/site-lisp/init-ui.el b/nix/users/fcuny/configs/emacs/site-lisp/init-ui.el
index e239978..f191811 100644
--- a/nix/users/fcuny/configs/emacs/site-lisp/init-ui.el
+++ b/nix/users/fcuny/configs/emacs/site-lisp/init-ui.el
@@ -21,7 +21,7 @@
;; | 数字 | アルファベット | 日本語 | 絵文字 |
;; | 0123 | abcdefghijklmn | あいう | 🍎🍎🍎 |
-(set-face-attribute 'default nil :family "Source Code Pro" :height 150)
+(set-face-attribute 'default nil :family "Source Code Pro" :height 150)
(use-package modus-themes
:custom
diff --git a/nix/users/fcuny/emacs.nix b/nix/users/fcuny/emacs.nix
index 849c6b4..7e522cd 100644
--- a/nix/users/fcuny/emacs.nix
+++ b/nix/users/fcuny/emacs.nix
@@ -5,7 +5,14 @@ let
aidermacs # pair programming in Emacs with Aider
cape
consult
+ consult-denote
corfu
+ denote
+ denote-journal
+ denote-markdown
+ denote-org
+ denote-silo
+ denote-sequence
diminish
direnv
docker
@@ -22,6 +29,7 @@ let
json-reformat
magit
marginalia
+ markdown-mode
nix-mode
orderless
protobuf-mode
@@ -43,6 +51,7 @@ let
"site-lisp/init-completion.el"
"site-lisp/init-llm.el"
"site-lisp/init-programming.el"
+ "site-lisp/init-text.el"
"site-lisp/init-ui.el"
];
mkEmacsFile = file: {