mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix: use nvim namespace convention #34010
This commit is contained in:
committed by
GitHub
parent
fed9069b8d
commit
62ba6e8a76
@@ -742,7 +742,7 @@ local registered_autocmds = {}
|
||||
|
||||
local function make_augroup_key(namespace, bufnr)
|
||||
local ns = M.get_namespace(namespace)
|
||||
return string.format('DiagnosticInsertLeave:%s:%s', bufnr, ns.name)
|
||||
return string.format('nvim.diagnostic.insertleave.%s.%s', bufnr, ns.name)
|
||||
end
|
||||
|
||||
--- @param namespace integer
|
||||
|
||||
@@ -189,7 +189,7 @@ function M.get_namespace(client_id, is_pull)
|
||||
vim.tbl_get((client or {}).server_capabilities, 'diagnosticProvider', 'identifier')
|
||||
local key = string.format('%d:%s', client_id, server_id or 'nil')
|
||||
local name = string.format(
|
||||
'vim.lsp.%s.%d.%s',
|
||||
'nvim.lsp.%s.%d.%s',
|
||||
client and client.name or 'unknown',
|
||||
client_id,
|
||||
server_id or 'nil'
|
||||
@@ -201,7 +201,7 @@ function M.get_namespace(client_id, is_pull)
|
||||
end
|
||||
return ns
|
||||
else
|
||||
local name = string.format('vim.lsp.%s.%d', client and client.name or 'unknown', client_id)
|
||||
local name = string.format('nvim.lsp.%s.%d', client and client.name or 'unknown', client_id)
|
||||
local ns = _client_push_namespaces[client_id]
|
||||
if not ns then
|
||||
ns = api.nvim_create_namespace(name)
|
||||
|
||||
Reference in New Issue
Block a user