[SOLVED] Visual Studio Code completion won't work

Tags: #<Tag:0x00007efebba62a50> #<Tag:0x00007efebba62960> #<Tag:0x00007efebba62898>
  • Platform information:

    • Hardware:Rpi/PC
    • OS: Openhabian/Ubuntu/Windows
    • openHAB version: 2.5M3
  • Issue of the topic:
    I followed the Configuration Guide of the usage of Visual Studio Code and OpenHAB. The problem is that auto-completion won’t work and I get an error VSC: [Error - 10:51:01] Connection to server is erroring. Shutting down server.

  • Please post configurations (if applicable):
    Settings.conf (VSC):

		"openhab.host": "",
		"openhab.karafCommand": "ssh openhab@ -p 8101 -t 'log:tail'",
		"openhab.restCompletions": true,
		"openhab.remoteLspPort": 5007,
		"openhab.remoteLspEnabled": true

Items and groups are accesible with CTRL-SPACE, but methods aren’t. Eg if I write now.plus and use CTRL-SPACE I won’t get the methods of now that begins with plus, only my items.

Where have I made a mistake?

I think this is a known bug in M2/M3

But I also would be interested if there is any progress. Makes rule development a lot harder atm.

1 Like

Where are the shortcuts (like CTRL-SPACE) explained? I installed the VS Code openHAB extension but I doubt that I use all shortcuts available…

Thanks. Are there specific ones for the openHAB extension? I have seen things in the animated gifs, but I am not able to use all of those features…

ctrl + shift + p will bring you to the command form on top of the editor.
you can then type openhab and see which commands are available.

LSP Issue:

Nope there is no progress.
And unfortunately i think that remote lsp will still be broken for some time.
I can’t say much about that integration and i have no time to dig into this currently.
I am in the middle of a few other things that can and should be improved,
so i will try to finish those first.