From a4d43a85cb8db608fa4528b8e83528618d6f4845 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sun, 9 Jul 2023 14:14:54 +0200 Subject: [PATCH] vim: fix variable scope (unnecessarily global) --- config/nvim/lua/user/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/lua/user/plugins/lsp.lua b/config/nvim/lua/user/plugins/lsp.lua index 7ca80a0..52d29f0 100644 --- a/config/nvim/lua/user/plugins/lsp.lua +++ b/config/nvim/lua/user/plugins/lsp.lua @@ -19,7 +19,7 @@ local on_attach = function(client, bufnr) map('n', 'grr', vim.lsp.buf.rename, opts) map('n', 'gt', vim.lsp.buf.type_definition, opts) - filetype_attach = filetypes[vim.bo.filetype] + local filetype_attach = filetypes[vim.bo.filetype] if filetype_attach then filetype_attach(client, bufnr) end end