Closed ryoppippi closed 6 months ago
Hi! Thank you for creating and maintaining this amazing plugin!
I found that when we set up insx for <space> key, the abbrev feature does not work.
<space>
Here is a minimal configuration.
local tmp_dir = "/tmp" local commit_hash = "c1d9efb592787f3f8c6d99db6ed5f51dd9475d4f" -- fectch insx if not exists {{ local insx_path = tmp_dir .. "/insx" if not (vim.uv or vim.loop).fs_stat(insx_path) then vim.fn.system({ "git", "clone", "--filter=blob:none", "--single-branch", "https://github.com/hrsh7th/nvim-insx.git", insx_path, }) end -- checkout commit_hash vim.fn.system({ "git", "-C", insx_path, "checkout", commit_hash, }) vim.opt.runtimepath:prepend(insx_path) -- }} -- setup insx require("insx").add("<Space>", { enabled = function() return false end, action = function(ctx) end, }) -- define abbreviations if (vim.fn.has("nvim-0.10")) ~= 0 then vim.keymap.set("ia", "fu", "fuhahahaha") vim.keymap.set("ca", "sa", "sasumatu") else vim.cmd([[iabbrev <buffer> fu fuhahahaha]]) vim.cmd([[cabbrev <buffer> sa sasumatu]]) end
init.lua
NVIM_APPNAME=insx_abbr nvim -u init.lua
fu<space>
sa<space>
ca
I tested on neovim@v0.9.5 and neovim@v0.10.0-dev-3026+ga41546d4a, and the OS is macOS 14.
neovim@v0.9.5
neovim@v0.10.0-dev-3026+ga41546d4a
Thanks
Description
Hi! Thank you for creating and maintaining this amazing plugin!
I found that when we set up insx for
<space>
key, the abbrev feature does not work.Here is a minimal configuration.
How to reproduce
init.lua
) and yank-paste the above code to the file.NVIM_APPNAME=insx_abbr nvim -u init.lua
)fu<space>
to the buffer (and you can see that abbr does not work)sa<space>
(and you can see thatca
works)I tested on
neovim@v0.9.5
andneovim@v0.10.0-dev-3026+ga41546d4a
, and the OS is macOS 14.Thanks