mirror of
https://github.com/neovim/neovim.git
synced 2025-11-22 10:06:33 +00:00
refactor: use nvim.foo.bar format for autocommand groups
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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