-
Notifications
You must be signed in to change notification settings - Fork 13
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
Custom value autocompletion #67
Comments
I'm trying to understand your case better, is there a reason this can't be acheived with json schema? is there a remotely defined json schema definition that's not loading? |
My specific use-case is a configuration object where certain fields are file paths on the users' system. In this case, autocompletion of file paths (plus theoretical linting of missing files, etc) would be awesome. I'm not super well-versed in JSON Schema, but it seems like the way to represent these semantics would be through a custom Perhaps the better approach would be a separate autocompletion source extension that combines with/overrides the standard JSON Schema autocompletion using the usual CM6 mechanisms for combining extensions. For that, is there already a way to query relevant JSON Schema information about a given code range or syntax node? |
similarly, for example, with If you choose the additional autocomplete idea, which is also sound, I wonder if we can't provide additional API hooks to make it easier to author your own completion logic for certain cases 🤔 there has to be a more codemirror 6 appropriate way to solve this problem. I will open a ticket on the cm6 forum to ask the authors what they think is ideal - I'm sure other language modes have come across this problem. |
It would be great to have the ability to specify custom autocompletion sources for specific values. These sources could either be associated with a specific JSON Schema
format
tag, or specified as an array of completion functions that would receive the schema for the given property.I'd be interested in implementing this as a PR, but wanted to reach out, as I'm still figuring out how CM6 autocompletions work, much less how they're specifically set up in this extension.
Perhaps something like this?
The text was updated successfully, but these errors were encountered: