diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2022-10-31 10:52:52 +0000 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-10-31 12:00:45 +0100 |
| commit | 0948bf22745f1d80572e2b46ed547c7c8674cca9 (patch) | |
| tree | 6bd8d49b094b36a61e9a38b1f1b2d04004330ca4 /lua/nvim-treesitter/utils.lua | |
| parent | 4392211d77a11f3f4806c963ff904506cb649a1f (diff) | |
feat(emmy): add emmylua annotations
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" |
