:Luadev error E944
justinmk opened this issue · comments
With Nvim current master, :Luadev
command gives me this error:
E5105: Error while calling lua chunk: ...config/nvim/pack/minpac/start/nvim-luadev/lua/luadev.lua:14: Vim(return):E944: Reverse range in character class
Weird, that line is:
a.nvim_buf_set_name(buf, "[nvim-lua]")
but sure enough, if I change "[nvim-lua]"
to "foo"
then the error goes away and a "foo" buffer is created. (But it does not have REPL features, just a normal empty buffer, presumably because the plugin is looking for [nvim-lua]
buffer.)
Maybe a bug in nvim_buf_set_name()
?
Cannot reproduce. Maybe it depends on one of the myriad options that change multibyte/charset processing in vim.
but sure enough, if I change "[nvim-lua]" to "foo" then the error goes away and a "foo" buffer is created. (But it does not have REPL features, just a normal empty buffer, presumably because the plugin is looking for [nvim-lua] buffer.)
The plugin doesn't care about the name of the buffer, it saves a reference to it. Note: there is no enforced behavior, you have to map to the <plug>
bindings yourself for anything to happen.
Also, rename buffer will invoke autocmds nvim_buf_set_name
claims. Perhaps test with -u NORC
+ luadev only?
More specifically BufFilePost
will observe the new name.
Bingo, looks like a vim-projectionist bug. Thanks!
:edit [nvim-lua]
Error detected while processing function ProjectionistDetect[26]..<SNR>54_has[7]..<SNR>54_nscall:
line 4:
E944: Reverse range in character class