mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
Merge #32001 from MariaSolOs/consistent-namespaces
This commit is contained in:
@@ -192,7 +192,7 @@ local M = {}
|
||||
---@type table<integer,TS.FoldInfo>
|
||||
local foldinfos = {}
|
||||
|
||||
local group = api.nvim_create_augroup('treesitter/fold', {})
|
||||
local group = api.nvim_create_augroup('nvim.treesitter.fold', {})
|
||||
|
||||
--- Update the folds in the windows that contain the buffer and use expr foldmethod (assuming that
|
||||
--- the user doesn't use different foldexpr for the same buffer).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local api = vim.api
|
||||
|
||||
local namespace = api.nvim_create_namespace('vim.treesitter.query_linter')
|
||||
local namespace = api.nvim_create_namespace('nvim.treesitter.query_linter')
|
||||
|
||||
local M = {}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ function TSTreeView:new(bufnr, lang)
|
||||
end
|
||||
|
||||
local t = {
|
||||
ns = api.nvim_create_namespace('treesitter/dev-inspect'),
|
||||
ns = api.nvim_create_namespace('nvim.treesitter.dev_inspect'),
|
||||
nodes = nodes,
|
||||
named = named,
|
||||
---@type vim.treesitter.dev.TSTreeViewOpts
|
||||
@@ -135,7 +135,7 @@ function TSTreeView:new(bufnr, lang)
|
||||
return t
|
||||
end
|
||||
|
||||
local decor_ns = api.nvim_create_namespace('ts.dev')
|
||||
local decor_ns = api.nvim_create_namespace('nvim.treesitter.dev')
|
||||
|
||||
---@param range Range4
|
||||
---@return string
|
||||
@@ -442,7 +442,7 @@ function M.inspect_tree(opts)
|
||||
end,
|
||||
})
|
||||
|
||||
local group = api.nvim_create_augroup('treesitter/dev', {})
|
||||
local group = api.nvim_create_augroup('nvim.treesitter.dev', {})
|
||||
|
||||
api.nvim_create_autocmd('CursorMoved', {
|
||||
group = group,
|
||||
@@ -547,7 +547,7 @@ function M.inspect_tree(opts)
|
||||
})
|
||||
end
|
||||
|
||||
local edit_ns = api.nvim_create_namespace('treesitter/dev-edit')
|
||||
local edit_ns = api.nvim_create_namespace('nvim.treesitter.dev_edit')
|
||||
|
||||
---@param query_win integer
|
||||
---@param base_win integer
|
||||
@@ -633,7 +633,7 @@ function M.edit_query(lang)
|
||||
-- can infer the language later.
|
||||
api.nvim_buf_set_name(query_buf, string.format('%s/query_editor.scm', lang))
|
||||
|
||||
local group = api.nvim_create_augroup('treesitter/dev-edit', {})
|
||||
local group = api.nvim_create_augroup('nvim.treesitter.dev_edit', {})
|
||||
api.nvim_create_autocmd({ 'TextChanged', 'InsertLeave' }, {
|
||||
group = group,
|
||||
buffer = query_buf,
|
||||
|
||||
@@ -2,7 +2,7 @@ local api = vim.api
|
||||
local query = vim.treesitter.query
|
||||
local Range = require('vim.treesitter._range')
|
||||
|
||||
local ns = api.nvim_create_namespace('treesitter/highlighter')
|
||||
local ns = api.nvim_create_namespace('nvim.treesitter.highlighter')
|
||||
|
||||
---@alias vim.treesitter.highlighter.Iter fun(end_line: integer|nil): integer, TSNode, vim.treesitter.query.TSMetadata, TSQueryMatch
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ end, false)
|
||||
|
||||
api.nvim_create_autocmd('OptionSet', {
|
||||
pattern = { 'runtimepath' },
|
||||
group = api.nvim_create_augroup('ts_query_cache_reset', { clear = true }),
|
||||
group = api.nvim_create_augroup('nvim.treesitter.query_cache_reset', { clear = true }),
|
||||
callback = function()
|
||||
M.get:clear()
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user