You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin should add the luasocket annotations (LuaCATS/luasocket) to the lua language server libraries. Probably by also adding it as a submodule to this repo. I'm not sure what the config should look like exactly.
Describe alternatives you've considered
I've made a fork of this plugin with some personal changes. The structure is somewhat different but here's how i'm handling it:
Another alternative would be to get upstream LuaCATS/love2d to include the socket library (and others), but i don't know if that's in scope for that project.
Additional context
love2d also bundles lua-enet and utf8, but i couldn't find LuaCATS annotations for them :(
The text was updated successfully, but these errors were encountered:
I'd like to include only LuaCATS for the lib bundled with LÖVE. According to the LÖVE documentation, the bundled libraries are: luasocket, lua-enet, and utf8.
Since this plugin was written in a rush and does not support proper semver, I suggest keeping it simple and avoiding breaking changes, such as modifying existing options in the setup table.
A possible solution is to add path_to_*_library options and ship those libraries with love2d.nvim as git submodules. However, as you mentioned, LuaCATS for lua-enet and utf8 do not exist. Therefore, I propose adding only path_to_luasocket_library for now.
I look forward to merging a PR which implements the following:
add LuaCATS/luasocket to this repo as a git submodule
update lua/love2d/config.lua setup_lsp function so it takes library_paths (anarray of library paths) as input and configures those libs for LSP.
add path_to_luasocket_library to the default config
document the option in the help file (doc/love2d.txt) (same behaviour as path_to_love_library if path_to_luasocket_library is set to "", do not set up LSP for luasocket)
(sorry for the late response, ive been quite busy lately)
Did you check the docs?
Is your feature request related to a problem? Please describe.
love2d contains an implementation of the luasocket library (see https://www.love2d.org/wiki/socket), however the annotations for it are not included in LuaCATS/love2d.
Describe the solution you'd like
The plugin should add the luasocket annotations (LuaCATS/luasocket) to the lua language server libraries. Probably by also adding it as a submodule to this repo. I'm not sure what the config should look like exactly.
Describe alternatives you've considered
I've made a fork of this plugin with some personal changes. The structure is somewhat different but here's how i'm handling it:
hopefully that's helpful, though it is a breaking change for user config.
Another alternative would be to get upstream LuaCATS/love2d to include the socket library (and others), but i don't know if that's in scope for that project.
Additional context
love2d also bundles lua-enet and utf8, but i couldn't find LuaCATS annotations for them :(
The text was updated successfully, but these errors were encountered: