feat: implement base autocomplete implementation for codemirror along with preRequest autocompletion
This commit is contained in:
committed by
liyasthomas
parent
dc5f52cc0d
commit
b9fc0175e7
@@ -8,6 +8,7 @@ import "codemirror/mode/javascript/javascript"
|
||||
import { ref, watch } from "@nuxtjs/composition-api"
|
||||
import { useCodemirror } from "~/helpers/editor/codemirror"
|
||||
import { LinterDefinition } from "~/helpers/editor/linting/linter"
|
||||
import { Completer } from "~/helpers/editor/completion"
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -16,11 +17,13 @@ const props = withDefaults(
|
||||
placeholder?: string
|
||||
wrap?: boolean
|
||||
linter: LinterDefinition | null
|
||||
completer: Completer | null
|
||||
}>(),
|
||||
{
|
||||
placeholder: "",
|
||||
wrap: true,
|
||||
linter: null as any,
|
||||
completer: null as any,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -45,5 +48,6 @@ useCodemirror(editor, value, {
|
||||
lineWrapping: props.wrap,
|
||||
},
|
||||
linter: props.linter,
|
||||
completer: props.completer,
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user