Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sv-rubi.nvim

A Neovim plugin to insert ruby notation (ルビ記法) in your file.

Built for Neovim Required Neovim 0.11+
License

✨ 概要 - Overview -

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を有効化することにより、ルビの自動補完が可能です。

💼 依存関係 - Dependencies -

🔧 インストール - Install -

In Neovim

lazy.nvim

return {
    "SetsuVim/sv-rubi.nvim",
    cmd = { "RubiInsert", "RubiInsertAC" },
    opts = {
        -- your options here.
    },
}

🛠️ オプション - Options -

{
    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"},)
        }
    },
}

🔠 コマンド/関数 - Commands/Functions -

RubiInsert (require("sv-rubi").RubiInsert)

Insert ruby notation in the current cursor position.
現在のカーソル位置にルビ記法を挿入します。
If selected any text in Visual mode, it will be converted to ruby notation.
Visualモードで文字列が選択されている場合は、その文字列をルビ記法に変換します。

RubiInsertAC (require("sv-rubi").RubiInsertAC)

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です。 (利用規約はこちら)。

💡 使用ソフトウェア類 - Used Software -

  • ExcelAPI (デフォルトAPI / Default API)

About

A Neovim plugin to insert ruby-notation (ルビ記法) in your file.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages