mirror of
https://github.com/nvim-treesitter/nvim-treesitter-context
synced 2024-09-16 14:14:03 +02:00
feat(html): html support (#262)
* feat(html): html support * feat: update README * feat: moved README checkbox
This commit is contained in:
parent
e423bc927b
commit
922ba682fd
3 changed files with 146 additions and 1 deletions
|
@ -41,6 +41,7 @@ use 'nvim-treesitter/nvim-treesitter-context'
|
|||
- [x] `fish`
|
||||
- [x] `go`
|
||||
- [x] `graphql`
|
||||
- [x] `html_tags`
|
||||
- [x] `ini`
|
||||
- [x] `java`
|
||||
- [x] `javascript`
|
||||
|
@ -119,7 +120,6 @@ use 'nvim-treesitter/nvim-treesitter-context'
|
|||
- [ ] `hlsl`
|
||||
- [ ] `hocon`
|
||||
- [ ] `html`
|
||||
- [ ] `html_tags`
|
||||
- [ ] `htmldjango`
|
||||
- [ ] `http`
|
||||
- [ ] `jq`
|
||||
|
|
6
queries/html/context.scm
Normal file
6
queries/html/context.scm
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
([
|
||||
(element)
|
||||
(style_element)
|
||||
(script_element)
|
||||
] @context)
|
139
test/test.html
Normal file
139
test/test.html
Normal file
|
@ -0,0 +1,139 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link href="css/style.css" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<style>
|
||||
|
||||
|
||||
.test {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
color: red;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<main>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
<li></li>
|
||||
<li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</body>
|
||||
<script>
|
||||
var a = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var b = 2;
|
||||
function test() {
|
||||
let test = "asdasd";
|
||||
}
|
||||
|
||||
var c = a + b;
|
||||
</script>
|
||||
</html>
|
Loading…
Reference in a new issue