Skip to content
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

A little problem with vars, linked to love-modules. #19

Closed
ghost opened this issue Jun 14, 2018 · 2 comments
Closed

A little problem with vars, linked to love-modules. #19

ghost opened this issue Jun 14, 2018 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 14, 2018

When I define a variable that links to some love-module, autocomplete will work with this variable and it's awesome! But if it is a global variable which is defined from separate file, autocomplite will not work. :( I realy want to use a global reductions for all my project. Like this:

ld  = love.data
le  = love.event
lfs = love.filesystem
lf  = love.font
lg  = love.graphics
li  = love.image
lj  = love.joystick
lk  = love.keyboard
lm  = love.mouse
lp  = love.physics
ls  = love.sound
lsy = love.system
lth = love.thread
lt  = love.timer
lto = love.touch
lv  = love.video
lw  = love.window
lu  = require "lume"
lu.extend(math, love.math)
@pablomayobre
Copy link
Contributor

This is not possible, because it would require to statically analyze the complete project structure... Lua doesn't have a way to delimit the paths where you can require files nor what files make up a project, so that is too complex to say the least.

Anyway this package only provides an object with all the data regarding the love module, but the actual autocomplete and static analysis happens in autocomplete-lua so if you really want this feature you should ask over there...

@ghost
Copy link
Author

ghost commented Jun 14, 2018

Ok, thank you!

@ghost ghost closed this as completed Jun 14, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants