getgauge/gauge-vscode

Format Document does not work in VS Code

ggat opened this issue · 6 comments

ggat commented

Format Document does not work in VS Code

What command(s) did you run when you found the bug?

Option + Shift + F or "Format Document" from editor window context menu

Output, stack trace or logs related to the bug

Versions

Gauge VS Code extension version: v0.0.15

Gauge (Output of gauge -v)

Gauge version: 1.1.4
Plugins
-------
html-report (4.0.10)
json-report (0.3.3)
screenshot (0.0.1)
spectacle (0.1.4)
ts (0.0.5)

Node.js v13.12.0

macOS Catalina 10.15.6 (19G2021)

VS Code 1.49.2

image

settings.json

...
"files.associations": {
    "*.spec": "gauge",
    "*.cpt": "gauge",
    "*.gauge": "gauge"
  },
...
sriv commented

Just to clarify - which file were you attempting to format?

ggat commented

A spec file

sriv commented

Since you are on macOS, I'll let someone else from @getgauge/core take a look.

I can see the formatting work well with gauge-vscode 0.0.15 on linux:

format

ggat commented

OK, thanks! Not sure if this is related, but gauge format works from command line

zabil commented

I checked it on the following and it's working. Is there anything else configured which might be causing the problem?

Gauge version: 1.1.4
Plugins
-------
html-report (4.0.12)
java (0.7.10)
js (2.3.12)
screenshot (0.0.1)
ts (0.1.0)

VS Code Version: 1.49.2
Node v14.10.1
Gauge VS Code plugin v0.0.15
Catalina 10.15.6 (19G2021)
ggat commented

Thanks for fast responses. I've just disabled all other extensions reloaded IDE and I got message similar to "prettier was set as a formatter, but is not available" after click on the message ballon, I was presented with quick pick menu with only option "Gauge" picked the option and formatting started working.

Still not sure if this updated file association, as they looked good originally too.

No I'm unable to reproduce the issue anymore..