machakann / vim-highlightedyank

Make the yanked region apparent!
844 stars 22 forks source link

E120: Using <SID> not in a script context: s:highlight #52

Closed xfzv closed 1 year ago

xfzv commented 1 year ago

After updating to https://github.com/machakann/vim-highlightedyank/commit/03fe057c5836a3f3897a943dc96bdfe3f087890e, I'm no longer getting the highlighting effect and the following error is printed every time: E120: Using <SID> not in a script context: s:highlight.

nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3

I'm using Lazy as package manager and load vim-highlightedyank with:

return {
    "machakann/vim-highlightedyank",
}

I don't know why but the issue persists even when sticking to https://github.com/machakann/vim-highlightedyank/commit/f9db473137ca96c6a989ec3e2b7edf8a3189c448 with:

return {
    "machakann/vim-highlightedyank",
    commit = "f9db473137ca96c6a989ec3e2b7edf8a3189c448",
}

The issue is solved only if I completely disable the plug-in:

return {
    "machakann/vim-highlightedyank",
    enabled = false,
}
machakann commented 1 year ago

Maybe, it is fixed at the latest now. Could you test?

machakann commented 1 year ago

Thanks!

xfzv commented 1 year ago

Can confirm https://github.com/machakann/vim-highlightedyank/commit/fa3f57b097e9521ce41a66b6c7cf5d9adea70ea3 fixed the issue.

Thanks.