In this gist we add Custom HTML and JSON autocomplete without overriding the original autocomplete.
Each language support in code mirror exports nameLanguage
(eg: htmlLanguage) to allow you to add custom autocomplete.
import React, { useMemo } from 'react'
import CodeMirror from '@uiw/react-codemirror'
import { json, jsonLanguage } from '@codemirror/lang-json'
import { html, htmlLanguage } from '@codemirror/lang-html'
import { syntaxTree } from '@codemirror/language'