-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat prefix/suffix conversions #194
Conversation
denops/skkeleton/function/input.ts
Outdated
// suffix | ||
if (context.state.type == "henkan") { | ||
await kakutei(context); | ||
henkanPoint(context); | ||
await acceptResult(context, [">", ""], ""); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to move this to henkan.ts
with a name suffix()
.
However, I did not do it at the moment because acceptResult()
is not exported and I could not replace it with an exported kanaInput()
function.
If we can split the function, I would also rename affix()
to prefix()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simply haven't exported it because I don't use it anywhere else. It's okay to change export it.
context.state.henkanFeed.length > 0 && | ||
["okurinasi", "okuriari"].includes(context.state.mode) | ||
) { | ||
await acceptResult(context, [">", ""], ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignoring user-kana-table by a direct use of acceptResult
No longer needed because it only mattered in my PoC
`affix()` is more robust thant `henkanFirst()` because `affix()` is `state.type`-aware. `henkanFirst()` may determine AffixType if it is undefined. However, the result might be wrong because prefix has higher priority than suffix.
Lint check is failed. Please fix. |
oops. I will |
lint error is fixed |
Thanks. |
>
to enable the feature