Skip to content
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

Merged
merged 14 commits into from
Jun 9, 2024
Merged

Feat prefix/suffix conversions #194

merged 14 commits into from
Jun 9, 2024

Conversation

atusy
Copy link
Contributor

@atusy atusy commented Jun 8, 2024

Comment on lines 204 to 210
// suffix
if (context.state.type == "henkan") {
await kakutei(context);
henkanPoint(context);
await acceptResult(context, [">", ""], "");
return;
}
Copy link
Contributor Author

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().

Copy link
Member

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, [">", ""], "");
Copy link
Contributor Author

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

atusy added 2 commits June 8, 2024 18:22
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.
@Shougo
Copy link
Contributor

Shougo commented Jun 9, 2024

Lint check is failed. Please fix.

@atusy
Copy link
Contributor Author

atusy commented Jun 9, 2024

oops. I will

@atusy
Copy link
Contributor Author

atusy commented Jun 9, 2024

lint error is fixed

@kuuote
Copy link
Member

kuuote commented Jun 9, 2024

Thanks.

@kuuote kuuote merged commit e660dc2 into vim-skk:main Jun 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants