@@ 55,6 55,7 @@
- [[https://github.com/minad/marginalia][marginalia]] 補完候補にメタデータ表示を追加
- [[https://github.com/minad/consult][consult]]
- https://github.com/minad/consult/wiki
+ - [[https://github.com/minad/cape][cape]]
- https://github.com/oantolin/
- [[https://github.com/oantolin/embark][embark]] 補完候補に対するアクション
- https://github.com/oantolin/embark/wiki/Default-Actions
@@ 123,6 124,44 @@
:straight t
:after (consult embark))
#+end_src
+
+#+begin_src elisp
+ (use-package cape
+ :straight t
+ ;; Bind dedicated completion commands
+ ;; Alternative prefix keys: C-c p, M-p, M-+, ...
+ :bind (("C-c p p" . completion-at-point) ;; capf
+ ("C-c p t" . complete-tag) ;; etags
+ ("C-c p d" . cape-dabbrev) ;; or dabbrev-completion
+ ("C-c p h" . cape-history)
+ ("C-c p f" . cape-file)
+ ("C-c p k" . cape-keyword)
+ ("C-c p s" . cape-symbol)
+ ("C-c p a" . cape-abbrev)
+ ("C-c p i" . cape-ispell)
+ ("C-c p l" . cape-line)
+ ("C-c p w" . cape-dict)
+ ("C-c p \\" . cape-tex)
+ ("C-c p _" . cape-tex)
+ ("C-c p ^" . cape-tex)
+ ("C-c p &" . cape-sgml)
+ ("C-c p r" . cape-rfc1345))
+ :init
+ ;; Add `completion-at-point-functions', used by `completion-at-point'.
+ (add-to-list 'completion-at-point-functions #'cape-dabbrev)
+ (add-to-list 'completion-at-point-functions #'cape-file)
+ ;;(add-to-list 'completion-at-point-functions #'cape-history)
+ ;;(add-to-list 'completion-at-point-functions #'cape-keyword)
+ ;;(add-to-list 'completion-at-point-functions #'cape-tex)
+ ;;(add-to-list 'completion-at-point-functions #'cape-sgml)
+ ;;(add-to-list 'completion-at-point-functions #'cape-rfc1345)
+ ;;(add-to-list 'completion-at-point-functions #'cape-abbrev)
+ ;;(add-to-list 'completion-at-point-functions #'cape-ispell)
+ ;;(add-to-list 'completion-at-point-functions #'cape-dict)
+ ;;(add-to-list 'completion-at-point-functions #'cape-symbol)
+ ;;(add-to-list 'completion-at-point-functions #'cape-line)
+ )
+#+end_src
** COMMENT treemacs
#+begin_src elisp
(use-package treemacs
@@ 248,7 287,7 @@
(set-face-attribute 'variable-pitch nil :family "Noto Sans CJK JP" :height 120)
#+END_SRC
-** COMMENT mozc
+** mozc
- 日本語入力でmozcを直接呼ぶ
@@ 259,7 298,7 @@
(setq default-input-method "japanese-mozc"))
#+END_SRC
-** skk
+** COMMENT skk
#+begin_src elisp
(use-package ddskk
:straight t
@@ 427,9 466,8 @@
- [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Revert.html][auto-revert-tail-mode]] ログファイルなどの更新を自動で読み込む
** プログラミング
-
*** snippets
-
+**** COMMENT yasnippets
#+begin_src elisp
(use-package yasnippet
:straight t
@@ 440,7 478,47 @@
(use-package yasnippet-snippets
:straight t)
#+end_src
+**** tempel
+#+begin_src elisp
+ ;; Configure Tempel
+ (use-package tempel
+ ;; Require trigger prefix before template name when completing.
+ ;; :custom
+ ;; (tempel-trigger-prefix "<")
+ :straight t
+ :bind (("M-+" . tempel-complete) ;; Alternative tempel-expand
+ ("M-*" . tempel-insert))
+
+ ;; :init
+
+ ;; ;; Setup completion at point
+ ;; (defun tempel-setup-capf ()
+ ;; ;; Add the Tempel Capf to `completion-at-point-functions'.
+ ;; ;; `tempel-expand' only triggers on exact matches. Alternatively use
+ ;; ;; `tempel-complete' if you want to see all matches, but then you
+ ;; ;; should also configure `tempel-trigger-prefix', such that Tempel
+ ;; ;; does not trigger too often when you don't expect it. NOTE: We add
+ ;; ;; `tempel-expand' *before* the main programming mode Capf, such
+ ;; ;; that it will be tried first.
+ ;; (setq-local completion-at-point-functions
+ ;; (cons #'tempel-expand
+ ;; completion-at-point-functions)))
+
+ ;; (add-hook 'prog-mode-hook 'tempel-setup-capf)
+ ;; (add-hook 'text-mode-hook 'tempel-setup-capf)
+
+ ;; Optionally make the Tempel templates available to Abbrev,
+ ;; either locally or globally. `expand-abbrev' is bound to C-x '.
+ ;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
+ ;; (global-tempel-abbrev-mode)
+ )
+ ;; Optional: Add tempel-collection.
+ ;; The package is young and doesn't have comprehensive coverage.
+ (use-package tempel-collection
+ :after tempel
+ :straight t)
+#+end_src
*** COMMENT snippet completion
#+begin_src elisp
(straight-use-package 'company)
@@ 559,6 637,10 @@
(define-derived-mode tsx-web-mode web-mode "tsx" "tsx-mode drived from web-mode")
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-web-mode)))
#+end_src
+*** js
+#+begin_src elisp
+ (setq js-indent-level 2)
+#+end_src
*** python
**** lspの自動判定しきれない場合のためにpyvenv使ってみる
#+begin_src elisp
@@ 592,7 674,10 @@
(use-package go-mode
:straight t)
#+end_src
-
+#+begin_src elisp
+ (use-package gotest
+ :straight t)
+#+end_src
*** rust
#+begin_src elisp
@@ 637,6 722,11 @@
:straight t)
#+end_src
+*** elm
+#+begin_src elisp
+ (use-package elm-mode
+ :straight t)
+#+end_src
*** common lisp
#+begin_src elisp
(use-package slime