size matters.nvim
1.0.0
☕ซีรี่ส์ปลั๊กอิน Soydev
ปลั๊กอิน Lua ที่เพิ่มการปรับสเกลแบบไดนามิกให้กับลูกค้า NeoVim GUI ที่ทันสมัยเช่น Neovide หรือ Goeovim
| แป้นพิมพ์ | คำสั่ง | |
|---|---|---|
| เพิ่มขนาดตัวอักษร | ctrl + + / ctrl + scrollup | 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 - เป็น APIs ที่แนะนำกับ V0.7