-
Notifications
You must be signed in to change notification settings - Fork 19
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
Implicit autocompletion not working #12
Comments
The possible cause at the moment is because the implementation is to register the extension by the method described in the address below. https://codemirror.net/examples/config/ StateEffect.reconfigure.of(extensions) With this method, it seems that some states and other values cannot be reflected, so there may be some ingenuity. https://discuss.codemirror.net/t/how-update-extensions-after-creating/4064 |
Although it is palliative, please try to reload the extension by executing the |
Hi, how can i trigger showing autocomplete after every keypress, not only after ctrl + space? |
According to the CodeMirror specifications, there are patterns that do not work unless the extension is registered at initialization, and patterns that work even if the extension is registered later with the reconfigure instruction, so it is difficult to isolate the problem. In vue-codemirror6, I think that this problem occurred because it was processed with reconfigure at once. As a temporary measure, I prepared the It's a rough implementation, but please try to execute the <script setup>
import { watch } from 'vue';
import CodeMirror from 'vue-codemirror6";
const editor = ref();
// some function
watch(
() => extnetions.value,
() => editor.value?.forceReconfigure());
);
</script>
<template>
<codemirror v-model="value" ref="editor" />
</template> |
If you visit https://codemirror.net/try/ and type this in
... autocompletion automatically triggers when # is typed.
I tried to create the same code using vue-codemirror6 and the autocompletion only works when Ctrl+Space is pressed, e.g.
https://playcode.io/1085925
The text was updated successfully, but these errors were encountered: