mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2025-01-26 01:13:53 -06:00
Compare commits
No commits in common. "349f15a9f0c55ebfbb97f307554acfe5ce51edd2" and "ccb2a827f2a498de3e037a1b530c003fa750e5b1" have entirely different histories.
349f15a9f0
...
ccb2a827f2
19
README.md
19
README.md
@ -34,25 +34,10 @@ Before Input After
|
||||
|
||||
## Setup
|
||||
|
||||
Requires `Nvim 0.9.5` and up.
|
||||
Requires `Nvim 0.9.0` and up.
|
||||
|
||||
```lua
|
||||
require('nvim-ts-autotag').setup({
|
||||
opts = {
|
||||
-- Defaults
|
||||
enable_close = true, -- Auto close tags
|
||||
enable_rename = true, -- Auto rename pairs of tags
|
||||
enable_close_on_slash = false -- Auto close on trailing </
|
||||
},
|
||||
-- Also override individual filetype configs, these take priority.
|
||||
-- Empty by default, useful if one on of the "opts" global settings
|
||||
-- doesn't work well in a specific filetype
|
||||
per_filetype = {
|
||||
["html"] = {
|
||||
enable_close = false
|
||||
}
|
||||
}
|
||||
})
|
||||
require('nvim-ts-autotag').setup()
|
||||
```
|
||||
|
||||
> [!CAUTION]
|
||||
|
@ -112,8 +112,7 @@ local Opts = {
|
||||
}
|
||||
|
||||
---@class nvim-ts-autotag.PluginSetup
|
||||
---@field private did_setup boolean
|
||||
---@field opts nvim-ts-autotag.Opts? General setup optionss
|
||||
---@field opts nvim-ts-autotag.Opts?
|
||||
---@field aliases { [string]: string }? Aliases a filetype to an existing filetype tag config
|
||||
---@field per_filetype { [string]: nvim-ts-autotag.Opts }? Per filetype config overrides
|
||||
local Setup = {
|
||||
|
@ -442,7 +442,6 @@ end
|
||||
|
||||
M.attach = function(bufnr)
|
||||
bufnr = bufnr or vim.api.nvim_get_current_buf()
|
||||
---@diagnostic disable-next-line: invisible
|
||||
if not Setup.did_setup then
|
||||
local _, ts_configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not ts_configs then
|
||||
|
Loading…
x
Reference in New Issue
Block a user