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

Suggestions do not work #1042

Open
3 tasks
annaa-ka opened this issue Jul 16, 2024 · 1 comment
Open
3 tasks

Suggestions do not work #1042

annaa-ka opened this issue Jul 16, 2024 · 1 comment

Comments

@annaa-ka
Copy link

annaa-ka commented Jul 16, 2024

Describe the bug

Hi! I have installed a an extension for vscode v1.15.0.

Wrote this json file for validation and suggestions:

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Example",
    "description": "An example of how to use snippets for json schema",
    "type": "object",
    "properties": {
        "object-mapper": {
            "type": "object",
            "properties": {
                "test1": {"type": "string"},
                "test2": {"type": "string"}
            }
        }
     }
}

This is my file:

# yaml-language-server: $schema=/Users/avkazantseva9/test_plugin/suggest.json

object-mapper:
  

Expected Behavior

When i type object-mapper i get suggestions about tests1 and test2.
On this photo there are no suggestions:
2024-07-16 17 48 17

Current Behavior

I get any suggestions, only if i type "te", then i will get suggestions about them.
2024-07-16 17 48 12

Steps to Reproduce

  1. Simply download the extension
  2. Create folder
  3. Create both this files

Environment

  • Windows
  • [ +] Mac
  • Linux
  • other (please specify)
@annaa-ka annaa-ka changed the title Auto complete is not working Suggestions do not work Jul 16, 2024
@annaa-ka
Copy link
Author

Actually the problem found (https://github.com/redhat-developer/yaml-language-server/blob/main/src/languageservice/services/yamlCompletion.ts#L126-L128). However the logic of this files very strange, as it makes user to know fields

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

No branches or pull requests

1 participant