diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..3d1d1e8 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,17 @@ +-- Rerun tests only if their modification time changed. +cache = true + +-- Glorious list of warnings: https://luacheck.readthedocs.io/en/stable/warnings.html +ignore = { + "212", -- Unused argument, In the case of callback function, _arg_name is easier to understand than _, so this option is set to off. + "411", -- Redefining a local variable. + "412", -- Redefining an argument. + "422", -- Shadowing an argument + "122", -- Indirectly setting a readonly global + "331" -- Value assigned to variable is mutated but never accessed +} + +-- Global objects defined by the C code +read_globals = { + "vim", +} diff --git a/lua/treesitter-matchup/internal.lua b/lua/treesitter-matchup/internal.lua index 23a277b..8ee457c 100644 --- a/lua/treesitter-matchup/internal.lua +++ b/lua/treesitter-matchup/internal.lua @@ -86,7 +86,7 @@ function M.get_active_nodes(bufnr) end function M.containing_scope(node, bufnr, key) - local bufnr = bufnr or api.nvim_get_current_buf() + bufnr = bufnr or api.nvim_get_current_buf() local scopes = M.get_scopes(bufnr) if not node or not scopes then return end