|
|
|
@ -10,6 +10,7 @@
|
|
|
|
|
(global-set-key (kbd "s-x") 'kill-region) ; 对应Windows上面的Ctrol-x 剪切
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(set-default-coding-systems 'utf-8) ; 设置编码
|
|
|
|
|
(global-hl-line-mode 1) ; 高亮当前光标所在行
|
|
|
|
|
;;(set-face-background 'hl-line "#e3f0fe") ; 高亮行的颜色
|
|
|
|
@ -118,6 +119,15 @@
|
|
|
|
|
(setq which-key-suppress-keymap-warning t) ;; 不显示警告信息
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(use-package treesit-auto
|
|
|
|
|
:ensure t
|
|
|
|
|
:demand t
|
|
|
|
|
:config
|
|
|
|
|
(setq treesit-auto-install t)
|
|
|
|
|
(global-treesit-auto-mode)
|
|
|
|
|
(setq treesit-font-lock-level 4)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
|
@ -150,20 +160,19 @@
|
|
|
|
|
(use-package eglot
|
|
|
|
|
:ensure nil
|
|
|
|
|
:init
|
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-ts-mode)) ;; 不知道为啥需要手动设置关联文件类型
|
|
|
|
|
:config
|
|
|
|
|
(add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd"))
|
|
|
|
|
(add-to-list 'eglot-server-programs '((c++-ts-mode c-ts-mode) "clangd"))
|
|
|
|
|
(add-to-list 'eglot-server-programs '(rust-ts-mode "rust-analyzer"))
|
|
|
|
|
(setq c-basic-offset 4)
|
|
|
|
|
(setq eglot-logging t)
|
|
|
|
|
:hook
|
|
|
|
|
(c-mode . eglot-ensure)
|
|
|
|
|
(c++-mode . eglot-ensure)
|
|
|
|
|
(c-ts-mode . eglot-ensure)
|
|
|
|
|
(c++-ts-mode . eglot-ensure)
|
|
|
|
|
(python-ts-mode . eglot-ensure)
|
|
|
|
|
(rust-ts-mode . eglot-ensure)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setq a "~/.emacs.d/")
|
|
|
|
|
|
|
|
|
|
(defun say ())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|