size matters.nvim
1.0.0
soydevプラグインシリーズ。
NeovideやGoenovimなどの最新のNeovim GUIクライアントに動的フォントスケーリングを追加するLUAプラグイン。
| キーマップ | コマンド | |
|---|---|---|
| フォントサイズを増やします | Ctrl + + / Ctrl +スクロールアップ | FontSizeUp <num> |
| フォントサイズを減らします | ctrl + - / ctrl + scrolldown | FontSizeDown <num> |
| フォントをデフォルトにリセットします | Ctrl + alt + = | FontReset |
プラグインをインストールする簡単な方法は、プラグインマネージャーを介して行われます。たとえば、packer.nvim
use " tenxsoydev/size-matters.nvim "次に、他のほとんどのプラグインと同じようにロードします。さらに、GUIクライアントを使用するときにのみロードされるように、条件でラップすることができます。例えば、
if vim . g . neovide or vim . g . goneovim or vim . g . nvui or vim . g . gnvim then
require ( " size-matters " )
endいくつかの構成を変更したい場合、それらはデフォルトです
require ( " size-matters " ). setup ({
default_mappings = true ,
-- font resize step size
step_size = 1 ,
notifications = {
enable = true ,
-- ms how long a notification should be displayed (only applies if notify is used)
timeout = 150 ,
-- the notifications position may be affected by the time it takes for the client to re-render
-- to address this, it can be displayed with a delay.
delay = 300 ,
}
-- the font loaded when using the reset cmd / shortcut
reset_font = vim . api . nvim_get_option ( " guifont " ),
})nvim> = v0.7 -v0.7で導入されたAPIが使用されます。