Add astro filetype (#89)

* Add astro filetype to internal

* Remove autoformatting, update README

- Revert formatting to original
- Update supported filetypes in README
This commit is contained in:
Simon Ward 2023-04-13 13:06:12 +01:00 committed by GitHub
parent 0716740e00
commit cac97f3b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 4 deletions

View File

@ -2,7 +2,22 @@
Use treesitter to **autoclose** and **autorename** html tag
It work with html,tsx,vue,svelte,php,rescript.
It works with:
- astro
- glimmer
- handlebars
- html
- javascript
- jsx
- markdown
- php
- rescript
- svelte
- tsx
- typescript
- vue
- xml
## Usage
@ -60,7 +75,7 @@ local filetypes = {
'xml',
'php',
'markdown',
'glimmer','handlebars','hbs'
'astro', 'glimmer', 'handlebars', 'hbs'
}
local skip_tags = {
'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'slot',

View File

@ -12,7 +12,7 @@ M.tbl_filetypes = {
'xml',
'php',
'markdown',
'glimmer', 'handlebars', 'hbs',
'astro', 'glimmer', 'handlebars', 'hbs',
'htmldjango'
}
@ -26,7 +26,14 @@ local ERROR_TAG = 'ERROR'
-- stylua: ignore
local HTML_TAG = {
filetypes = { 'html', 'php', 'xml', 'markdown', 'htmldjango' },
filetypes = {
'astro',
'html',
'htmldjango',
'markdown',
'php',
'xml',
},
start_tag_pattern = 'start_tag',
start_name_tag_pattern = 'tag_name',
end_tag_pattern = "end_tag",