Skip to content

Commit

Permalink
Merge pull request #13 from dej4vu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dej4vu authored Sep 14, 2024
2 parents 7b021e1 + fd98692 commit 3615b0a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 13 deletions.
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)

0 comments on commit 3615b0a

Please sign in to comment.