openhab-vscode icon indicating copy to clipboard operation
openhab-vscode copied to clipboard

auto highlight the hole code when click on ITEMS

Open Thorhammerk opened this issue 4 years ago • 9 comments

Hi, when i click on an ITEMS in VSC, the complete code in the file is highlighted in blue. i haven't found a setting to disable this behaviour. is it possible to disable it?

Bildschirmfoto 2020-07-13 um 14 12 07

  • extension v0.7.0
  • MacOS and Windows10

best regards

Thorhammerk avatar Jul 18 '20 10:07 Thorhammerk

Can you propvide some more deteils? VSCode and Extension Verison, OPerating System and where you are clicking on the item. I can't reproduce that currently.

Confectrician avatar Jul 19 '20 15:07 Confectrician

Hi,

sure, when i click on the ITEM directly, one click (not double click). sometimes this only occurs after you have worked with VSC for a few minutes. Have you tested it in a rule file?

Thorhammerk avatar Jul 19 '20 15:07 Thorhammerk

I have the same issue. At some point I was able to stop this behavior in OpenHAB2 by removing "openhab.karafCommand" setting. Now, with OpenHAB3 this has no effect. It happens when I click on an Item in a rules file, select an Item (completely or partially). Selecting any other part of the code has no such behavior. Selecting Item methods (.state, .sendCommand, .previousState) has no such behavior. Hovering over an Item shows the value correctly and doesn't highlight the text either. Selecting variables has no such behavior.

Windows 10 20H2 VSCode 1.53.2 (system setup) OpenHAB extension 0.8.0

AegisVP avatar Feb 21 '21 09:02 AegisVP

Thanks for the description i am facing this behavior too. Let's see if i can try to add some more debugging to this, so we can get more informatoin of whats happenign under the hood.

Confectrician avatar Feb 21 '21 16:02 Confectrician

I am a bit lost to be honest. I am trying to reproduce this behavior while debugging, but it simply doesn't occur when i am doing it in a debug session.

Confectrician avatar Mar 14 '21 21:03 Confectrician

Is there something I can do to help you?

I was having this issue only if I had LSP enabled. It got so annoying that I turned it off for now.

AegisVP avatar Mar 15 '21 01:03 AegisVP

You already helped me with that. 🙂 I have turned off lsp in my vscode test environment too.

So maybe LSP is causing the problems. I will try to get a running LSP in my debug environment and see if that's the error cause. If so, i have to say that we are not able to solve this on short term unfortunately.

Confectrician avatar Mar 15 '21 08:03 Confectrician

It is indeed related to the LSP server. Probably a wontfix for now, since LSP is more or less not maintained currently.

Confectrician avatar Mar 15 '21 09:03 Confectrician

I'm having this issue too. It seem to start happening after updating the extension in the last week. For now, could someone point out how I might turn off LSP as a workaround?

kingkoopa13 avatar Aug 15 '22 07:08 kingkoopa13