Code completion with visual studio

  • Platform information:
    • Hardware: Pi 3B
    • OS: Rasbian Jessie
    • openHAB version:2.3.0

Hallo,

i wonder how do i get the same level of code completion with visual studio as eclipse smart home designer provides me?

For example if i type “linked” in eclipse it provides me with a full list of commands/types that start with “linked”

In Visual studio i just get nothing, except from Item names, i wonder what i do wrong?

Is it possible to get the same level of code completion with visual sudio?

greetings Karl

1 Like

I can’t be sure what is wrong specifically but there problem is VSCode cannot reach port 5007 (I think) on you OH server or you never configured the openHABb extension appropriatly.

When configured correctly and when VSCode can reach the language server on OH itself, the same only better code completion is possible in VSCode.

Comparing the ESHD example posted by @karl24 and this from my VS Code, it looks like ESHD has better code completion. VS Code is great, but maybe I have something misconfigured too and missing out on more awesome? Hmmm…

It looks like you do not have the option extension configured correctly or VSCode cannot reach the LSP port on the OH Server.

VSCode works by sending the coffee you are typing to OH itself to parse it and provide code completion suggestions.

(the code)
you need to fix your auto-correct options on your mobile :slight_smile:

I need VS code in the morning!!

1 Like

Maybe he was just drinking some coffee :rofl:

1 Like

I’ve tried of I’ve tried. It keeps insisting I mean coffee instead of code.