feat: add highlighting in eshell , install eshell-syntax-highlighting

fix: typo in init-kbd.el
This commit is contained in:
trogloxene
2026-03-15 14:26:26 +08:00
parent 8c1c211e4b
commit a04242e795
3 changed files with 21 additions and 1 deletions

View File

@@ -27,6 +27,12 @@
(:map corfu-map
("RET" . nil)))
;; 在eshell中使用tab打开补全
(add-hook 'eshell-mode-hook
(lambda ()
(setq-local corfu-auto nil)
(local-set-key (kbd "TAB") 'completion-at-point)))
(use-package emacs
:custom
(tab-always-indent 'complete)

View File

@@ -100,7 +100,7 @@
;; 中键使用embark打开定义
(global-set-key (kbd "<mouse-2>") 'xref-find-definitions)
;; 使用C-c s切换到scrath buffer
;; 使用C-c <delete>切换到scrath buffer
(global-set-key (kbd "C-c <delete>") 'scratch-buffer)
;; 使用M-<方向键>调整window

View File

@@ -20,6 +20,20 @@
sml/theme 'respectful)
(sml/setup))
;; eshell高亮
(use-package eshell-syntax-highlighting
:hook (eshell-mode . eshell-syntax-highlighting-global-mode))
(add-hook 'eshell-mode-hook
(lambda ()
(setenv "TERM" "xterm-256color")
(setenv "COLORTERM" "truecolor")
(add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color t)
(setq-local eshell-prefer-lisp-functions nil)
(setenv "LS_COLORS"
"di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46")
(setenv "GIT_CONFIG_GLOBAL" (expand-file-name "~/.emacs.d/.gitconfig-eshell"))))
;; 高亮当前行
(global-hl-line-mode t)