tpope/timl

Having troubles calling things defined in a TimL plugin.

Closed this issue · 2 comments

I have a little working plugin, but I can only use it from inside of tim files. I can't use it from Ex calls, and it doesn't seem to define the g:foo#bar globals. I used tslime2 as a template, but it also seems to have these issues. I have an autoload/foo/core.tim, and a plugin/foo.vim that defines a command! Foo call foo#core#bar, but trying to run :Foo pops up this:

Error detected while processing function <SNR>82_autoload..timl#loader#source..timl#compiler#build..<SNR>171_emit..timl#call..401..timl#type#apply..timl#lazy_s
eq#seq..<SNR>173_val..timl#call..541..<SNR>148_predicate..timl#coll#chunked_seqp:
line    1:
E716: Key not present in Dictionary: chunk_first)
E116: Invalid arguments for function timl#type#canp(a:coll, g:timl#core.chunk_first)
E15: Invalid expression: timl#type#canp(a:coll, g:timl#core.chunk_first)
Error detected while processing function <SNR>82_autoload:
line   10:
E170: Missing :endfor

Ex commands seem the closest route currently, as the functions don't seem to exist - I've tried echoing, calling, etc., foo#core#bar, foo#core.bar, g:foo#core#bar, and g:foo#core.bar, but it doesn't find them.

Dupe of #12.

I was glad there was a solution, and it worked, but then I decided to trim it down, and it kept working until I trimmed to complete removal. The only things I tweaked in the meantime were some ns things. I think that was my actual problem. My TimL plugin is now working sans hacks. Thanks, Tim!