Merrit/vscode-runner

No vscode-runner entries in krunner

Closed this issue · 12 comments

I have installed the plugin by building it then installing it according to the instructions on the readme. However, even by disabling every plugin except for vscode-runner, I'm not able to make any entry at all pop up. I have also tried opening a VSCode workspace before running the query (since I don't know how this extension queries recent workspaces), but I still get nothing.

One thing that I've noticed is that if I kill krunner and run it through the terminal, I get the following:

qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
kf.runner: KRunner D-Bus plugin "vscode_runner" installs the .desktop file ("krunner/dbusplugins/plasma-runner-vscode_runner.desktop") still in the kservices5 folder. Please install it to ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins.

I'm on Fedora 38, KDE Plasma 5.27.8.

Am I missing something?

Merrit commented

Looks like they may have changed how plugins work a bit, I haven't used KDE in a long while. I will take a look and see what is required to fix. 💙

Merrit commented

I believe the issue you are seeing is because you need the sqlite libs for it to access the vscode database.

sudo dnf install sqlite-devel

Give that an install and try again. I had to reboot, then everything worked as expected.

I will make a fix for the deprecation warning.

Thank you for your quick replies! Sadly, despite what you've done and suggested, I can't get it to work at all. I installed sqlite-devel and rebooted, but it still didn't work. I also tried uninstalling the plugin and reinstalling it from master, but I still get no entries :( any clue? Maybe I lack some other dependency?

Merrit commented

I will look into adding a logging service so we can get some debug output.

In the meantime, couple thoughts:

  • You are entering the name of a workspace in krunner to search? For example, if in vscode I open ~/Downloads/cloned_repo as a folder, that will then show up if krunner is searched for cloned_repo
  • Version of VSCode you have?
    • Stable/Insiders?
    • Version?
    • Is it from the rpm or the official repo? Other?
  • Check if you have the database file in the expected location: ~/.config/Code/User/globalStorage/state.vscdb
Merrit commented

Another thought: run the plugin executable from the terminal to view stdout:

bash ~/.local/bin/vscode_runner

Okay, this has me very confused. I tried running vscode_runner from the directory that you mentioned, but I quickly found out that in my case ~/.local/bin/vscode_runner was a directory containing a binary called vscode_runner? So I had to run ~/.local/bin/vscode_runner/vscode_runner to execute it, and this immediately made the plugin show up in the search results. After this I just moved the binary and removed the folder, and everything works as it should now.

Merrit commented

That is odd, I am not even sure how that could happen..

If you are so inclined you could try running the uninstall / install scripts from this beta build, see if it manages to install properly for you now:

vscode_runner.tar.gz

Worked, ran the uninstall script and stopped working; ran the install script and started working again. Seems like everything is fine with this version. Out of curiosity, do you know what the problem was?

Merrit commented

Not really, I don't see how it could've put the executable inside a folder of the same name like that..

¯\_(ツ)_/¯

Oh well, I am glad to hear it is working for you now! I have added the sqlite requirement to the readme, as well as automatic builds that are part of the release so in the future you don't need to compile it yourself if you don't want to. :)

HAH yeah I share your confusion, I wonder if I did anything weird without realizing it but I'm also just glad it worked out in the end. Thank you for your assistance and for enabling automatic builds, great job with the plugin!

Merrit commented

Thank you for the issue, and helping point out the missing mention for sqlite :D

Resolved with #12