Closed lua-rocks closed 1 year ago
I don't currently have the time to debug this properly. Can you try deleting the addon manager folder? On Windows, this is at C:\Users\YOU\AppData\Roaming\Code\User\globalStorage\sumneko.lua\addonManager
, I am not sure where it is exactly on Linux.
I removed ~/.config/VSCodium/User/globalStorage/sumneko.lua/addonManager
, restarted VSCodium, this folder was created again, but Addon Manager is still broken.
Is that the entirety of the log file? It looks like it is missing some info from startup.
Excuse me, the list was very long because I did a lot of clicking, so I removed the duplicate messages.
There was nothing but "enabled" and "disabled" info.
Here is another one:
[2023-04-21 16:55:32] | INFO | GENERAL | This session's log file: file:///home/luarocks/.config/VSCodium/logs/20230421T165523/window1/exthost/sumneko.lua/addonManager/16.log
[2023-04-21 16:56:05] | INFO | Addon | Enabled "argparse"
[2023-04-21 16:56:08] | INFO | Addon | Enabled "argparse"
[2023-04-21 16:56:09] | INFO | Addon | Enabled "argparse"
[2023-04-21 16:56:11] | INFO | Addon | Uninstalled argparse
[2023-04-21 16:56:15] | INFO | Addon | Enabled "bee"
[2023-04-21 16:56:16] | INFO | Addon | Enabled "bee"
[2023-04-21 16:56:17] | INFO | Addon | Uninstalled bee
I just fired up a Manjaro VM and installed VS Codium using yay. Then I installed v3.6.18
of the Lua extension. I can't seem to replicate your issue, though. I am able to install an addon, enable it, and receive completions, exactly as expected.
Is there anything you can think of that would be interfering with Git and/or file operations? It is very odd that your log files don't include all the log messages.
For reference, here is my log file from my working attempt on Manjaro:
Thank you very much for taking the time to check my issue. Today, for reasons completely unknown to me, everything worked! I swear I didn't change anything. My computer has been turned off since the last time I experienced this problem.
Thanks anyway. I close this issue and will reopen if it happens again.
By the way, my output is still no different from the previous one. There is no debug or verbose info.
Oops, sorry, I was copying the output from the vscode console and didn't notice the little icon that opens the log file with detailed information.
Bad news. Everything was working fine, but after reboot it's not working again 😢.
All required files are loaded correctly, but they are not enabled in my project when I press the "Enable" button (no changes in .luarc.json
or .vscode/settings.json
).
I also noticed that in certain projects the addon manager always works correctly, but in others it never works. I can't figure out the difference between them. I tried temporarily deleting the ".vscode" folder from both projects and nothing changed - in one project I can enable plugins, in the other I can't.
But wait, no, not always. One project is more likely to enable plugins and the other is less. Sometimes they are not enables anywhere. I guess it depends on the location of stars in the sky.
Interesting... do you have an example project I can try to reproduce the problem in?
I think I figured out what the reason is! 🎉
If I open a project in which no .lua file has ever been opened, the addon manager cannot enable addons.
But after opening any .lua file in the project, it starts working correctly!
Ah, yes, you would be correct! This appears to be because the Lua Language Server doesn't start until a .lua
is opened. The addon manager depends on the Lua Language Server to apply settings, so an addon cannot be enabled until the language server is started.
There are only a few options here:
*.lua
file to start the extension and language serverFor now, option 1 works, but option 2 will have to be explored, option 3 will be a lot of work just to do what is already done.
It seems to me that the best solution here would be to start the language server on addon manager window open. Is it hard to implement?
That is what option 2 is. I found a way to activate the language server should it not be started when the addon manager is opened.
Which OS are you using?
I use Manjaro Linux and VSCodium-bin from AUR.
Actual Behaviour
Log