diff options
| author | mvink <mike1994vink@gmail.com> | 2022-11-16 12:43:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-16 12:43:46 +0100 |
| commit | 5e255e41669f1f7c985bc0f44a5f551b8caebaf3 (patch) | |
| tree | 6f01b4bc2ad83a6f6455b47c71c9b797a3dee3ea /lua/nvim-treesitter/utils.lua | |
| parent | fdaab4dff7768fd63430fb29f80cb7ebea6fe887 (diff) | |
| parent | dc27512e0019dcf4b6fbf0e0d5f285b4c9858308 (diff) | |
Diffstat (limited to 'lua/nvim-treesitter/utils.lua')
| -rw-r--r-- | lua/nvim-treesitter/utils.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/utils.lua b/lua/nvim-treesitter/utils.lua index 81ce7017..156ba9c3 100644 --- a/lua/nvim-treesitter/utils.lua +++ b/lua/nvim-treesitter/utils.lua @@ -11,6 +11,7 @@ function M.notify(msg, log_level, opts) end -- Returns the system specific path seperator. +---@return string function M.get_path_sep() return fn.has "win32" == 1 and "\\" or "/" end @@ -82,6 +83,10 @@ function M.setup_commands(mod, commands) end end +---@param dir string +---@param create_err string +---@param writeable_err string +---@return string|nil, string|nil function M.create_or_reuse_writable_dir(dir, create_err, writeable_err) create_err = create_err or M.join_space("Could not create dir '", dir, "': ") writeable_err = writeable_err or M.join_space("Invalid rights, '", dir, "' should be read/write") @@ -201,6 +206,7 @@ function M.to_func(a) return type(a) == "function" and a or M.constant(a) end +---@return string|nil function M.ts_cli_version() if fn.executable "tree-sitter" == 1 then local handle = io.popen "tree-sitter -V" |
