Skip to content
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

add syntax highlight for *.kdu component files #5993

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@
[submodule "vendor/grammars/language-kak"]
path = vendor/grammars/language-kak
url = https://github.com/kakoune-editor/language-kak
[submodule "vendor/grammars/kdu-syntax-highlight"]
path = vendor/grammars/kdu-syntax-highlight
url = https://github.com/KduJS/kdu-syntax-highlight
[submodule "vendor/grammars/language-kotlin"]
path = vendor/grammars/language-kotlin
url = https://github.com/nishtahir/language-kotlin
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ vendor/grammars/language-jsonnet:
- source.jsonnet
vendor/grammars/language-kak:
- source.kakscript
vendor/grammars/kdu-syntax-highlight:
- text.html.kdu
vendor/grammars/language-kotlin:
- source.kotlin
vendor/grammars/language-less:
Expand Down
8 changes: 8 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3278,6 +3278,14 @@ KakouneScript:
- kakrc
ace_mode: text
language_id: 603336474
Kdu:
type: markup
color: "#03a9f4"
extensions:
- ".kdu"
tm_scope: text.html.kdu
ace_mode: html
language_id: 1407
KiCad Layout:
type: data
color: "#2f4aab"
Expand Down
21 changes: 21 additions & 0 deletions samples/Kdu/basic.kdu
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<style>
.red {
color: #f00;
}
</style>

<template>
<div>
<h2 k-class="red">{{msg}}</h2>
</div>
</template>

<script>
module.exports = {
data: function () {
return {
msg: 'Hello from Kdu!'
}
}
}
</script>
30 changes: 30 additions & 0 deletions samples/Kdu/pre-processors.kdu
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<style lang="stylus">
font-stack = Helvetica, sans-serif
primary-color = #999
body
font 100% font-stack
color primary-color
</style>

<template lang="jade">
div
h1 {{msg}}
comp-a
comp-b
</template>

<script lang="babel">
import compA from './components/a.kdu'
import compB from './components/b.kdu'
export default {
data () {
return {
msg: 'Hello from Babel!'
}
},
components: {
'comp-a': compA,
'comp-b': compB
}
}
</script>
1 change: 1 addition & 0 deletions vendor/grammars/kdu-syntax-highlight
Submodule kdu-syntax-highlight added at 440562