I hereby claim:
- I am kyure-a on github.
- I am kyure_a (https://keybase.io/kyure_a) on keybase.
- I have a public key ASAXh1e-9tC6Ls0VNIO8rPU7RIYxI6RbMzd4uaCfIY7TyAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
https://github.com/zsh-users/zsh/blob/master/Functions/Zle/predict-on を GPT-3.5 に投げて説明をつけてみた
# このセットの関数は、ある種の魔法の履歴検索を実装しています。
# predict-on 後、文字を入力すると、エディタは履歴を逆に検索し、入力された文字列で始まる最初の行を見つけます。
# predict-off 後、編集は通常のモードに戻り、見つかった行を元に戻します。
# 実際、predict-off を使わなくても十分です。なぜなら、行が履歴に一致しない場合、キーを追加すると通常の補完が実行されるからです。
# ただし、行の中で編集すると、残りの部分が削除される可能性があるため注意が必要です。
# 関数ベースの補完システム(これが必要です)を使用すると、ほとんどどこでもTABを入力して
# カーソルを次の「興味深い」文字位置(通常は現在の単語の終わりですが、時には単語の途中になります)に進めるはずです。
;; eglot-codelens.el --- Add support for codelenses to eglot -*- lexical-binding: t -*- | |
;;; Commentary: | |
;;; Code: | |
;;; Extending eglot to support lenses | |
;;;; Findings | |
;; Lenses often support the option to be used as a code action | |
;; some servers rely on custom code actions implemented by the client | |
;; - [[https://github.com/emacs-lsp/lsp-mode/issues/2250]] mentions this |
(require 's) | |
(require 'cl-lib) | |
(defun zod-union-from-ts-union (region-start region-end) | |
(interactive "r") | |
(let ((str (buffer-substring region-start region-end))) | |
(insert "z.union([\n") | |
(delete-region region-start region-end) | |
(mapcar #'insert (mapcar #'(lambda (x) (s-concat "z.literal(" x "),\n")) (remove-if #'s-blank? (mapcar #'s-trim (s-split "|" str))))) | |
(insert "])"))) |