Skip to content

Commit

Permalink
refactor: silence luals warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dundargoc committed Dec 22, 2024
1 parent f1405c1 commit d68378c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/docgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ local function indent(n, s)
assert(type(n) == 'string', 'n must be number or string')
prefix = n
end
local lines = vim.split(s, '\n', true)
local lines = vim.split(s, '\n')
for i, line in ipairs(lines) do
lines[i] = prefix .. line
end
Expand Down Expand Up @@ -89,7 +89,7 @@ local function require_all_configs()
vim.env.XDG_CACHE_HOME = '/home/user/.cache'

-- Configs are lazy-loaded, tickle them to populate the `configs` singleton.
for _, v in ipairs(vim.fn.glob('lua/lspconfig/configs/*.lua', 1, 1)) do
for _, v in ipairs(vim.fn.glob('lua/lspconfig/configs/*.lua', true, true)) do
local module_name = v:gsub('.*/', ''):gsub('%.lua$', '')
configs[module_name] = require('lspconfig.configs.' .. module_name)
end
Expand Down
2 changes: 2 additions & 0 deletions test/lspconfig_spec.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
local root = vim.fn.getcwd()

describe('lspconfig', function()
--- @diagnostic disable-next-line:undefined-field
local eq = assert.are.equal
--- @diagnostic disable-next-line:undefined-field
local same = assert.are.same

before_each(function()
Expand Down

0 comments on commit d68378c

Please sign in to comment.