andweeb / Ki

⌘ Work in macOS like you work in vim <currently under construction>
MIT License
127 stars 13 forks source link

Loading Ki fails to load the default `status-display.lua` (first line of Ki:start()) #4

Closed peterhajas closed 5 years ago

peterhajas commented 5 years ago

With Ki version 1.1.0, I am unable to get Ki to start on my machine.

I put the following in my '.hammerspoon/init.lua':

hs.loadSpoon('Ki')
spoon.Ki.start()

And Ki lives in the spoons directory:

 ~ ▶ ls ~/.hammerspoon/Spoons/
Ki.spoon

When Hammerspoon parses my init.lua, I get:

2019-01-19 09:24:33: *** ERROR: /Users/phajas/.hammerspoon/Spoons/Ki.spoon/init.lua:539: attempt to index a nil value (local 'self')
stack traceback:
    /Users/phajas/.hammerspoon/Spoons/Ki.spoon/init.lua:539: in function 'Ki.start'
    /Users/phajas/.hammerspoon/init.lua:373: in main chunk
    [C]: in function 'xpcall'
    ...app/Contents/Resources/extensions/hs/_coresetup/init.lua:596: in function 'hs._coresetup.setup'
    (...tail calls...)

This is failing on the line of Ki's init.lua that tries to load a status display:

self.statusDisplay = self.statusDisplay or dofile(_G.spoonPath.."/status-display.lua")

A copy of my .hammerspoon directory is attached (renamed to "hammerspoon"):

hammerspoon.zip

I'll continue to futz with it to try to diagnose.

peterhajas commented 5 years ago

Whoops, this looks like it is probably user error. I was using:

spoon.Ki.start()

but this should have been:

spoon.Ki:start().

My bad - closing. This software looks cool!