aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/install.lua20
1 files changed, 9 insertions, 11 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index 44e7e048f..b6e3c3de3 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -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