[SOLVED] Visual Studio Code completion won't work

  • 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": "192.168.3.10",
		"openhab.karafCommand": "ssh openhab@192.168.3.10 -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.

2 Likes

Just to be sure…

This is still true in late November 22?
No fancy keywords, no list of possible functions, no reliable (i.e. complete) list of items?

No progress known from my side.

I am not going to work on LSP features in the nearer future as stated in many threads over here.

Additionally it seems that the interest was not big enough for someone with the needed “knowledge” to jump in with improving the current lsp situation.

Thanks for clarification.

1 Like