From 6ed8a41bd594e14652318650a83442d385b193a9 Mon Sep 17 00:00:00 2001 From: Attila Tajti Date: Wed, 30 Nov 2022 20:42:27 +0100 Subject: [PATCH] utils: respect shellslash setting Use '/' as path separator on Windows when shellslash is set. --- lua/nvim-treesitter/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-treesitter/utils.lua b/lua/nvim-treesitter/utils.lua index 156ba9c31..c738ee56e 100644 --- a/lua/nvim-treesitter/utils.lua +++ b/lua/nvim-treesitter/utils.lua @@ -13,7 +13,7 @@ end -- Returns the system specific path seperator. ---@return string function M.get_path_sep() - return fn.has "win32" == 1 and "\\" or "/" + return (fn.has "win32" == 1 and not vim.opt.shellslash:get()) and "\\" or "/" end -- Returns a function that joins the given arguments with separator. Arguments