Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #13

Merged
merged 2 commits into from
Sep 14, 2024
Merged

Dev #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
(require 'init-yas)
(require 'init-llm)
(require 'init-csv)
(require 'init-lua)

(when (file-exists-p custom-file)
(load custom-file))
Expand Down
2 changes: 2 additions & 0 deletions lisp/init-editing-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
(setq-default
; no share system clipboard
x-select-enable-clipboard nil

;; disable backup files
make-backup-files nil
auto-save-default nil
tab-width 4)
Expand Down
5 changes: 5 additions & 0 deletions lisp/init-lua.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;; lua mode
(use-package lua-mode
:mode (("\\.lua\\'" . lua-mode)))

(provide 'init-lua)
3 changes: 2 additions & 1 deletion lisp/init-package.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
(expand-file-name ".last-package-update-day" user-cache-directory))
:init
(setq auto-package-update-delete-old-versions t
auto-package-update-hide-results t)
auto-package-update-interval 30
auto-package-update-hide-results t)
(auto-package-update-maybe)
(defalias 'upgrade-packages #'auto-package-update-now))

Expand Down
40 changes: 28 additions & 12 deletions lisp/init-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,30 @@
(menu-bar-mode -1)
)

(defun prettify-continuation-indocator (&optional dummy)
(ignore dummy)
(when buffer-display-table
(set-display-table-slot buffer-display-table 'wrap ?↩)))

(unless window-system
(set-display-table-slot standard-display-table 'wrap ?↩)
(add-hook 'window-configuration-change-hook 'prettify-continuation-indocator)
;; 如果还有问题,试着启用以下设置
;; (with-eval-after-load 'page-break-lines
;; (add-hook 'page-break-lines-mode-hook 'prettify-continuation-indocator))
)

;;以下配置是处理 emacs 行尾符合问题
;;当前已禁用x-select-enable-clipboard, 如需同步系统粘贴板需激活该项
;;https://emacs-china.org/t/topic/20161
(set-display-table-slot standard-display-table 'truncation 32)
(set-display-table-slot standard-display-table 'wrap 32)

(defun my/display-truncation-and-wrap-indicator-as-whitespace ()
(when (not (char-table-p buffer-display-table))
(setq buffer-display-table (make-display-table)))
(set-display-table-slot buffer-display-table 'truncation 32)
(set-display-table-slot buffer-display-table 'wrap 32))


(add-hook 'prog-mode-hook #'my/display-truncation-and-wrap-indicator-as-whitespace)
(add-hook 'text-mode-hook #'my/display-truncation-and-wrap-indicator-as-whitespace)

;;(unless window-system
;; (set-display-table-slot standard-display-table 'wrap ?↩)
;; (add-hook 'window-configuration-change-hook 'prettify-continuation-indocator)
;; ;; 如果还有问题,试着启用以下设置
;; ;; (with-eval-after-load 'page-break-lines
;; ;; (add-hook 'page-break-lines-mode-hook 'prettify-continuation-indocator))
;; )

(when (display-graphic-p)
;; disable scroll bar
Expand Down Expand Up @@ -296,4 +308,8 @@
(doom-modeline-mode 1)
)

(use-package xclip
:ensure t
)

(provide 'init-ui)
Loading