microsoft/compose-language-service

Compose language service doesn't recognize `restart` option

Opened this issue · 3 comments

Example compose file:

version: '3.4'

services:
  test:
    restart: always
...
  1. Howering over restart doesn't yield any results
  2. If you remove always and try to invoke completions there, no results are shown, even though restart in docker compose has a finite set of well-known values: no, always, on-failure, unless-stopped

@DoctorKrolic do you have the YAML extension by Red Hat installed? Certain features will behave differently if it is present. I'm not sure if it covers restart but it may.

YAML extension only adds this hover part to any key in docker-compose file:
Code_rYzuDuSAlr
I guess this is VS Code's feature, but when both docker and yaml extension are installed, the resulting hover is a combination of 2 from both extensions, e.g.:
Code_cBHc3G7bE5

As about completions, yaml extension doesn't provide them for restart as well