Conversation
skkeleton no longer detects the completion engine on its own (vim-skk/skkeleton#253). It takes a named definition through skkeleton#register_completion_backend() and lets the user pick one, so the definition for nvim-cmp has to come from somewhere. Here is the natural place: it follows nvim-cmp's API, which is what this plugin already does. Registration happens on skkeleton-enable-pre, the hook skkeleton documents for setting itself up, and that is early enough because the backend is only consulted while a completion menu is open. It is a no-op for users who do not select this backend, and pcall keeps it quiet on a skkeleton that predates the API. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
delphinus
force-pushed
the
feat/register-completion-backend
branch
from
September 9, 2026 07:44
8b7a957 to
b1196d2
Compare
delphinus
marked this pull request as ready for review
September 10, 2026 09:33
Contributor
Author
|
Skkeleton の方がマージされましたのでこちらをよろしくお願いします。 |
delphinus
added a commit
to delphinus/dotfiles
that referenced
this pull request
Sep 15, 2026
skkeleton 本体から nvim-cmp / pum.vim の backend 定義が外れた (vim-skk/skkeleton#253) ので、その受け皿を core/skkeleton_cmp.lua に書いて いたが、同じものを cmp-skkeleton へ PR 済み (uga-rosa/cmp-skkeleton#4) なので そちらを使う。定義は追従すべき補完エンジンの側に置く、という #253 の方針にも こちらが沿っている。blink 側で blink-cmp-skkeleton がやっているのと同じ形。 fork のレポジトリ名が cmp-skkeleton2 なので、name でプラグイン名を元に揃える (lazy-lock.json のキーと lua のモジュール名を変えないため)。マージされたら branch 指定を外して "uga-rosa/cmp-skkeleton" に戻す。 PR 側は skkeleton-enable-pre で once に登録し、pcall で包んである。設定に 書いていた版は skkeleton の config 内で即時に呼んでいたが、backend は補完 メニューが開いている間しか参照されないのでどちらでも間に合う。 CMP=1 の時だけの経路なので、既定の blink には影響しない。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
変更内容
skkeleton が補完エンジンを自動判定しなくなった (vim-skk/skkeleton#253) ため、nvim-cmp 用のバックエンド定義をこのプラグインから登録するようにしました。
skkeleton は
eggLikeNewlineの<CR>で補完候補を確定するために、補完メニューの表示状態と確定キーを知る必要があります。これまでは skkeleton 側がpum#visible()やrequire("cmp").visible()を直接見て判定していましたが、「バックエンドの定義は追従すべきエンジンの側に置くべき」という方針になり、内蔵していた nvim-cmp / pum.vim の実装が削除されました。登録はこのプラグインが行うので、ユーザーは名前を選ぶだけです。
skkeleton-enable-preで 1 回だけ行います。skkeleton が設定用に案内しているタイミングで、バックエンドは補完メニューが開いている間しか参照されないので間に合います。pcallで包んでいるので、登録 API を持たない古い skkeleton でも何も起きません。このバックエンドを選ばないユーザーにも影響はありません。complete_infoはpackage.loaded.cmpを見るだけでrequireしません。キー入力の度に呼ばれるためです。README の「skkeleton 本体が対応しているので」の記述も更新しました。
注意
vim-skk/skkeleton#253 はまだマージされていないので Draft にしています。マージされ次第 ready にします。