mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
feat(emacs): wayland nox and markdown mode
This commit is contained in:
parent
4f20405cfb
commit
b66b442dba
5 changed files with 46 additions and 20 deletions
|
|
@ -4,11 +4,9 @@
|
|||
;;; Organised by such directory structure
|
||||
;;; init.el -- This file, entry point
|
||||
;;; lisp/
|
||||
;;; init-basic.el
|
||||
;;; init-keymaps.el
|
||||
;;; init-package.el
|
||||
;;; init-evil.el
|
||||
;;; init-*.el
|
||||
;;; custom.el -- Auto Generated
|
||||
;;; local.el -- Local variables
|
||||
|
||||
;; All elisp files under emacs.d/lisp will be loaded
|
||||
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
|
||||
|
|
@ -23,15 +21,21 @@
|
|||
|
||||
(defvar xdg-cache-home
|
||||
(or (getenv "XDG_CACHE_HOME")
|
||||
(expand-file-name "~/.local/cache")))
|
||||
(expand-file-name "~/.cache")))
|
||||
|
||||
(defvar xdg-state-home
|
||||
(or (getenv "XDG_STATE_HOME")
|
||||
(expand-file-name "~/.local/state/")))
|
||||
|
||||
(defvar user-emacs-data (expand-file-name "emacs" xdg-data-home))
|
||||
(defvar user-emacs-cache (expand-file-name "emacs" xdg-cache-home))
|
||||
(defvar user-emacs-state (expand-file-name "emacs" xdg-state-home))
|
||||
|
||||
;; Load each modules
|
||||
(require 'init-package) ; package manager should be loaded first
|
||||
(require 'init-basic)
|
||||
(require 'init-appearance)
|
||||
(require 'init-wayland)
|
||||
(require 'init-keymaps)
|
||||
(require 'init-evil)
|
||||
(require 'init-counsel)
|
||||
|
|
@ -39,7 +43,8 @@
|
|||
(require 'init-edit)
|
||||
(require 'init-calendar)
|
||||
(require 'init-org)
|
||||
(require 'init-lang)
|
||||
(require 'init-markdown)
|
||||
(require 'init-latex)
|
||||
(require 'init-treesitter)
|
||||
|
||||
;; Load `custom` file
|
||||
|
|
@ -53,4 +58,3 @@
|
|||
|
||||
|
||||
;;; init.el end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
;;; init-lang.el
|
||||
|
||||
;; (use-package lsp-mode
|
||||
;; :commands (lsp lsp-deferred)
|
||||
;; :hook (prog-mode . lsp-deferred))
|
||||
|
||||
|
||||
|
||||
;; (setq package-check-signature t)
|
||||
|
||||
(provide 'init-lang)
|
||||
;;; init-lang.el ends
|
||||
11
tools/emacs.d/lisp/init-latex.el
Normal file
11
tools/emacs.d/lisp/init-latex.el
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
(use-package texfrag
|
||||
;; :init
|
||||
;; (texfrag-global-mode)
|
||||
:config
|
||||
(evil-define-key 'normal texfrag-mode-map
|
||||
(kbd "zL") #'texfrag-document)
|
||||
:hook (markdown-mode . texfrag-mode))
|
||||
|
||||
(provide 'init-latex)
|
||||
;;; init-latex.el ends
|
||||
12
tools/emacs.d/lisp/init-markdown.el
Normal file
12
tools/emacs.d/lisp/init-markdown.el
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(use-package yaml-mode :straight t)
|
||||
|
||||
(use-package markdown-mode
|
||||
:mode ("\\.md\\'" . markdown-mode)
|
||||
:init
|
||||
(setq markdown-fontify-code-blokcs-natively t)
|
||||
:custom
|
||||
(setq markdown-fontify-code-block-natively t)
|
||||
:hook ((markdown-mode . visual-line-mode)))
|
||||
|
||||
(provide 'init-markdown)
|
||||
;;; init-markdown.el ends
|
||||
11
tools/emacs.d/lisp/init-wayland.el
Normal file
11
tools/emacs.d/lisp/init-wayland.el
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
(when (getenv "WAYLAND_DISPLAY")
|
||||
;; Fix: Emacs nox does not have clipboard integration under wayland
|
||||
(use-package xclip
|
||||
:config
|
||||
(setq xclip-program "wl-copy")
|
||||
(setq xclip-select-enable-clipboard t)
|
||||
(setq xclip-mode t)
|
||||
(setq xclip-method (quote wl-copy))))
|
||||
|
||||
(provide 'init-wayland)
|
||||
Loading…
Add table
Add a link
Reference in a new issue