mirror of
https://github.com/neovim/neovim.git
synced 2026-07-18 07:01:19 +00:00
backport test: lint naming conventions (#39124)
test: lint naming conventions Problem: Naming conventions are not automatically checked. Solution: Add a check to the doc generator. Eventually we should extract this somehow, but that will require refactoring the doc generator... Note: this also checks non-public functions, basically anything that passes through `gen_eval_files.lua` and `gen_vimdoc.lua`. And that's a good thing.
This commit is contained in:
@@ -1071,17 +1071,17 @@ end
|
||||
--- Execute a lsp command, either via client command function (if available)
|
||||
--- or via workspace/executeCommand (if supported by the server)
|
||||
---
|
||||
--- @param command lsp.Command
|
||||
--- @param cmd lsp.Command
|
||||
--- @param context? {bufnr?: integer}
|
||||
--- @param handler? lsp.Handler only called if a server command
|
||||
function Client:exec_cmd(command, context, handler)
|
||||
function Client:exec_cmd(cmd, context, handler)
|
||||
context = vim.deepcopy(context or {}, true) --[[@as lsp.HandlerContext]]
|
||||
context.bufnr = vim._resolve_bufnr(context.bufnr)
|
||||
context.client_id = self.id
|
||||
local cmdname = command.command
|
||||
local cmdname = cmd.command
|
||||
local fn = self.commands[cmdname] or lsp.commands[cmdname]
|
||||
if fn then
|
||||
fn(command, context)
|
||||
fn(cmd, context)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1099,12 +1099,12 @@ function Client:exec_cmd(command, context, handler)
|
||||
)
|
||||
return
|
||||
end
|
||||
-- Not using command directly to exclude extra properties,
|
||||
-- Not using cmd directly to exclude extra properties,
|
||||
-- see https://github.com/python-lsp/python-lsp-server/issues/146
|
||||
--- @type lsp.ExecuteCommandParams
|
||||
local params = {
|
||||
command = cmdname,
|
||||
arguments = command.arguments,
|
||||
arguments = cmd.arguments,
|
||||
}
|
||||
self:request('workspace/executeCommand', params, handler, context.bufnr)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user