diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/shell_command_selectors.lua | 3 |
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++") |
