refactor: use nvim.foo.bar format for autocommand groups

This commit is contained in:
Maria José Solano
2025-01-13 19:45:11 -08:00
parent 850084b519
commit 09e01437c9
28 changed files with 45 additions and 45 deletions

View File

@@ -183,7 +183,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).

View File

@@ -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,
@@ -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,

View File

@@ -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,