Closed naquad closed 10 years ago
I tested vim-xorox-ftplugin, but it displayes errors. I cannot fix it. I think xorox-ftplugin is broken...
summoning @Xorox . @Shougo could you please post errors you've ran into?
OK.
In below script,
package.
and I pressed <C-x><C-o>
keys.
Error detected while processing function xolox#lua#omnifunc..xolox#lua#getomnivariables..xolox#lua#dofile:
line 5:
...ndle/vim-lua-ftplugin/misc/lua-ftplugin/omnicomplete.lua:77: bad argument #1 to 'ipairs' (table expected, got userdata)
Error detected while processing function xolox#lua#omnifunc..xolox#lua#getomnivariables:
line 3:
E121: Undefined variable: Error
Error detected while processing function xolox#lua#omnifunc..xolox#lua#getomnivariables:
line 4:
E686: Argument of sort() must be a List
Error detected while processing function xolox#lua#omnifunc..<SNR>148_addsignatures:
line 1:
E714: List required
Error detected while processing function xolox#lua#omnifunc:
line 21:
E712: Argument of filter() must be a List or Dictionary
Just for the record the username is @xolox :-). I'm looking into the issue. Thanks for the feedback!
I just released a new version of the Lua file type plug-in for Vim (vim-lua-ftplugin) that fixes the issue mentioned here. Thanks for the heads up!
This error was fixed. Thanks.
I used below settings and it works.
" For vim-lua-ftplugin.
let g:lua_check_syntax = 0
let g:lua_complete_omni = 1
let g:lua_complete_dynamic = 0
let g:neocomplcache_omni_functions.lua =
\ 'xolox#lua#omnifunc'
let g:neocomplcache_omni_patterns.lua =
\ '\w\+[.:]\|require\s*(\?["'']\w*'
" let g:neocomplcache_force_omni_patterns.lua =
" \ '\w\+[.:]\|require\s*(\?["'']\w*'
But in vim-lua-ftplugin omni completion, the menu items are broken(for example, package.config and package.cpath and package.path).
@xolox Can you fix it?
Define 'broken'? They look fine to me?
Are /\n;\n?\n!\n-\n
and /usr/local/lib/lua/5.2/?.so;/usr/lib/i38..
correct menus?
I ran into the following error message today after compiling Vim from source and editing a Lua script:
bad argument #1 to 'ipairs' (table expected, got userdata)
It turns out the problem wasn't properly solved before (because I wasn't able to test back then). I now fixed this in 4746f4d4bddb51619c2956d73adfb22b73e066dd.
@Shougo: Sorry I never saw your most recent message, yes it works fine now, those are the proper menu items. They are not the completion candidates but a preview of the values (strings in this case, with embedded newlines, which are rendered as \n
so that more than one line can be shown).
If you ask me this issue can be closed now.
Thank you. I will close it.
I'm trying to integrate with vim-lua-ftplugin (https://github.com/xolox/vim-lua-ftplugin).
For this I did following configuration:
It partially works: whenever I type
require('
I get list of completions from vim-lua-ftplugin omnifunc, but when I continue typing I'm not getting suggestions from omnifunc anymore.So what am I doing wrong and how should it be done? Maybe some how to doc on doing similar stuff?