aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2022-01-04 15:24:14 -0700
committerGitHub <noreply@github.com>2022-01-04 15:24:14 -0700
commit74a90cf0989dc4d6b564406844386c7f6504ce6e (patch)
tree4c1f1388e79223f912011c3c43c98290364e8daa
parentbb5e03fa4bb2365c8b3205ccb5f6f089761b6b9d (diff)
downloadrneovim-74a90cf0989dc4d6b564406844386c7f6504ce6e.tar.gz
rneovim-74a90cf0989dc4d6b564406844386c7f6504ce6e.tar.bz2
rneovim-74a90cf0989dc4d6b564406844386c7f6504ce6e.zip
chore: ignore unused args in filetype functions (#16927)
Also mark the 'getline' helper function as private to avoid docgen.
-rw-r--r--runtime/lua/vim/filetype.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index bbcbe53eaa..f53911d0a0 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -19,11 +19,13 @@ local function starsetf(ft)
}}
end
+---@private
local function getline(bufnr, lnum)
return api.nvim_buf_get_lines(bufnr, lnum-1, lnum, false)[1]
end
-- Filetypes based on file extension
+-- luacheck: push no unused args
local extension = {
-- BEGIN EXTENSION
["8th"] = "8th",
@@ -1325,6 +1327,7 @@ local pattern = {
["zsh.*"] = starsetf('zsh'),
-- END PATTERN
}
+-- luacheck: pop
---@private
local function sort_by_priority(t)