mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-13 23:51:34 +09:00
<2023-05-21 Sun 21:57>
This commit is contained in:
@ -102,5 +102,10 @@ Otherwise the startup will be very slow. "
|
|||||||
(require 'init-rust)
|
(require 'init-rust)
|
||||||
(require 'init-python)
|
(require 'init-python)
|
||||||
(require 'init-ruby)
|
(require 'init-ruby)
|
||||||
|
|
||||||
|
(require 'init-latex)
|
||||||
|
(require 'init-verilog)
|
||||||
|
|
||||||
|
(require 'init-extra)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|||||||
6
.config/emacs/lisp/init-extra.el
Normal file
6
.config/emacs/lisp/init-extra.el
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
;; init-extra.el -*- lexical-binding: t -*-
|
||||||
|
(use-package gnuplot)
|
||||||
|
(use-package graphviz-dot-mode)
|
||||||
|
|
||||||
|
(provide 'init-extra)
|
||||||
|
;;; init-extra.el ends here
|
||||||
@ -45,6 +45,7 @@
|
|||||||
;; Citre
|
;; Citre
|
||||||
"c" '(:ignore t :which-key "citre")
|
"c" '(:ignore t :which-key "citre")
|
||||||
"c j" 'citre-jump+
|
"c j" 'citre-jump+
|
||||||
|
"c J" 'dumb-jump-go-other-window
|
||||||
"c k" 'citre-jump-back+
|
"c k" 'citre-jump-back+
|
||||||
"c p" 'citre-peek
|
"c p" 'citre-peek
|
||||||
"c a" 'citre-ace-peek
|
"c a" 'citre-ace-peek
|
||||||
@ -65,6 +66,8 @@
|
|||||||
"h t" '(hydra-text-scale/body :which-key "scale text")
|
"h t" '(hydra-text-scale/body :which-key "scale text")
|
||||||
"h w" '(hydra-writeroom-scale/body :which-key "scale whiteroom")
|
"h w" '(hydra-writeroom-scale/body :which-key "scale whiteroom")
|
||||||
"h a" '(hydra-modify-alpha/body :which-key "modify alpha background")
|
"h a" '(hydra-modify-alpha/body :which-key "modify alpha background")
|
||||||
|
"h j" '(dumb-jump-hydra/body :which-key "dumb jump hydra")
|
||||||
|
"h o" '(org-hydra/body :which-key "org hydra")
|
||||||
;; Insert something
|
;; Insert something
|
||||||
"i" '(:ignore t :which-key "insert something.")
|
"i" '(:ignore t :which-key "insert something.")
|
||||||
"i s" '(yas-insert-snippet :which-key "snippet")
|
"i s" '(yas-insert-snippet :which-key "snippet")
|
||||||
|
|||||||
44
.config/emacs/lisp/init-latex.el
Normal file
44
.config/emacs/lisp/init-latex.el
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
;;; init-latex.el -*- lexical-binding: t -*-
|
||||||
|
(use-package auctex
|
||||||
|
:defer t
|
||||||
|
:custom
|
||||||
|
(TeX-auto-save t)
|
||||||
|
(TeX-parse-self t)
|
||||||
|
;; to use pdfview with auctex
|
||||||
|
(TeX-view-program-selection '((output-pdf "PDF Tools")))
|
||||||
|
(TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
|
||||||
|
(TeX-source-correlate-start-server t)
|
||||||
|
;; electric pairs in auctex
|
||||||
|
(TeX-electric-sub-and-superscript t)
|
||||||
|
(LaTeX-electric-left-right-brace t)
|
||||||
|
(TeX-electric-math (cons "$" "$"))
|
||||||
|
:config
|
||||||
|
(setq-default TeX-master nil)
|
||||||
|
;; compile to pdf
|
||||||
|
(tex-pdf-mode)
|
||||||
|
;; correlate the source and the output
|
||||||
|
(TeX-source-correlate-mode)
|
||||||
|
;; set a correct indentation in a few additional environments
|
||||||
|
(add-to-list 'LaTeX-indent-environment-list '("lstlisting" current-indentation))
|
||||||
|
(add-to-list 'LaTeX-indent-environment-list '("tikzcd" LaTeX-indent-tabular))
|
||||||
|
(add-to-list 'LaTeX-indent-environment-list '("tikzpicture" current-indentation))
|
||||||
|
;; add a few macros and environment as verbatim
|
||||||
|
(add-to-list 'LaTeX-verbatim-environments "lstlisting")
|
||||||
|
(add-to-list 'LaTeX-verbatim-environments "Verbatim")
|
||||||
|
(add-to-list 'LaTeX-verbatim-macros-with-braces "lstinline")
|
||||||
|
(add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline")
|
||||||
|
|
||||||
|
;; open all buffers with the math mode and auto-fill mode
|
||||||
|
(add-hook 'LaTeX-mode-hook #'auto-fill-mode)
|
||||||
|
(add-hook 'LaTeX-mode-hook #'LaTeX-math-mode)
|
||||||
|
|
||||||
|
;; add support for references
|
||||||
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||||
|
(customize-set-variable 'reftex-plug-into-AUCTeX t)
|
||||||
|
|
||||||
|
;; to have the buffer refresh after compilation
|
||||||
|
(add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))
|
||||||
|
|
||||||
|
(provide 'init-latex)
|
||||||
|
|
||||||
|
;;; init-latex.el ends here
|
||||||
@ -41,18 +41,7 @@
|
|||||||
("Y" (hot-expand "<s" "ipython :session :exports both :results raw drawer\n$0") "ipython")
|
("Y" (hot-expand "<s" "ipython :session :exports both :results raw drawer\n$0") "ipython")
|
||||||
("P" (progn
|
("P" (progn
|
||||||
(insert "#+HEADERS: :results output :exports both :shebang \"#!/usr/bin/env perl\"\n")
|
(insert "#+HEADERS: :results output :exports both :shebang \"#!/usr/bin/env perl\"\n")
|
||||||
(hot-expand "<s" "perl")) "Perl tangled")
|
(hot-expand "<s" "perl")) "Perl tangled"))))
|
||||||
("<" self-insert-command "ins"))))
|
|
||||||
:bind (("C-c a" . org-agenda)
|
|
||||||
("C-c b" . org-switchb)
|
|
||||||
("C-c x" . org-capture)
|
|
||||||
:map org-mode-map
|
|
||||||
("<" . (lambda ()
|
|
||||||
"Insert org template."
|
|
||||||
(interactive)
|
|
||||||
(if (or (region-active-p) (looking-back "^\s*" 1))
|
|
||||||
(org-hydra/body)
|
|
||||||
(self-insert-command 1)))))
|
|
||||||
:hook (((org-babel-after-execute org-mode) . org-redisplay-inline-images) ; display image
|
:hook (((org-babel-after-execute org-mode) . org-redisplay-inline-images) ; display image
|
||||||
(org-indent-mode . (lambda()
|
(org-indent-mode . (lambda()
|
||||||
(diminish 'org-indent-mode)
|
(diminish 'org-indent-mode)
|
||||||
@ -158,6 +147,8 @@ prepended to the element after the #+HEADER: tag."
|
|||||||
org-pretty-entities nil
|
org-pretty-entities nil
|
||||||
org-hide-emphasis-markers t)
|
org-hide-emphasis-markers t)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(use-package org-journal
|
(use-package org-journal
|
||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
@ -208,6 +199,19 @@ prepended to the element after the #+HEADER: tag."
|
|||||||
(rust . t)
|
(rust . t)
|
||||||
(C . t))
|
(C . t))
|
||||||
"Alist of org ob languages.")
|
"Alist of org ob languages.")
|
||||||
|
|
||||||
|
(push '("conf-unix" . conf-unix) org-src-lang-modes)
|
||||||
|
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("cc" . "src c"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("cp" . "src c++"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("rs" . "src rust"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("rb" . "src ruby"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("py" . "src python"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("oc" . "src octave"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("vl" . "src verilog"))
|
||||||
|
(add-to-list 'org-structure-template-alist '("vh" . "src vhdl"))
|
||||||
|
|
||||||
;; ob-sh renamed to ob-shell since 26.1.
|
;; ob-sh renamed to ob-shell since 26.1.
|
||||||
(cl-pushnew '(shell . t) load-language-alist)
|
(cl-pushnew '(shell . t) load-language-alist)
|
||||||
|
|
||||||
|
|||||||
@ -69,8 +69,8 @@
|
|||||||
("M-g j" . dumb-jump-go)
|
("M-g j" . dumb-jump-go)
|
||||||
("M-g i" . dumb-jump-go-prompt)
|
("M-g i" . dumb-jump-go-prompt)
|
||||||
("M-g x" . dumb-jump-go-prefer-external)
|
("M-g x" . dumb-jump-go-prefer-external)
|
||||||
("M-g z" . dumb-jump-go-prefer-external-other-window)
|
("M-g z" . dumb-jump-go-prefer-external-other-window))
|
||||||
("C-M-j" . dumb-jump-hydra/body))
|
;;("C-M-j" . dumb-jump-hydra/body))
|
||||||
:init
|
:init
|
||||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
||||||
(setq dumb-jump-prefer-searcher 'rg
|
(setq dumb-jump-prefer-searcher 'rg
|
||||||
@ -177,6 +177,10 @@ Install the doc if it's not installed."
|
|||||||
(add-hook 'before-save-hook
|
(add-hook 'before-save-hook
|
||||||
#'fish_indent-before-save))))
|
#'fish_indent-before-save))))
|
||||||
|
|
||||||
|
(use-package pkgbuild-mode)
|
||||||
|
(use-package systemd)
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-prog)
|
(provide 'init-prog)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
@ -54,6 +54,8 @@
|
|||||||
;; Live Coding in Python
|
;; Live Coding in Python
|
||||||
(use-package live-py-mode))
|
(use-package live-py-mode))
|
||||||
|
|
||||||
|
(use-package jupyter)
|
||||||
|
|
||||||
(provide 'init-python)
|
(provide 'init-python)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
@ -33,6 +33,10 @@
|
|||||||
;; Rust
|
;; Rust
|
||||||
(use-package rustic)
|
(use-package rustic)
|
||||||
(use-package rust-playground)
|
(use-package rust-playground)
|
||||||
|
(use-package toml-mode
|
||||||
|
:defer t
|
||||||
|
:config
|
||||||
|
(add-to-list 'auto-mode-alist '("/\\(Cargo.lock\\|\\.cargo/config\\)\\'" . toml-mode)))
|
||||||
|
|
||||||
(provide 'init-rust)
|
(provide 'init-rust)
|
||||||
|
|
||||||
|
|||||||
18
.config/emacs/lisp/init-verilog.el
Normal file
18
.config/emacs/lisp/init-verilog.el
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
;; init-verilog.el -*- lexical-binding: t -*-
|
||||||
|
|
||||||
|
(use-package verilog-mode
|
||||||
|
:ensure nil
|
||||||
|
:init
|
||||||
|
(setq verilog-indent-level 4)
|
||||||
|
(setq verilog-indent-level-module 0)
|
||||||
|
(setq verilog-indent-level-declaration 0)
|
||||||
|
(setq verilog-indent-level-behavioral 0)
|
||||||
|
(setq verilog-indent-level-directive 0)
|
||||||
|
(setq verilog-indent-lists nil)
|
||||||
|
(setq verilog-cexp-indent 4)
|
||||||
|
(setq verilog-case-indent 4)
|
||||||
|
(setq verilog-auto-newline nil))
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'init-verilog)
|
||||||
|
;;; init-verilog.el ends here
|
||||||
Reference in New Issue
Block a user