aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorAttila Tajti <attila.tajti@gmail.com>2022-11-30 20:42:27 +0100
committerStephan Seitz <stephan.seitz@fau.de>2022-12-14 17:27:16 +0100
commit6ed8a41bd594e14652318650a83442d385b193a9 (patch)
treea28aa7dc61b1da30a9f31eed8f1db85d5bff7c39 /lua
parentinstall: fix is_installed checks with shellslash (diff)
downloadnvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.tar
nvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.tar.gz
nvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.tar.bz2
nvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.tar.lz
nvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.tar.xz
nvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.tar.zst
nvim-treesitter-6ed8a41bd594e14652318650a83442d385b193a9.zip
utils: respect shellslash setting
Use '/' as path separator on Windows when shellslash is set.
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/utils.lua2
1 files changed, 1 insertions, 1 deletions
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