From 472e10f069c57da281ef178b28423f7f6b2529c2 Mon Sep 17 00:00:00 2001 From: Syahdan <58659387+LittleQuartZ@users.noreply.github.com> Date: Mon, 5 Dec 2022 09:49:37 +0700 Subject: [PATCH] lsp: add bufnr to passed argument (#82) * lsp: add bufnr to passed argument * lsp: add docs for last commit --- plugins/nvim-lsp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/nvim-lsp/default.nix b/plugins/nvim-lsp/default.nix index 8949510d..f2f74593 100644 --- a/plugins/nvim-lsp/default.nix +++ b/plugins/nvim-lsp/default.nix @@ -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