microsoft / compose-language-service

Language service for Docker Compose documents
https://www.npmjs.com/package/@microsoft/compose-language-service
MIT License
52 stars 5 forks source link

Compose language service doesn't recognize `restart` option #133

Open DoctorKrolic opened 1 year ago

DoctorKrolic commented 1 year ago

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

bwateratmsft commented 1 year ago

@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.

DoctorKrolic commented 1 year ago

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

DoctorKrolic commented 1 year ago

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