mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
refactor: pull out predicate function
This commit is contained in:
parent
59f5d64a61
commit
5f2c6c0c83
1 changed files with 9 additions and 11 deletions
|
|
@ -145,18 +145,16 @@ local function get_compile_location(repo, cache_dir, project_name, from_local_pa
|
|||
return fs.joinpath(cache_dir, repo_location)
|
||||
end
|
||||
|
||||
local function istring(c)
|
||||
return type(c) == 'string'
|
||||
end
|
||||
|
||||
local function cc_err()
|
||||
log.error('No C compiler found! "' .. table.concat(
|
||||
vim.iter.filter(
|
||||
---@param c string
|
||||
---@return boolean
|
||||
function(c)
|
||||
return type(c) == 'string'
|
||||
end,
|
||||
M.compilers
|
||||
),
|
||||
'", "'
|
||||
) .. '" are not executable.')
|
||||
log.error(
|
||||
'No C compiler found! "'
|
||||
.. table.concat(vim.iter.filter(istring, M.compilers), '", "')
|
||||
.. '" are not executable.'
|
||||
)
|
||||
end
|
||||
|
||||
--- @param x string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue