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

Ctrl+Space not working with YAML #148

Open
chowey opened this issue Jan 7, 2025 · 1 comment
Open

Ctrl+Space not working with YAML #148

chowey opened this issue Jan 7, 2025 · 1 comment

Comments

@chowey
Copy link

chowey commented Jan 7, 2025

There is an earlier issue #121 that mentions this. However, that issue was closed although the problem is still occurring.

If I press Ctrl+Space I expect the autocomplete to show up, so long as I am using the completion keymap. (The default EditorView with basicSetup includes the completion keymap.) However, Ctrl+Space does nothing unless I have typed at least one letter.

This is most noticeable in YAML. You can see it at https://codemirror-json-schema.netlify.app/.

Here's what I expect:

  1. Have the cursor in an object with a schema defined.
  2. Press Ctrl+Space.
  3. See the autocomplete suggestions.

Here's what I see instead:

  1. Have the cursor in an object with a schema defined.
  2. Press Ctrl+Space.
  3. Nothing happens.
  4. Type one letter.
  5. Autocomplete shows.
  6. Press escape.
  7. Autocomplete goes away.
  8. Press Ctrl+Space.
  9. Autocomplete shows.

So it works so long as there is a letter already there, but not when there isn't.

This is less noticeable in JSON, because I normally create a JSON key by typing a quote ", which starts the autocomplete.

@garronej
Copy link

garronej commented Jan 8, 2025

+1 On this

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

2 participants