-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: in_string()
errors in ftplugin/lua.lua
#88
Comments
I can't reproduce a glitch, so I'm shooting in the dark. |
Okay, I did some testing, and it appears the issue only occurs in the lua ftplugin ( So this appears to be really an edge case and, nonetheless, it took me a bit to figure out that it is only this specific file. |
I use |
I see, the error makes sense then. So for now, it looks like this works as workaround {
"<",
">",
ft = { "lua" },
cond = function(fn)
return fn.in_string() and not vim.endswith(vim.api.nvim_buf_get_name(0), "/ftplugin/lua.lua")
end,
}, |
in_string()
often errorsin_string()
errors in ftplugin/lua.lua
Thanks for the nice plugin!
So, I often get errors when using a
in_string()
condition. In my case, I wanted to create a rule that pairs<>
in lua when inside a string (useful for writing keymaps such as"<CR>"
).Following the example in the docs, I added this to my config:
Which works, but errors quite often. For instance, when typing
"
here:I get this error:
I also check the
in_string
function in the code itself, and taking a guess from the function's signature, I also tried this;which does not appear to well either.
The text was updated successfully, but these errors were encountered: