Open laoshaw opened 4 years ago
So this should definitely work; the fact that isn't is a bug. will look into :eyes:
...bump? It doesn't seem like this has been fixed. I'm trying to use the following library: https://github.com/Desvelao/lummander As evident from the code, all functions have LuaDoc indicating they are fit for completion:
-- Create a command. This function is called by Lummander.
-- @tparam string command Command to parse for extract arguments and their requirements.
-- @tparam[opt={}] table config Options.
-- @tparam[opt=""] string config.description Command description.
-- @tparam[opt={}] table config.positional_args Command description.
-- @tparam[opt] {options} config.options CommandOptions
-- @tparam[opt=false] boolean config.hide Hide from help command
-- @tparam[opt=false] boolean config.main Set as main cli command
-- @tparam[opt] function config.action Command action function.
-- @tparam Lummander lummander CommandOptions
-- @treturn Command
function Command.new(command, config, lummander)
Though... I'm not getting any completion. Here's my ~/.luacompleterc
:
{
"luaVersion": "5.1",
"packagePath": "./?.lua;/home/user/.luarocks/share/lua/5.1/?.lua"
}
And here's the plugin doing nothing:
You mind looking into this again, even though I'm abysmally late?
You know, I'm getting the feeling that whatever searches packagePath
, it does not traverse to subdirectories. I added the path of the module I want autocomplete for to packagePath
, and it instantly started working wonders:
Is there a way to make it recurse directories, or perhaps support wildcards such as **/?.lua
?
How to make it support macOS Hammerspoon code completing?
I edited $HOME/.luacompleterc
I did luarocks install --local lua-cjson I added $HOME/.luarocks into package.path and package.cpath.
When I use vim I can autocomplete standard Lua functions(table.insert, io.open,etc), however I can not autocomplete anything from $HOME/.luarocks/share/lua/5.1, vim displays:
User defined completion(^U^N^P) Pattern not found.
So will lua-lsp be able to index all files under $HOME/.luarocks/share/lua/5.1 somehow? what about the C modules under package.cpath? I want to do auto-complete for all imported modules and my own lua files in addition to the working built-in Lua functions(e.g. os.open etc)