diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2021-08-20 11:11:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-20 11:11:24 -0400 |
| commit | a97af306c4e9c9a6fa7c886c0ffe3079822c5203 (patch) | |
| tree | f5e2b50a767e93618d0d8fdddb8a964c90633c8a /scratch/buffer_highlights.lua | |
| parent | d6d28dbe324de9826a579155076873888169ba0f (diff) | |
feat(performance): Major performance improvements using async v2 from @oberblastmeister (#987)
* start: Working w/ async jobs
* short circuit to using bad finder if you pass writer.
Diffstat (limited to 'scratch/buffer_highlights.lua')
| -rw-r--r-- | scratch/buffer_highlights.lua | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/scratch/buffer_highlights.lua b/scratch/buffer_highlights.lua deleted file mode 100644 index ee9edae..0000000 --- a/scratch/buffer_highlights.lua +++ /dev/null @@ -1,24 +0,0 @@ -local a = vim.api - -local ns = a.nvim_create_namespace("treesitter/highlighter") -print(ns) -local bufnr = 0 - --- P(a.nvim_buf_get_extmarks(bufnr, ns, 0, -1, { details = true })) - -local parser = vim.treesitter.get_parser(bufnr, "lua") -local query = vim.treesitter.get_query("lua", "highlights") -P(query) - -local root = parser:parse()[1]:root() -print("root", root) - -local highlighter = vim.treesitter.highlighter.new(parser) -local highlighter_query = highlighter:get_query("lua") - -for id, node, metadata in query:iter_captures(root, bufnr, 0, -1) do - local row1, col1, row2, col2 = node:range() - print(highlighter_query.hl_cache[id]) - -- print(id, node, metadata, vim.treesitter.get_node_text(node, bufnr)) - -- print(">>>>", row1, col1, row2, col2) -end |
