.emacs.d/inits/10-iroiro.el
joe 7cb412f51c <think>
Okay, let's look at the diffs provided. The user has made changes to the Emacs configuration file, '10-iroiro.el'. The main changes seem to be replacing some old configurations with new ones.

First, they removed the old line number settings and replaced them with 'global-display-line-numbers'. Then, there's a new function for changing font size. They also added several new packages like 'rainbow-delimiters', 'next-line', 'neotree', 'windmove', 'golden-ratio', 'blacken', 'smartparens', 'which-key', and others.

The commit message needs to be in Japanese, using the correct type prefix. The changes mainly involve adding new configurations and removing old ones. The key points are the introduction of new features and adjustments to the setup.

Looking at the type options, 'feat' is for new features, 'refactor' for restructuring code, 'chore' for maintenance. Since the user is adding new configurations and possibly refactoring the setup, 'refactor' might be appropriate. However, since they're adding new features like rainbow delimiters and font size customization, 'feat' could also fit.

But the main change here is restructuring the configuration, so 'refactor' seems more accurate. The description should mention the changes in line numbers and font size, but keep it concise.

So the commit message would be something like: "refactor: 線番号とフォントサイズの設定を再構築" but need to check the character count and ensure it's in imperative mood. Also, make sure it's under 72 characters.

Wait, the original code had some old settings removed and new ones added. The commit message should reflect that. Maybe "refactor: 線番号とフォントサイズの設定を更新" but check the exact changes.

Alternatively, since the user is adding new packages and adjusting the configuration, maybe 'feat' is better. But the main action is restructuring, so 'refactor' is more accurate.

Final check: the message should be in Japanese, start with the type, be imperative, and concise. So "refactor: 線番号とフォントサイズの設定を再構築" is 22 characters, which is under 72. That should work.
</think>

refactor: 線番号とフォントサイズの設定を再構築
2026-01-28 09:35:00 +09:00

126 lines
3 KiB
EmacsLisp

;; 10-iro-than.el
;; Use-package compatible configuration
;; Global line numbers
(use-package global-display-line-numbers
:ensure t
:config
(global-display-line-numbers-mode))
;; Font size customization
(use-package change-font-size
:ensure t
:config
(defun change-font-size (size)
"Change font size."
(interactive "nEnter size: ")
(set-face-attribute 'default nil :height size)))
;; Rainbow delimiters with stronger colors
(use-package rainbow-delimiters
:ensure t
:config
(defun rainbow-delimiters-using-stronger-colors ()
"Enable rainbow delimiters with stronger colors."
(interactive)
(rainbow-delimiters-mode))
(add-hook 'emacs-startup-hook 'rainbow-delimiters-using-stronger-colors))
;; Next line function
(use-package next-line
:ensure t
:config
(defun next-line (arg)
"Move to next line."
(interactive "p")
(forward-line arg)))
;; Rainbow delimiters (alternative setup)
(use-package rainbow-delimiters
:ensure t
:config
(require 'rainbow-delimiters)
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode))
;; Neotree (sidebar)
(use-package neotree
:ensure t
:config
(global-set-key "\C-o" 'neotree-toggle))
;; Window movement with Ctrl + arrow keys
(use-package windmove
:ensure t
:config
(global-set-key (kbd "\C-c <left>") 'windmove-left)
(global-set-key (kbd "\C-c <right>") 'windmove-right)
(global-set-key (kbd "\C-c <up>") 'windmove-up)
(global-set-key (kbd "\C-c <down>") 'windmove-down))
;; Golden ratio for window splitting
(use-package golden-ratio
:ensure t
:config
(golden-ratio-mode 1)
(add-to-list 'golden-ratio-exclude-buffer-names " *NeoTree*")
(add-to-list 'golden-ratio-exclude-buffer-names " *Ilist*"))
;; Blacken for line wrapping
(use-package blacken
:ensure t
:custom ((blacken-line-length . 119)
(blacken-skip-string-normalization . t)))
;; Smartparens for parentheses
(use-package smartparens
:ensure t
:config
(smartparens-global-mode t))
;; Which-key for key assistance
(use-package which-key
:diminish which-key-mode
:hook (after-init . which-key-mode))
;; Scroll settings
(setq scroll-step 1
scroll-conservatively 1
scroll-margin 5
next-screen-context-lines 1
mouse-wheel-progressive-speed nil)
;; Custom scroll behavior
(defun next-line (arg)
(interactive "p")
(condition-case nil
(line-move arg)
(end-of-buffer)))
;; Line number toggle
(global-set-key (kbd "C-^") 'display-line-numbers-mode)
;; JSON reformat
(require 'json-reformat)
;; Imenu list
(setq speedbar-use-images nil)
(global-set-key (kbd "M-i") 'imenu-list-smart-toggle)
;; Buffer last line cursor behavior
(defun next-line (arg)
(interactive "p")
(condition-case nil
(line-move arg)
(end-of-buffer)))
;; Font size customization
(defun change-font-size (size)
"Change font size (clearly `:height` in `face-attribute`) to given SIZE."
(interactive
(list
(read-number
(format "Input font size (current=%d): " (face-attribute 'default :height))
nil)))
(set-face-attribute 'default nil :height size))