mirror of
https://github.com/heyman/heynote.git
synced 2024-11-21 23:43:22 +01:00
add vue language support
This commit is contained in:
parent
0aaf62925f
commit
f9c841d19e
21
package-lock.json
generated
21
package-lock.json
generated
@ -25,6 +25,7 @@
|
||||
"@codemirror/lang-python": "^6.1.3",
|
||||
"@codemirror/lang-rust": "^6.0.1",
|
||||
"@codemirror/lang-sql": "^6.5.4",
|
||||
"@codemirror/lang-vue": "^0.1.3",
|
||||
"@codemirror/lang-xml": "^6.0.2",
|
||||
"@codemirror/language": "^6.9.3",
|
||||
"@codemirror/legacy-modes": "^6.3.3",
|
||||
@ -427,6 +428,20 @@
|
||||
"@lezer/lr": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-vue": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz",
|
||||
"integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@codemirror/lang-html": "^6.0.0",
|
||||
"@codemirror/lang-javascript": "^6.1.2",
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@lezer/common": "^1.2.0",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@lezer/lr": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-xml": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.0.2.tgz",
|
||||
@ -992,9 +1007,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@lezer/common": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.1.2.tgz",
|
||||
"integrity": "sha512-V+GqBsga5+cQJMfM0GdnHmg4DgWvLzgMWjbldBg0+jC3k9Gu6nJNZDLJxXEBT1Xj8KhRN4jmbC5CY7SIL++sVw==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz",
|
||||
"integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@lezer/cpp": {
|
||||
|
@ -44,6 +44,7 @@
|
||||
"@codemirror/lang-python": "^6.1.3",
|
||||
"@codemirror/lang-rust": "^6.0.1",
|
||||
"@codemirror/lang-sql": "^6.5.4",
|
||||
"@codemirror/lang-vue": "^0.1.3",
|
||||
"@codemirror/lang-xml": "^6.0.2",
|
||||
"@codemirror/language": "^6.9.3",
|
||||
"@codemirror/legacy-modes": "^6.3.3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
importScripts("guesslang.min.js")
|
||||
|
||||
GUESSLANG_LANGUAGES = ["json","py","html","sql","md","java","php","css","xml","cpp","rs","cs","rb","sh","yaml","toml","go","clj","erl","js","ts","swift","kt","groovy","ps1"]
|
||||
GUESSLANG_LANGUAGES = ["json","py","html","sql","md","java","php","css","xml","cpp","rs","cs","rb","sh","yaml","toml","go","clj","erl","js","ts","swift","kt","groovy","ps1","vue"]
|
||||
|
||||
const guessLang = new self.GuessLang()
|
||||
|
||||
|
@ -12,6 +12,7 @@ import { cppLanguage } from "@codemirror/lang-cpp"
|
||||
import { xmlLanguage } from "@codemirror/lang-xml"
|
||||
import { rustLanguage } from "@codemirror/lang-rust"
|
||||
import { csharpLanguage } from "@replit/codemirror-lang-csharp"
|
||||
import { vueLanguage } from "@codemirror/lang-vue";
|
||||
|
||||
import { StreamLanguage } from "@codemirror/language"
|
||||
import { ruby } from "@codemirror/legacy-modes/mode/ruby"
|
||||
@ -253,6 +254,12 @@ export const LANGUAGES = [
|
||||
parser: StreamLanguage.define(powerShell).parser,
|
||||
guesslang: "ps1",
|
||||
}),
|
||||
new Language({
|
||||
token: "vue",
|
||||
name: "Vue",
|
||||
parser: vueLanguage.parser,
|
||||
guesslang: "vue",
|
||||
}),
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user