diff options
| author | kiyan <yazdani.kiyan@protonmail.com> | 2021-02-22 23:01:12 +0100 |
|---|---|---|
| committer | Kiyan <yazdani.kiyan@protonmail.com> | 2021-02-27 13:36:33 +0100 |
| commit | 9d57216c0d94c9823c0d971caeaffb3b261e527e (patch) | |
| tree | 987e0019a615dbf2cb1c7f7338194152d8032fd0 /lua/nvim-treesitter/install.lua | |
| parent | 91a89aa408c19572bd7a41caa8ab8666143bec8c (diff) | |
chore: remove useless code and indent files
Diffstat (limited to 'lua/nvim-treesitter/install.lua')
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index a34177e2..2bf35e7c 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -28,7 +28,7 @@ end local function get_job_status() return "[nvim-treesitter] ["..finished_commands.."/"..started_commands - ..(failed_commands > 0 and ", failed: "..failed_commands or "").."]" + ..(failed_commands > 0 and ", failed: "..failed_commands or "").."]" end local function get_revision(lang) @@ -53,7 +53,7 @@ local function outdated_parsers() return vim.tbl_filter(function(lang) return needs_update(lang) end, - info.installed_parsers()) + info.installed_parsers()) end function M.iter_cmd(cmd_list, i, lang, success_message) @@ -76,7 +76,7 @@ function M.iter_cmd(cmd_list, i, lang, success_message) failed_commands = failed_commands + 1 finished_commands = finished_commands + 1 return api.nvim_err_writeln((attr.err or ("Failed to execute the following command:\n"..vim.inspect(attr))) - ..'\n'..vim.inspect(err)) + ..'\n'..vim.inspect(err)) end else local handle @@ -123,8 +123,8 @@ local function iter_cmd_sync(cmd_list) if vim.v.shell_error ~= 0 then print(ret) api.nvim_err_writeln((cmd.err and cmd.err..'\n' or '') - .."Failed to execute the following command:\n" - ..vim.inspect(cmd)) + .."Failed to execute the following command:\n" + ..vim.inspect(cmd)) return false end end @@ -162,8 +162,8 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync, local cc = shell.select_executable(M.compilers) if not cc then api.nvim_err_writeln('No C compiler found! "' - ..table.concat(vim.tbl_filter(function(c) return type(c) == 'string' end, M.compilers), '", "') - ..'" are not executable.') + ..table.concat(vim.tbl_filter(function(c) return type(c) == 'string' end, M.compilers), '", "') + ..'" are not executable.') return end local revision = configs.get_update_strategy() == 'lockfile' and get_revision(lang) @@ -283,8 +283,8 @@ function M.update(lang) install(false, 'force')(lang) else local parsers_to_update = configs.get_update_strategy() == 'lockfile' - and outdated_parsers() - or info.installed_parsers() + and outdated_parsers() + or info.installed_parsers() if #parsers_to_update == 0 then print('All parsers are up-to-date!') end @@ -353,7 +353,7 @@ function M.write_lockfile(verbose, skip_langs) print(vim.inspect(lockfile)) end vim.fn.writefile(vim.fn.split(vim.fn.json_encode(lockfile), '\n'), - utils.join_path(utils.get_package_path(), "lockfile.json")) + utils.join_path(utils.get_package_path(), "lockfile.json")) end M.ensure_installed = install(false, false) |
