lsp: add bufnr to passed argument (#82)

* lsp: add bufnr to passed argument

* lsp: add docs for last commit
This commit is contained in:
Syahdan 2022-12-05 09:49:37 +07:00 committed by GitHub
parent 78f5f36738
commit 472e10f069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ in
onAttach = mkOption {
type = types.lines;
description = "A lua function to be run when a new LSP buffer is attached. The argument `client` is provided.";
description = "A lua function to be run when a new LSP buffer is attached. The argument `client` and `bufnr` is provided.";
default = "";
};
@ -69,7 +69,7 @@ in
do
${cfg.preConfig}
local __lspServers = ${helpers.toLuaObject cfg.enabledServers}
local __lspOnAttach = function(client)
local __lspOnAttach = function(client, bufnr)
${cfg.onAttach}
end