Skip to content

Commit

Permalink
Add rust file supports (#194)
Browse files Browse the repository at this point in the history
* Update plugin.lua 

added rust

* trying to update autoclose

* format

* Update plugin.lua

* Update plugin.lua

* Update plugin.lua

* format with stylua

---------

Co-authored-by: Price Hiller <[email protected]>
  • Loading branch information
Alt-iOS and PriceHiller authored Jun 10, 2024
1 parent b873197 commit 78e7cf7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lua/nvim-ts-autotag/config/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ local function setup_tag_configs()
element_tag = { "element" },
skip_tag_pattern = { "quoted_attribute_value", "tag_end", "attribute", "value" },
}))

TagConfigs:add(base_cfg:extend("rust", {
start_tag_pattern = { "open_tag" },
start_name_tag_pattern = { "node_identifier" },
end_tag_pattern = { "close_tag" },
end_name_tag_pattern = { "node_identifier" },
close_tag_pattern = { "close_tag" },
close_name_tag_pattern = { "close_tag", "node_identifier" },
element_tag = { "element_node" },
skip_tag_pattern = { "close_tag", "node_attribute", "block" },
}))
end

---@class nvim-ts-autotag.Opts
Expand Down Expand Up @@ -136,6 +147,7 @@ local Setup = {
["rescript"] = "typescriptreact",
["handlebars"] = "glimmer",
["hbs"] = "glimmer",
["rust"] = "rust",
},
per_filetype = {},
}
Expand Down

0 comments on commit 78e7cf7

Please sign in to comment.