Open Lawndlwd opened 1 year ago
@Lawndlwd Upgrade v4.21.18
thanks for your reply,
but i am using import { langs } from '@uiw/codemirror-extensions-langs'
Because i have different languages that change dynamically as you see here
extensions={[langs[extensions]()]} // javascript
where extensions is keyof typeof langs
the problem accord after renovate so it worked before.
@Lawndlwd
import { loadLanguage, langNames, langs } from '@uiw/codemirror-extensions-langs';
loadLanguage('tsx');
langs.tsx();
console.log('langNames:', langNames); // => "jsx" | "typescript" | "javascript" | "tsx"
import { loadLanguage, langNames, langs } from '@uiw/codemirror-extensions-langs';
const name = 'jsx';
if (langNames.includes(name)) {
console.log('extensions:', langNames[name]); // => extensions
}
I had this issue and moved to @lezer/highlight@1.1.6
and got syntax highlight working properly for anyone that might come across this.
Here are the relevant packages:
{
"@codemirror/lang-markdown": "^6.2.4",
"@codemirror/language-data": "^6.4.0",
"@lezer/highlight": "1.1.6",
"@replit/codemirror-vim": "^6.1.0",
"@uiw/codemirror-themes": "^4.21.21",
"@uiw/react-codemirror": "^4.21.21",
}
CodeMirror plugin crashed: TypeError: tags is not iterable
maybe related to @lezer
highlight colors are gray all time
version 4.21.15 node v18.18.0