aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2022-12-29 21:53:30 +0100
committerStephan Seitz <stephan.seitz@fau.de>2023-01-08 00:33:13 +0100
commit3e316204f8ec8450bbaace69d0bf8fe332633fec (patch)
tree40dc6ed16ad2e5bb1fc0ff79c3761963afb0ab86 /lua
parentinstall: allow pure C parsers to be compiled without `-lstdc++` (diff)
downloadnvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.tar
nvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.tar.gz
nvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.tar.bz2
nvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.tar.lz
nvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.tar.xz
nvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.tar.zst
nvim-treesitter-3e316204f8ec8450bbaace69d0bf8fe332633fec.zip
ci: fix file name for cache calculation
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/shell_command_selectors.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua
index 17196b81e..9676beb5d 100644
--- a/lua/nvim-treesitter/shell_command_selectors.lua
+++ b/lua/nvim-treesitter/shell_command_selectors.lua
@@ -99,7 +99,8 @@ function M.select_compiler_args(repo, compiler)
}
if
#vim.tbl_filter(function(file)
- return file:match "%.cc$" or file:match "%cpp$" or file:match "%.cxx$"
+ local ext = vim.fn.fnamemodify(file, ":e")
+ return ext == "cc" or ext == "cpp" or ext == "cxx"
end, repo.files) > 0
then
table.insert(args, "-lstdc++")