mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2025-01-24 18:53:53 -06:00
Compare commits
4 Commits
bdbf0b1fc3
...
eda9c78923
Author | SHA1 | Date | |
---|---|---|---|
eda9c78923 | |||
715d5b8efa | |||
965e8f905e | |||
|
c54af24ea9 |
@ -256,13 +256,6 @@ local function find_tag_node(opt)
|
||||
local name_tag_pattern = opt.name_tag_pattern
|
||||
local skip_tag_pattern = opt.skip_tag_pattern
|
||||
local find_child = opt.find_child or false
|
||||
--- PERF: Some parsers don't seemingly pick up their trees correctly, so we have to reparse the
|
||||
--- entire source. This is slow, see if we can avoid this.
|
||||
if target and target:has_changes() then
|
||||
local parser = vim.treesitter.get_parser()
|
||||
_ = (parser and parser:parse(true) or nil)
|
||||
target = ts_utils.get_node_at_cursor()
|
||||
end
|
||||
local node
|
||||
if find_child then
|
||||
node = find_child_match({
|
||||
|
@ -1,5 +1,4 @@
|
||||
require("tests.minimal_init")
|
||||
|
||||
---@type string
|
||||
local test_file = vim.v.argv[#vim.v.argv]
|
||||
if test_file == "" or not test_file:find("tests/specs/", nil, true) then
|
||||
@ -7,6 +6,10 @@ if test_file == "" or not test_file:find("tests/specs/", nil, true) then
|
||||
end
|
||||
print("[STARTUP] Running all tests in " .. test_file)
|
||||
|
||||
vim.cmd([[
|
||||
|
||||
]])
|
||||
|
||||
require("plenary.test_harness").test_directory(test_file, {
|
||||
minimal_init = "tests/minimal_init.lua",
|
||||
sequential = true,
|
||||
|
@ -37,7 +37,6 @@ end
|
||||
|
||||
M.setup_nvim_treesitter = function(opts)
|
||||
opts = vim.tbl_deep_extend("keep", opts or {}, {
|
||||
sync = true,
|
||||
ensure_installed = {
|
||||
"html",
|
||||
"javascript",
|
||||
|
Loading…
x
Reference in New Issue
Block a user