Files
.emacs.d/lisp/init-prog.el

71 lines
1.4 KiB
EmacsLisp
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
;;; init-prog.el --- programming -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;; hideshow折叠代码
(use-package hideshow
:hook
(prog-mode . hs-minor-mode))
;; xref查找引用
(use-package xref
:autoload xref-show-definitions-completing-read
:init
(when (executable-find "rg")
(setq xref-search-program 'ripgrep))
(setq xref-show-definitions-function #'xref-show-definitions-completing-read
xref-show-xrefs-function #'xref-show-definitions-completing-read))
;; flycheck语法检查
(use-package flycheck)
(use-package flycheck-guile
:hook
(scheme-mode . (lambda ()
(require 'flycheck-guile))))
(use-package consult-flycheck)
;; tree-sitter
(use-package treesit-auto
:config
(setq treesit-auto-install 'prompt)
(global-treesit-auto-mode)
(setq treesit-font-lock-level 4))
;; scheme
(use-package geiser
:config
(with-eval-after-load 'geiser
(setq geiser-default-implementation 'guile)))
(use-package geiser-guile)
;; common-lisp
(use-package sly
:config
(setq sly-lisp-implementations nil))
;; markdown
(use-package markdown-mode
:bind
(:map markdown-mode-map
("C-c C-e" . markdown-do))
:hook
(markdown-mode . toggle-truncate-lines)
:init
(setq markdown-command "multimarkdown"
markdown-fontify-code-blocks-natively t))
(use-package edit-indirect)
;; html
(use-package htmlize)
(provide 'init-prog)
;;; init-prog.el ends here