Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-139) Provide completions for defined types #204

Merged
merged 2 commits into from
Nov 27, 2019

Conversation

glennsarti
Copy link
Contributor

@glennsarti glennsarti commented Nov 27, 2019

Fixes #139

Previously the manifest completion provider would not provide results if the
cursor was in a defined type. This commit adds the ResourceTypeDefinition much
like the HostClassDefinition.

Previously the completion provider blindly moved the cursor one place back which
worked fine if completions were triggered by a character instead of manual.
Now that the LSP has provisions for the context of the completion request we
can intelligently figure out when to remove the trigger character.

This commit updates the mesasge handler to pass through the CompletionContext
object and the completion provider can then determine how to use the context
accordingly. This commit also updates the tests for this behaviour.

Previously the manifest completion provider would not provide results if the
cursor was in a defined type. This commit adds the ResourceTypeDefinition much
like the HostClassDefinition.
@glennsarti glennsarti self-assigned this Nov 27, 2019
Previously the completion provider blindly moved the cursor one place back which
worked fine if completions were triggered by a character instead of manual.
Now that the LSP has provisions for the context of the completion request we
can intelligently figure out when to remove the trigger character.

This commit updates the mesasge handler to pass through the CompletionContext
object and the completion provider can then determine how to use the context
accordingly.  This commit also updates the tests for this behaviour.
@glennsarti glennsarti force-pushed the gh-139-nested-modules branch from 3bcdb03 to 13b8645 Compare November 27, 2019 08:14
Copy link
Contributor

@jpogran jpogran left a comment

Choose a reason for hiding this comment

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

@jpogran jpogran merged commit 053b76d into puppetlabs:master Nov 27, 2019
@glennsarti glennsarti added this to the 0.23.0 milestone Nov 28, 2019
@glennsarti glennsarti deleted the gh-139-nested-modules branch January 20, 2020 12:02
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.

Language server not providing hints in nested manifest files.
2 participants