Skip to content

Provide completion for schema ids in modeline #560#566

Closed
apupier wants to merge 1 commit intoredhat-developer:mainfrom
apupier:560-completionForSchemas
Closed

Provide completion for schema ids in modeline #560#566
apupier wants to merge 1 commit intoredhat-developer:mainfrom
apupier:560-completionForSchemas

Conversation

@apupier
Copy link
Copy Markdown
Member

@apupier apupier commented Oct 26, 2021

potential improvements:

  • support range when there is already a value provided
  • provide completion for local yaml schema files

Extracted a specific file for modeline related things.

What does this PR do?

Provide completion for schema ids in modeline. So when we have # yaml-language-server: $schema=

What issues does this PR fix or reference?

fixes #560

Is it tested? How?

i wasn't abel to test the yaml-language-server

textDocument: testTextDocument,
});
assert.strictEqual(result.items.length, 1, `Expecting 1 item in completion but found ${result.items.length}`);
assert.strictEqual(result.items[0].label, 'http://google.com/');
Copy link
Copy Markdown
Member Author

@apupier apupier Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only registered schema id is http://google.com/. This sounds strange, is it something done for the whole test suite? Any ideas to improve the test? Maybe register another schema id?

potential improvements:
- support range when there is already a value provided
- provide completion for local yaml schema files

Extracted a specific file for modeline related things.

fixes redhat-developer#560

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
@apupier apupier force-pushed the 560-completionForSchemas branch from f2e826e to 7a8a078 Compare October 26, 2021 08:50
@coveralls
Copy link
Copy Markdown

coveralls commented Oct 26, 2021

Coverage Status

Coverage increased (+0.09%) to 75.122% when pulling 7a8a078 on apupier:560-completionForSchemas into de4e8fd on redhat-developer:main.

@apupier
Copy link
Copy Markdown
Member Author

apupier commented Nov 9, 2021

betterly handled by #573

@apupier apupier closed this Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide completion for reachable schema

2 participants