-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IntelliJ and Hammerspoon files #132
Comments
I might be misunderstanding because I've never heard of Hammerspoon before now. However, it sounds like you're asking for Hammerspoon type definitions, in which case you'll want to ask the Hammerspoon project whether this is something they wish to support. |
Ok I will ask there. But how theuly can provide the type definitions? What they need to do? |
I see the second error ( |
Luanalysis is fairly opinionated. You can certainly turn inspections off but you'll lose out on the type safety benefits. In this case you probably want something like: ---@generic V
---@param list V[]
local function Set (list)
---@type table<V, nil | true>
local set = {}
for _, l in ipairs(list) do set[l] = true end
return set
end |
FYI: a little bit helped me to install the EmmyLua Spoon which generates stubs for the core functions |
the generated sources for hammerspoon you can find at my repo, but they still somehow a little bit wrong. maybe you can suggest how to change the generation process to not see errors? https://github.com/muescha/dot_hammerspoon/tree/master/Spoons/EmmyLua.spoon/annotations |
just to explain how the annotation sources are generated:
Note:
|
the creator of EmmyLua explained why he not direct use the files in App folder - but maybe there is an other idea how to get it working :)
Simply adding the hammerspoon
|
I'm working with Hammerspoon too, and am interested in getting Luanalysis working in IntelliJ. I'm having some of the same problems (plus require() of multi-folder paths not working right), so I'll be watching this thread for solutions. |
Environment
Preferences
Preferences -> Languages & Frameworks > Luanalysis:
Lua
Type Safety
What are the steps to reproduce this issue?
i tried to use IntelliJ IDEA to edit the hammerspoon lua files
What happens?
one problem is, that it marks me some of the
hs.
as unknown variables and also some more errors because of unknown typesthis also show me an error:
What were you expecting to happen?
Any logs, error output, etc?
No such member 'setFrame' found on type 'V'
No such indexer '[V]' found on type 'table'
Any other comments?
…
The text was updated successfully, but these errors were encountered: