監視やっと始めました
This commit is contained in:
commit
c870d37b4b
14 changed files with 663 additions and 0 deletions
127
init.el
Normal file
127
init.el
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
;; ... existing code ...
|
||||
|
||||
;; package.el (Keep this near the top)
|
||||
(require 'package)
|
||||
;; MELPAを追加
|
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
||||
;; MELPA-stableを追加
|
||||
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/"))
|
||||
;; Marmaladeを追加
|
||||
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
|
||||
;; 初期化
|
||||
(package-initialize)
|
||||
;; init.el の内容
|
||||
|
||||
;; パッケージ管理の設定など、最も基本的な設定はここ
|
||||
;; (package-initialize) など
|
||||
|
||||
;; --- init-loader による設定ファイル管理 (2025-07-14) ---
|
||||
|
||||
;; init-loader のログ出力を抑制します。
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(ansi-color-faces-vector
|
||||
[default default default italic underline success warning error])
|
||||
'(beacon-blink-when-focused t)
|
||||
'(beacon-color "brightwhite")
|
||||
'(beacon-mode t)
|
||||
'(blacken-line-length 119 t)
|
||||
'(blacken-skip-string-normalization t t)
|
||||
'(custom-enabled-themes '(doom-tokyo-night rebecca))
|
||||
'(custom-safe-themes
|
||||
'("cffbae32e5e3859f671c4b1dc2a0d95a4a6f2d071f7d9b9adbe66aaf1a865008"
|
||||
"7bcbee7c5eaef0eca0dad6c5ec0ee8f665efd857be421a67be1ce84003d71417"
|
||||
"e1f4f0158cd5a01a9d96f1f7cdcca8d6724d7d33267623cc433fe1c196848554"
|
||||
"77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d"
|
||||
"34cf3305b35e3a8132a0b1bdf2c67623bc2cb05b125f8d7d26bd51fd16d547ec"
|
||||
"93011fe35859772a6766df8a4be817add8bfe105246173206478a0706f88b33d"
|
||||
"2078837f21ac3b0cc84167306fa1058e3199bbd12b6d5b56e3777a4125ff6851"
|
||||
"4b6cc3b60871e2f4f9a026a5c86df27905fb1b0e96277ff18a76a39ca53b82e1"
|
||||
"56044c5a9cc45b6ec45c0eb28df100d3f0a576f18eef33ff8ff5d32bac2d9700"
|
||||
"e8ceeba381ba723b59a9abc4961f41583112fc7dc0e886d9fc36fa1dc37b4079"
|
||||
"5f128efd37c6a87cd4ad8e8b7f2afaba425425524a68133ac0efd87291d05874"
|
||||
"9d5124bef86c2348d7d4774ca384ae7b6027ff7f6eb3c401378e298ce605f83a"
|
||||
"2b501400e19b1dd09d8b3708cefcb5227fda580754051a24e8abf3aff0601f87"
|
||||
"b754d3a03c34cfba9ad7991380d26984ebd0761925773530e24d8dd8b6894738"
|
||||
"9013233028d9798f901e5e8efb31841c24c12444d3b6e92580080505d56fd392"
|
||||
"571661a9d205cb32dfed5566019ad54f5bb3415d2d88f7ea1d00c7c794e70a36"
|
||||
"f5f80dd6588e59cfc3ce2f11568ff8296717a938edd448a947f9823a4e282b66"
|
||||
"a9abd706a4183711ffcca0d6da3808ec0f59be0e8336868669dc3b10381afb6f"
|
||||
"8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443"
|
||||
"37b6695bae243145fa2dfb41440c204cd22833c25cd1993b0f258905b9e65577"
|
||||
"be84a2e5c70f991051d4aaf0f049fa11c172e5d784727e0b525565bb1533ec78"
|
||||
"b9761a2e568bee658e0ff723dd620d844172943eb5ec4053e2b199c59e0bcc22"
|
||||
"9d29a302302cce971d988eb51bd17c1d2be6cd68305710446f658958c0640f68"
|
||||
"2721b06afaf1769ef63f942bf3e977f208f517b187f2526f0e57c1bd4a000350"
|
||||
"da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738"
|
||||
"f053f92735d6d238461da8512b9c071a5ce3b9d972501f7a5e6682a90bf29725"
|
||||
"ff24d14f5f7d355f47d53fd016565ed128bf3af30eb7ce8cae307ee4fe7f3fd0"
|
||||
"df6dfd55673f40364b1970440f0b0cb8ba7149282cf415b81aaad2d98b0f0290"
|
||||
"f4d1b183465f2d29b7a2e9dbe87ccc20598e79738e5d29fc52ec8fb8c576fcfd"
|
||||
"4990532659bb6a285fee01ede3dfa1b1bdf302c5c3c8de9fad9b6bc63a9252f7"
|
||||
"c8b3d9364302b16318e0f231981e94cbe4806cb5cde5732c3e5c3e05e1472434"
|
||||
"38c0c668d8ac3841cb9608522ca116067177c92feeabc6f002a27249976d7434"
|
||||
"dd4582661a1c6b865a33b89312c97a13a3885dc95992e2e5fc57456b4c545176"
|
||||
"e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2"
|
||||
"a9eeab09d61fef94084a95f82557e147d9630fbbb82a837f971f83e66e21e5ad"
|
||||
"c1d5759fcb18b20fd95357dcd63ff90780283b14023422765d531330a3d3cec2"
|
||||
"32f22d075269daabc5e661299ca9a08716aa8cda7e85310b9625c434041916af"
|
||||
"dfb1c8b5bfa040b042b4ef660d0aab48ef2e89ee719a1f24a4629a0c5ed769e8"
|
||||
"02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f"
|
||||
"13096a9a6e75c7330c1bc500f30a8f4407bd618431c94aeab55c9855731a95e1"
|
||||
"8b148cf8154d34917dfc794b5d0fe65f21e9155977a36a5985f89c09a9669aa0"
|
||||
"456697e914823ee45365b843c89fbc79191fdbaff471b29aad9dcbe0ee1d5641"
|
||||
"6f1f6a1a3cff62cc860ad6e787151b9b8599f4471d40ed746ea2819fcd184e1a"
|
||||
"d6b934330450d9de1112cbb7617eaf929244d192c4ffb1b9e6b63ad574784aad"
|
||||
"4ade6b630ba8cbab10703b27fd05bb43aaf8a3e5ba8c2dc1ea4a2de5f8d45882"
|
||||
"4e2e42e9306813763e2e62f115da71b485458a36e8b4c24e17a2168c45c9cf9d"
|
||||
"dccf4a8f1aaf5f24d2ab63af1aa75fd9d535c83377f8e26380162e888be0c6a9"
|
||||
"b5fd9c7429d52190235f2383e47d340d7ff769f141cd8f9e7a4629a81abc6b19"
|
||||
"014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69"
|
||||
"8c7e832be864674c220f9a9361c851917a93f921fedb7717b1b5ece47690c098"
|
||||
"aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8"
|
||||
"4594d6b9753691142f02e67b8eb0fda7d12f6cc9f1299a49b819312d6addad1d"
|
||||
"f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33"
|
||||
"88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e"
|
||||
"9f297216c88ca3f47e5f10f8bd884ab24ac5bc9d884f0f23589b0a46a608fe14"
|
||||
"0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478"
|
||||
"9724b3abaf500b227faa036dcf817abed9764802835ba6e8d1e475c877205157"
|
||||
"3113dce902e6405be7d8b36c61a26c67efee6c996d941bfede102929e07c9384"
|
||||
default))
|
||||
'(inhibit-startup-screen t)
|
||||
'(init-loader-show-log-after-init 'error-only)
|
||||
'(package-selected-packages
|
||||
'(blacken chatgpt-shell ellama elpher flycheck
|
||||
flycheck-color-mode-line flycheck-inline ollama-buddy
|
||||
rainbow-delimiters vertico))
|
||||
'(warning-suppress-log-types '((comp) (comp) (comp))))
|
||||
;; init-loader パッケージをロードします。
|
||||
(require 'init-loader)
|
||||
|
||||
;; init-loader に設定ファイルが置かれているディレクトリを教えます。
|
||||
(setq init-loader-load-path '("~/.emacs.d/inits"))
|
||||
|
||||
;; init-loader に設定ファイルのロードを開始するよう指示します。
|
||||
(init-loader-load)
|
||||
|
||||
;; --- init-loader 設定終了 ---
|
||||
|
||||
|
||||
;(setq chatgpt-shell-anthropic-key "my-key")
|
||||
|
||||
;; ollama-buddyの設定
|
||||
;(require 'ollama-buddy)
|
||||
|
||||
;; 使用したいモデル名を指定
|
||||
;(setq ollama-buddy-default-model "gemma3n:e2b")
|
||||
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(hl-line ((t (:background "gray20")))))
|
||||
6
inits/00-reload.el
Normal file
6
inits/00-reload.el
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(defun reload-init ()
|
||||
"Reload the init file."
|
||||
(interactive)
|
||||
(load-file "~/.emacs.d/init.el"))
|
||||
|
||||
(global-set-key (kbd "C-c \\") 'reload-init)
|
||||
126
inits/10-iroiro.el
Normal file
126
inits/10-iroiro.el
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
|
||||
|
||||
;(global-display-line-numbers-mode)
|
||||
;(global-linum-mode) ;行番号の後にスペースがない謎
|
||||
(line-number-mode t)
|
||||
(column-number-mode t)
|
||||
;(display-line-numbers-mode)
|
||||
|
||||
|
||||
;;auto-complete がフリーズする問題なら
|
||||
(setq ac-use-quick-help nil)
|
||||
|
||||
;;括弧強調
|
||||
(require 'smartparens)
|
||||
(smartparens-global-mode t)
|
||||
|
||||
(add-to-list 'default-frame-alist
|
||||
'(font . "DejaVu Sans Mono-12"))
|
||||
|
||||
;;;https://blog.misosi.ru/2019/08/05/change-emacs-font-size-in-gui-easily/
|
||||
(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)
|
||||
)
|
||||
|
||||
|
||||
;; 折りたたみ設定
|
||||
(add-hook 'prog-mode-hook #'hs-minor-mode)
|
||||
(global-set-key (kbd "C-\\") 'hs-toggle-hiding)
|
||||
(global-set-key (kbd "M-\\") 'hs-hide-all)
|
||||
(global-set-key (kbd "M-\|") 'hs-show-all)
|
||||
|
||||
;;;https://qiita.com/muyuu/items/63a82c819bbbe65d37a2
|
||||
;;;trampでリモートサーバのファイルをSSH経由で編集
|
||||
(require 'tramp)
|
||||
(setq tramp-default-method "sshx")
|
||||
|
||||
;; Windowスプリットするサイズを自動調整
|
||||
(golden-ratio-mode -1)
|
||||
(add-to-list 'golden-ratio-exclude-buffer-names " *NeoTree*")
|
||||
(add-to-list 'golden-ratio-exclude-buffer-names " *Ilist*")
|
||||
|
||||
|
||||
(leaf blacken
|
||||
:ensure t
|
||||
:custom ((blacken-line-length . 119) ; 1行の流さを119文字まで許可
|
||||
(blacken-skip-string-normalization . t))) ; 文字リテラルの「''」を「""」に変更しないように抑制
|
||||
|
||||
;;括弧を色分け
|
||||
(leaf rainbow-delimiters
|
||||
:ensure t
|
||||
:hook
|
||||
((prog-mode-hook . rainbow-delimiters-mode)))
|
||||
|
||||
;;https://qiita.com/megane42/items/ee71f1ff8652dbf94cf7
|
||||
;; rainbow-delimiters を使うための設定
|
||||
(require 'rainbow-delimiters)
|
||||
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
|
||||
|
||||
|
||||
;; 括弧の色を強調する設定
|
||||
(require 'cl-lib)
|
||||
(require 'color)
|
||||
(defun rainbow-delimiters-using-stronger-colors ()
|
||||
(interactive)
|
||||
(cl-loop
|
||||
for index from 1 to rainbow-delimiters-max-face-count
|
||||
do
|
||||
(let ((face (intern (format "rainbow-delimiters-depth-%d-face" index))))
|
||||
(cl-callf color-saturate-name (face-foreground face) 30))))
|
||||
(add-hook 'emacs-startup-hook 'rainbow-delimiters-using-stronger-colors)
|
||||
;; rainbow-delimiters
|
||||
;(require 'rainbow-delimiters)
|
||||
;(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
|
||||
|
||||
|
||||
;; neotree(サイドバー)
|
||||
(require 'neotree)
|
||||
(global-set-key "\C-o" 'neotree-toggle)
|
||||
|
||||
;;window移動にCTRL+カーソルを使う!
|
||||
(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)
|
||||
|
||||
;; scroll 1行
|
||||
(setq scroll-step 1)
|
||||
(setq scroll-conservatively 1)
|
||||
(setq scroll-margin 5)
|
||||
(setq next-screen-context-lines 1)
|
||||
|
||||
;; スクロールは1行ごとに
|
||||
;(setq mouse-wheel-scroll-amount '(1 ((shift) . 5)))
|
||||
|
||||
;; スクロールの加速をやめる
|
||||
(setq mouse-wheel-progressive-speed nil)
|
||||
|
||||
;; bufferの最後でカーソルを動かそうとしても音をならなくする
|
||||
(defun next-line (arg)
|
||||
(interactive "p")
|
||||
(condition-case nil
|
||||
(line-move arg)
|
||||
(end-of-buffer)))
|
||||
|
||||
;;imenu-list
|
||||
(setq speedbar-use-images nil)
|
||||
(global-set-key (kbd "M-i") 'imenu-list-smart-toggle)
|
||||
|
||||
;; 行番号トグル
|
||||
(global-set-key (kbd "C-^") 'display-line-numbers-mode)
|
||||
|
||||
;;json
|
||||
(require 'json-reformat)
|
||||
|
||||
;; キーアシスト
|
||||
(use-package which-key
|
||||
:diminish which-key-mode
|
||||
:hook (after-init . which-key-mode))
|
||||
87
inits/10-theme.el
Normal file
87
inits/10-theme.el
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
(require 'ansi-color)
|
||||
(add-hook 'compilation-filter-hook
|
||||
(lambda ()
|
||||
(ansi-color-apply-on-region (point-min) (point-max))))
|
||||
|
||||
(defvar beacon-mode nil
|
||||
"Non-nil if Beacon mode is enabled.")
|
||||
(setq beacon-mode 1)
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(ansi-color-faces-vector
|
||||
[default default default italic underline success warning error])
|
||||
'(beacon-blink-when-focused t)
|
||||
'(beacon-color "brightwhite")
|
||||
'(beacon-mode t)
|
||||
'(blacken-line-length 119 t)
|
||||
'(blacken-skip-string-normalization t t)
|
||||
'(custom-enabled-themes '(doom-tokyo-night rebecca))
|
||||
'(custom-safe-themes
|
||||
'("cffbae32e5e3859f671c4b1dc2a0d95a4a6f2d071f7d9b9adbe66aaf1a865008"
|
||||
"7bcbee7c5eaef0eca0dad6c5ec0ee8f665efd857be421a67be1ce84003d71417"
|
||||
"e1f4f0158cd5a01a9d96f1f7cdcca8d6724d7d33267623cc433fe1c196848554"
|
||||
"77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d"
|
||||
"34cf3305b35e3a8132a0b1bdf2c67623bc2cb05b125f8d7d26bd51fd16d547ec"
|
||||
"93011fe35859772a6766df8a4be817add8bfe105246173206478a0706f88b33d"
|
||||
"2078837f21ac3b0cc84167306fa1058e3199bbd12b6d5b56e3777a4125ff6851"
|
||||
"4b6cc3b60871e2f4f9a026a5c86df27905fb1b0e96277ff18a76a39ca53b82e1"
|
||||
"56044c5a9cc45b6ec45c0eb28df100d3f0a576f18eef33ff8ff5d32bac2d9700"
|
||||
"e8ceeba381ba723b59a9abc4961f41583112fc7dc0e886d9fc36fa1dc37b4079"
|
||||
"5f128efd37c6a87cd4ad8e8b7f2afaba425425524a68133ac0efd87291d05874"
|
||||
"9d5124bef86c2348d7d4774ca384ae7b6027ff7f6eb3c401378e298ce605f83a"
|
||||
"2b501400e19b1dd09d8b3708cefcb5227fda580754051a24e8abf3aff0601f87"
|
||||
"b754d3a03c34cfba9ad7991380d26984ebd0761925773530e24d8dd8b6894738"
|
||||
"9013233028d9798f901e5e8efb31841c24c12444d3b6e92580080505d56fd392"
|
||||
"571661a9d205cb32dfed5566019ad54f5bb3415d2d88f7ea1d00c7c794e70a36"
|
||||
"f5f80dd6588e59cfc3ce2f11568ff8296717a938edd448a947f9823a4e282b66"
|
||||
"a9abd706a4183711ffcca0d6da3808ec0f59be0e8336868669dc3b10381afb6f"
|
||||
"8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443"
|
||||
"37b6695bae243145fa2dfb41440c204cd22833c25cd1993b0f258905b9e65577"
|
||||
"be84a2e5c70f991051d4aaf0f049fa11c172e5d784727e0b525565bb1533ec78"
|
||||
"b9761a2e568bee658e0ff723dd620d844172943eb5ec4053e2b199c59e0bcc22"
|
||||
"9d29a302302cce971d988eb51bd17c1d2be6cd68305710446f658958c0640f68"
|
||||
"2721b06afaf1769ef63f942bf3e977f208f517b187f2526f0e57c1bd4a000350"
|
||||
"da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738"
|
||||
"f053f92735d6d238461da8512b9c071a5ce3b9d972501f7a5e6682a90bf29725"
|
||||
"ff24d14f5f7d355f47d53fd016565ed128bf3af30eb7ce8cae307ee4fe7f3fd0"
|
||||
"df6dfd55673f40364b1970440f0b0cb8ba7149282cf415b81aaad2d98b0f0290"
|
||||
"f4d1b183465f2d29b7a2e9dbe87ccc20598e79738e5d29fc52ec8fb8c576fcfd"
|
||||
"4990532659bb6a285fee01ede3dfa1b1bdf302c5c3c8de9fad9b6bc63a9252f7"
|
||||
"c8b3d9364302b16318e0f231981e94cbe4806cb5cde5732c3e5c3e05e1472434"
|
||||
"38c0c668d8ac3841cb9608522ca116067177c92feeabc6f002a27249976d7434"
|
||||
"dd4582661a1c6b865a33b89312c97a13a3885dc95992e2e5fc57456b4c545176"
|
||||
"e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2"
|
||||
"a9eeab09d61fef94084a95f82557e147d9630fbbb82a837f971f83e66e21e5ad"
|
||||
"c1d5759fcb18b20fd95357dcd63ff90780283b14023422765d531330a3d3cec2"
|
||||
"32f22d075269daabc5e661299ca9a08716aa8cda7e85310b9625c434041916af"
|
||||
"dfb1c8b5bfa040b042b4ef660d0aab48ef2e89ee719a1f24a4629a0c5ed769e8"
|
||||
"02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f"
|
||||
"13096a9a6e75c7330c1bc500f30a8f4407bd618431c94aeab55c9855731a95e1"
|
||||
"8b148cf8154d34917dfc794b5d0fe65f21e9155977a36a5985f89c09a9669aa0"
|
||||
"456697e914823ee45365b843c89fbc79191fdbaff471b29aad9dcbe0ee1d5641"
|
||||
"6f1f6a1a3cff62cc860ad6e787151b9b8599f4471d40ed746ea2819fcd184e1a"
|
||||
"d6b934330450d9de1112cbb7617eaf929244d192c4ffb1b9e6b63ad574784aad"
|
||||
"4ade6b630ba8cbab10703b27fd05bb43aaf8a3e5ba8c2dc1ea4a2de5f8d45882"
|
||||
"4e2e42e9306813763e2e62f115da71b485458a36e8b4c24e17a2168c45c9cf9d"
|
||||
"dccf4a8f1aaf5f24d2ab63af1aa75fd9d535c83377f8e26380162e888be0c6a9"
|
||||
"b5fd9c7429d52190235f2383e47d340d7ff769f141cd8f9e7a4629a81abc6b19"
|
||||
"014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69"
|
||||
"8c7e832be864674c220f9a9361c851917a93f921fedb7717b1b5ece47690c098"
|
||||
"aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8"
|
||||
"4594d6b9753691142f02e67b8eb0fda7d12f6cc9f1299a49b819312d6addad1d"
|
||||
"f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33"
|
||||
"88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e"
|
||||
"9f297216c88ca3f47e5f10f8bd884ab24ac5bc9d884f0f23589b0a46a608fe14"
|
||||
"0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478"
|
||||
"9724b3abaf500b227faa036dcf817abed9764802835ba6e8d1e475c877205157"
|
||||
"3113dce902e6405be7d8b36c61a26c67efee6c996d941bfede102929e07c9384"
|
||||
default))
|
||||
'(inhibit-startup-screen t)
|
||||
'(package-selected-packages
|
||||
'(blacken chatgpt-shell ellama elpher flycheck
|
||||
flycheck-color-mode-line flycheck-inline ollama-buddy
|
||||
rainbow-delimiters))
|
||||
'(warning-suppress-log-types '((comp) (comp) (comp))))
|
||||
37
inits/11-vertico.el
Normal file
37
inits/11-vertico.el
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
;;; -*- lexical-binding: t; -*-
|
||||
;; Vertico configuration (Version: 2026-01-10)
|
||||
|
||||
(use-package vertico
|
||||
:ensure t
|
||||
:init
|
||||
(vertico-mode))
|
||||
|
||||
;; 候補の絞り込みを強力にする設定(推奨)
|
||||
(use-package orderless
|
||||
:ensure t
|
||||
:custom
|
||||
(completion-styles '(orderless basic))
|
||||
(completion-category-defaults nil)
|
||||
(completion-category-overrides '((file (styles . (partial-completion))))))
|
||||
|
||||
;; 候補に詳細情報を追加する設定(推奨)
|
||||
(use-package marginalia
|
||||
:ensure t
|
||||
:init
|
||||
(marginalia-mode))
|
||||
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
;; Vertico Directory Navigation (Version: 2026-01-10)
|
||||
|
||||
(use-package vertico
|
||||
:ensure t
|
||||
:bind (:map vertico-map
|
||||
;; Enterでディレクトリなら中に入り、ファイルなら開く
|
||||
("RET" . vertico-directory-enter)
|
||||
;; Backspaceで親ディレクトリに移動
|
||||
("DEL" . vertico-directory-delete-char)
|
||||
;; M-DEL で一気に親ディレクトリまで削除
|
||||
("M-DEL" . vertico-directory-delete-word))
|
||||
:hook (rfn-eshadow-update-overlay . vertico-directory-tidy)
|
||||
:init
|
||||
(vertico-mode))
|
||||
40
inits/14-hokan.el
Normal file
40
inits/14-hokan.el
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
;; ivy設定
|
||||
(require 'ivy)
|
||||
(ivy-mode 1)
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq enable-recursive-minibuffers t)
|
||||
(setq ivy-height 30) ;; minibufferのサイズを拡大!(重要)
|
||||
(setq ivy-extra-directories nil)
|
||||
(setq ivy-re-builders-alist
|
||||
'((t . ivy--regex-plus)))
|
||||
|
||||
(require 'company)
|
||||
(global-company-mode) ; 全バッファで有効にする
|
||||
(setq company-transformers '(company-sort-by-backend-importance)) ;; ソート順
|
||||
(setq company-idle-delay 0.0) ; デフォルトは0.5
|
||||
(setq company-minimum-prefix-length 2) ; デフォルトは4
|
||||
(setq company-selection-wrap-around t) ; 候補の一番下でさらに下に行こうとすると一番上に戻る
|
||||
(setq completion-ignore-case t)
|
||||
(setq company-dabbrev-downcase nil)
|
||||
(global-set-key (kbd "C-M-i") 'company-complete)
|
||||
(define-key company-active-map (kbd "C-n") 'company-select-next) ;; C-n, C-pで補完候補を次/前の候補を選択
|
||||
(define-key company-active-map (kbd "C-p") 'company-select-previous)
|
||||
(define-key company-search-map (kbd "C-n") 'company-select-next)
|
||||
(define-key company-search-map (kbd "C-p") 'company-select-previous)
|
||||
(define-key company-active-map (kbd "C-s") 'company-filter-candidates) ;; C-sで絞り込む
|
||||
(define-key company-active-map (kbd "C-i") 'company-complete-selection) ;; TABで候補を設定
|
||||
(define-key company-active-map [tab] 'company-complete-selection) ;; TABで候補を設定
|
||||
(define-key company-active-map (kbd "C-f") 'company-complete-selection) ;; C-fで候補を設定
|
||||
(define-key emacs-lisp-mode-map (kbd "C-M-i") 'company-complete) ;; 各種メジャーモードでも C-M-iで company-modeの補完を使う
|
||||
|
||||
;; yasnippetとの連携
|
||||
(defvar company-mode/enable-yas t
|
||||
"Enable yasnippet for all backends.")
|
||||
(defun company-mode/backend-with-yas (backend)
|
||||
(if (or (not company-mode/enable-yas) (and (listp backend) (member 'company-yasnippet backend)))
|
||||
backend
|
||||
(append (if (consp backend) backend (list backend))
|
||||
'(:with company-yasnippet))))
|
||||
(setq company-backends (mapcar #'company-mode/backend-with-yas company-backends))
|
||||
|
||||
|
||||
9
inits/20-gptel.el
Normal file
9
inits/20-gptel.el
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
;; Version: 2026-01-05
|
||||
(use-package gptel
|
||||
:ensure t ; これが自動インストールのスイッチです
|
||||
:config
|
||||
(setq gptel-backend
|
||||
(gptel-make-ollama "Ollama"
|
||||
:host "localhost:11435" ; SSH先で動いている場合
|
||||
:stream t
|
||||
:models '("qwen3:4b" "codellama" "gpt-oss:20b"))))
|
||||
86
inits/20-ollama-buddy.el
Normal file
86
inits/20-ollama-buddy.el
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
;; --- Ollama Buddy 設定開始 (2025-07-14) ---
|
||||
|
||||
;; ollama-buddy パッケージをロードします。
|
||||
;; この行はollama-buddyをEmacsで利用可能にするために必須です。
|
||||
(require 'ollama-buddy)
|
||||
|
||||
;; デフォルトのOllamaモデルを設定します。
|
||||
;; あなたがインストール済みの "gemma3n:e2b" を指定します。
|
||||
;; ここで指定したモデルが、チャット開始時のデフォルトになります。
|
||||
;(setq ollama-buddy-default-model "gemma3n:e2b")
|
||||
|
||||
;; 必要であれば、Ollamaサーバーのエンドポイントを指定します。
|
||||
;; 通常はOllamaがデフォルトのポートで起動していればこの行は不要です。
|
||||
;; 例: (setq ollama-buddy-server-url "http://localhost:11434/api/generate")
|
||||
;;(setq ollama-buddy-server-url "http://ollama.lxd:11434/api/generate")
|
||||
;(setq ollama-buddy-server-url "http://10.10.100.242:11434/api/generate")
|
||||
(setq ollama-buddy-server-url "http://127.0.0.1:11435/api/generate")
|
||||
|
||||
;; Ollama Buddy 関連コマンドのプレフィックスキーマップを定義します。
|
||||
;; Emacsのバージョンが古い場合 (Emacs 29未満) でも動作するように `make-keymap` を使用します。
|
||||
;; これにより、`C-c o` を押した後、次に続くキーで様々なollama-buddy機能にアクセスできます。
|
||||
(setq ollama-buddy-map (make-keymap))
|
||||
(global-set-key (kbd "C-c o") ollama-buddy-map)
|
||||
|
||||
;; --- 基本的な Ollama Buddy コマンドへのキーバインド ---
|
||||
;; `C-c o` の後に続くキーを設定します
|
||||
|
||||
;; 新しいチャットセッションを開始します。
|
||||
;; `M-x ollama-buddy--open-chat` と同じ動作です。
|
||||
(define-key ollama-buddy-map (kbd "c") 'ollama-buddy--open-chat)
|
||||
|
||||
;; 現在の選択範囲(リージョン)をプロンプトとして Ollama に送信し、新しいチャットで応答を得ます。
|
||||
(define-key ollama-buddy-map (kbd "r") 'ollama-buddy-chat-region)
|
||||
|
||||
;; 現在のバッファ全体の内容をプロンプトとして Ollama に送信し、新しいチャットで応答を得ます。
|
||||
(define-key ollama-buddy-map (kbd "b") 'ollama-buddy-chat-buffer)
|
||||
|
||||
;; ミニバッファでプロンプトを入力し、その Ollama からの応答を現在のカーソル位置に挿入します。
|
||||
;; コードスニペットの生成などに便利です。
|
||||
(define-key ollama-buddy-map (kbd "i") 'ollama-buddy-insert-at-point)
|
||||
|
||||
;; --- カスタムアシストコマンドの定義とキーバインド ---
|
||||
;; よく使う指示を関数化し、専用のキーバインドで簡単に呼び出せるようにします。
|
||||
|
||||
;; 選択範囲のコードをリファクタリングする関数
|
||||
;; `C-c o R` で呼び出せます。
|
||||
(defun my-ollama-refactor-region ()
|
||||
"Selected region is sent to ollama for refactoring to be more efficient and readable."
|
||||
(interactive) ; この関数を M-x で実行可能にする
|
||||
(let ((prompt-prefix "Refactor this code to be more efficient and readable: "))
|
||||
;; `nil` を渡すことで、結果は新しいチャットバッファで表示されます。
|
||||
(ollama-buddy-chat-region nil prompt-prefix)))
|
||||
(define-key ollama-buddy-map (kbd "R") 'my-ollama-refactor-region)
|
||||
|
||||
;; 選択範囲のコードを詳細に説明する関数
|
||||
;; `C-c o E` で呼び出せます。
|
||||
(defun my-ollama-explain-region ()
|
||||
"Selected region is sent to ollama for detailed explanation."
|
||||
(interactive)
|
||||
(let ((prompt-prefix "Explain this code in detail: "))
|
||||
(ollama-buddy-chat-region nil prompt-prefix)))
|
||||
(define-key ollama-buddy-map (kbd "E") 'my-ollama-explain-region)
|
||||
|
||||
;; 選択範囲のコードと任意のエラーメッセージをデバッグのために送信する関数
|
||||
;; `C-c o D` で呼び出せます。エラーメッセージはミニバッファで尋ねられます。
|
||||
(defun my-ollama-debug-region ()
|
||||
"Selected region and optional error message sent to ollama for debugging."
|
||||
(interactive)
|
||||
(let* ((error-message (read-string "Enter error message (optional): ")) ; エラーメッセージを入力プロンプト
|
||||
(prompt-prefix (if (string-empty-p error-message) ; エラーメッセージが空でなければ、プロンプトに含める
|
||||
"Debug this code: "
|
||||
(format "Debug this code, given the error: \"%s\"\nCode: " error-message))))
|
||||
(ollama-buddy-chat-region nil prompt-prefix)))
|
||||
(define-key ollama-buddy-map (kbd "D") 'my-ollama-debug-region)
|
||||
|
||||
;; (string-empty-p ...) 関数は一部の古いEmacsバージョンでは定義されていない場合があります。
|
||||
;; もし "void-function string-empty-p" エラーが出た場合、以下のコメントアウトを外してください。
|
||||
;; (unless (fboundp 'string-empty-p)
|
||||
;; (defun string-empty-p (str)
|
||||
;; "Return t if STR is nil or an empty string."
|
||||
;; (or (null str) (string= str ""))))
|
||||
|
||||
;; --- Ollama Buddy 設定終了 ---
|
||||
|
||||
(global-set-key (kbd "C-c r") 'my-ollama-refactor-region) ;; Ctrl-c r にバインド
|
||||
|
||||
13
inits/22-aidermacs.el
Normal file
13
inits/22-aidermacs.el
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
;(leaf aidermacs
|
||||
; :ensure t
|
||||
; :bind
|
||||
; (("C-c C-a" . aidermacs-transient-menu))
|
||||
; :config
|
||||
; (load "~/.emacs.d/secrets.el")
|
||||
; (setenv "OLLAMA_API_KEY" "YOUR_API_KEY")
|
||||
; (setenv "OLLAMA_MODEL" "gemma3n:e2b")
|
||||
; )
|
||||
;
|
||||
;(leaf ediff
|
||||
; :custom
|
||||
; (ediff-window-setup-function . 'ediff-setup-windows-plain))
|
||||
11
inits/23-aider.el
Normal file
11
inits/23-aider.el
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(use-package aider
|
||||
:ensure t
|
||||
:config
|
||||
; (setenv "OLLAMA_API_BASE" "http://127.0.0.1:11431")
|
||||
;;(setq aider-ollama-base-url "http://127.0.0.1:11431")
|
||||
(setq aidermacs-default-model "ollama_chat/qwen3-coder:8b")
|
||||
(setq aidermacs-weak-model "ollama_chat/qwen3-coder:8b")
|
||||
(define-key global-map (kbd "C-c a m") 'aidermacs-transient-menu)
|
||||
(define-key global-map (kbd "C-c a a") 'aidermacs-run)
|
||||
(define-key global-map (kbd "C-c a f") 'aider-add-current-file)
|
||||
(define-key global-map (kbd "C-c a q") 'aider-ask-question))
|
||||
14
inits/40-git.el
Normal file
14
inits/40-git.el
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
;;-- git-gutter
|
||||
(use-package git-gutter
|
||||
:custom
|
||||
(git-gutter:modified-sign "~")
|
||||
(git-gutter:added-sign "+")
|
||||
(git-gutter:deleted-sign "-")
|
||||
:custom-face
|
||||
(git-gutter:modified ((t (:background "#f1fa8c"))))
|
||||
(git-gutter:added ((t (:background "#50fa7b"))))
|
||||
(git-gutter:deleted ((t (:background "#ff79c6"))))
|
||||
:config
|
||||
(global-git-gutter-mode +1))
|
||||
(set-face-foreground 'font-lock-comment-face "#6a5acd")
|
||||
|
||||
32
inits/40-python.el
Normal file
32
inits/40-python.el
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
(elpy-enable)
|
||||
|
||||
;;https://qiita.com/fujimisakari/items/74e32eddb78dff4be585
|
||||
(add-to-list 'load-path "~/.emacs.d/py-autopep8.el/")
|
||||
(require 'py-autopep8)
|
||||
(define-key python-mode-map (kbd "C-c F") 'py-autopep8) ; バッファ全体のコード整形
|
||||
(define-key python-mode-map (kbd "C-c f") 'py-autopep8-region) ; 選択リジョン内のコード整形
|
||||
|
||||
;; 保存時にバッファ全体を自動整形する
|
||||
(add-hook 'before-save-hook 'py-autopep8-before-save)
|
||||
|
||||
|
||||
;;構文チェッカー 正しく機能しない希ガス うるさい
|
||||
(leaf flycheck
|
||||
:ensure t
|
||||
:hook (prog-mode-hook . flycheck-mode)
|
||||
:custom ((flycheck-display-errors-delay . 0.3))
|
||||
:config
|
||||
(leaf flycheck-inline
|
||||
:ensure t
|
||||
:hook (flycheck-mode-hook . flycheck-inline-mode))
|
||||
(leaf flycheck-color-mode-line
|
||||
:ensure t
|
||||
:hook (flycheck-mode-hook . flycheck-color-mode-line-mode)))
|
||||
|
||||
;;バッファ保存時に「常に」blackをかけたいとき
|
||||
(declare-function python-black-on-save-mode "python-black")
|
||||
(add-hook 'python-mode-hook
|
||||
#'(lambda ()
|
||||
(python-black-on-save-mode)))
|
||||
|
||||
6
inits/40-rust.el
Normal file
6
inits/40-rust.el
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
;;rust
|
||||
(add-to-list 'exec-path (expand-file-name "~/.cargo/bin/"))
|
||||
(setq-default rustic-format-trigger 'on-save)
|
||||
(setq rustic-lsp-server 'rust-analyzer)
|
||||
|
||||
|
||||
69
inits/50-faces-cui-gui-color.el
Normal file
69
inits/50-faces-cui-gui-color.el
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; CUI GUIで切り替え;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(if (not window-system) (progn
|
||||
;; ←CUI用設定を、ここに記述;;;;;;;;;;;;;;;;
|
||||
;; 現在の行番号ハイライト
|
||||
(require 'hlinum)
|
||||
(hlinum-activate)
|
||||
(set-face-foreground 'linum-highlight-face "gray10")
|
||||
(set-face-background 'linum-highlight-face "SteelBlue4")
|
||||
;;インデントのビジュアル化
|
||||
(require 'highlight-indentation)
|
||||
(highlight-indentation-mode t)
|
||||
'((t :background "midnight blue"))
|
||||
(set-face-background 'highlight-indentation-face "gray15") ; 18/235 235=gray15
|
||||
(set-face-background 'highlight-indentation-current-column-face "gray30")
|
||||
;;現在行の強調
|
||||
(global-hl-line-mode t)
|
||||
(custom-set-faces
|
||||
'(hl-line ((t (:background "gray20"))))) ;color-234/17/20
|
||||
(custom-set-variables
|
||||
'(beacon-mode t)
|
||||
'(beacon-color "brightwhite")
|
||||
'(beacon-blink-when-focused t) )
|
||||
;;バックグラウンドカラー
|
||||
;(set-face-background 'default "color-233") ;17/234
|
||||
(set-face-foreground 'region "black")
|
||||
(set-face-background 'region "dim gray")
|
||||
;;modeline
|
||||
(set-face-background 'mode-line "#5f00d7") ;"navy");"slateblue3") ;"purple")
|
||||
;(set-face-background 'mode-line "color-53");;54;55;56;57
|
||||
(set-face-background 'mode-line-inactive "midnight blue") ;;54;55;56;57
|
||||
));;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(if window-system (progn
|
||||
;; ←GUI用設定を、ここに記述;;;;;;;;;;;;;;
|
||||
(require 'hlinum)
|
||||
(hlinum-activate)
|
||||
;(set-face-foreground 'linum-highlight-face "gray10")
|
||||
;(set-face-background 'linum-highlight-face "SteelBlue4")
|
||||
;;インデントのビジュアル化
|
||||
(require 'highlight-indentation)
|
||||
(highlight-indentation-mode t)
|
||||
'((t :background "midnight blue"))
|
||||
(set-face-background 'highlight-indentation-face "gray14")
|
||||
;(set-face-background 'highlight-indentation-current-column-face "gray30")
|
||||
;;現在行の強調
|
||||
(global-hl-line-mode t)
|
||||
(custom-set-faces
|
||||
'(hl-line ((t (:background "gray18")))) ;gray18;17
|
||||
)
|
||||
(custom-set-variables
|
||||
'(beacon-mode t)
|
||||
'(beacon-color "LavenderBlush1")
|
||||
'(beacon-blink-when-focused t) )
|
||||
;;バックグラウンドカラー
|
||||
;(set-face-background 'default "color-235")
|
||||
(set-face-foreground 'region "black")
|
||||
(set-face-background 'region "dim gray")
|
||||
;;modeline
|
||||
(set-face-background 'mode-line "Dark Slate Blue") ;"gray24") ;dark slate blue")
|
||||
(set-face-background 'mode-line-inactive "midnight blue")
|
||||
));;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(hl-line ((t (:background "gray20")))))
|
||||
Loading…
Reference in a new issue