mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2025-01-01 12:49:15 -06:00
add php
This commit is contained in:
parent
cb2d352beb
commit
0d7f288dae
@ -2,7 +2,7 @@
|
||||
|
||||
Use treesitter to **autoclose** and **autorename** html tag
|
||||
|
||||
It work with html,tsx,vue,svelte.
|
||||
It work with html,tsx,vue,svelte,php.
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -5,9 +5,9 @@ if _G.__is_log then
|
||||
}
|
||||
else
|
||||
return{
|
||||
debug = function() end,
|
||||
info = function() end,
|
||||
error = function() end,
|
||||
debug = function(_) end,
|
||||
info = function(_) end,
|
||||
error = function(_) end,
|
||||
|
||||
}
|
||||
end
|
||||
|
@ -8,6 +8,7 @@ local M = {}
|
||||
|
||||
M.tbl_filetypes = {
|
||||
'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue', 'tsx', 'jsx',
|
||||
'php',
|
||||
'glimmer','handlebars','hbs'
|
||||
}
|
||||
|
||||
@ -19,7 +20,7 @@ M.tbl_skipTag = {
|
||||
local ERROR_TAG = "ERROR"
|
||||
|
||||
local HTML_TAG = {
|
||||
filetypes = {'html'},
|
||||
filetypes = {'html','php'},
|
||||
start_tag_pattern = 'start_tag',
|
||||
start_name_tag_pattern = 'tag_name',
|
||||
end_tag_pattern = "end_tag",
|
||||
|
@ -21,7 +21,9 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php include("includes/footer.php");?>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -177,6 +177,15 @@ local data = {
|
||||
before = [[<Opt.Input| ]],
|
||||
after = [[<Opt.Input>|</Opt.Input> ]]
|
||||
},
|
||||
{
|
||||
name = "18 php div " ,
|
||||
filepath = './sample/index.php',
|
||||
filetype = "php",
|
||||
linenr = 25,
|
||||
key = [[>]],
|
||||
before = [[<div| ]],
|
||||
after = [[<div>|</div> ]]
|
||||
},
|
||||
}
|
||||
local run_data = {}
|
||||
for _, value in pairs(data) do
|
||||
|
Loading…
Reference in New Issue
Block a user