rcjsuen / dockerfile-language-service

Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
MIT License
16 stars 2 forks source link

Change DockerfileLanguageService's computeHighlightRanges to not require a URI string #15

Closed rcjsuen closed 6 years ago

rcjsuen commented 6 years ago

The current signature of the computeHighlightRanges includes a TextDocumentIdentifier URI parameter.

https://github.com/rcjsuen/dockerfile-language-service/blob/7a940aab7525f9f8e9784e633435f05e26e49ed0/src/main.ts#L53

However, this parameter is actually not necessary for the calculation of a highlight range. The calculation only requires the content of the Dockerfile. The question of where said Dockerfile resides is unnecessary. We should remove this unnecessary parameter from the function.