This plugin is a Neovim plugin to insert ruby notation (ルビ記法) easier.
sv-rubi.nvimは、ルビ記法を容易に挿入するためのNeovimプラグインです。
Also, enabling the API allows for automatic completion of ruby.
また、APIを有効化することにより、ルビの自動補完が可能です。
- Neovim 0.11+
- plenary.nvim
return {
"SetsuVim/sv-rubi.nvim",
cmd = { "RubiInsert", "RubiInsertAC" },
opts = {
-- your options here.
},
}
{
useHWVerticalBar = false, -- false: |対象《ルビ》
-- true: |対象《ルビ》
defaultText = {
target = "Target", -- default text for target
ruby = "R", -- default text for ruby
},
autoComplete = {
-- If you wanna use Auto Complete,
-- you have to agree to the ToS of used API (default is ExcelAPI (https://excelapi.org/terms/) ).
enable = false,
api = {
url = "https://api.excelapi.org/language/kanji2kana", -- API URL
contentQuery = "text", -- Content query
otherQuery = {{}}, -- Other query (e.g. otherQuery = {{ key = "xxx"},)
}
},
}Insert ruby notation in the current cursor position.
現在のカーソル位置にルビ記法を挿入します。
If selected any text in Visual mode, it will be converted to ruby notation.
Visualモードで文字列が選択されている場合は、その文字列をルビ記法に変換します。
Convert selected text to ruby notation and auto complete it.
選択されている文字列をルビ記法に変換し、自動補完します。
To use this function, you have to agree to the ToS of used API,
本機能を有効化するには、使用するAPIの利用規約に同意し、
And you have to set autoComplete.enable to true.
autoComplete.enableをtrueに設定してください。
Default API is ExcelAPI (Terms of Use: here).
デフォルトで設定されているAPIは、ExcelAPIです。 (利用規約はこちら)。
- ExcelAPI (デフォルトAPI / Default API)