diff options
| author | Suhas Hebbar <suhas.shripad.hebbar@gmail.com> | 2020-10-06 02:53:00 +0530 |
|---|---|---|
| committer | Kiyan Yazdani <yazdani.kiyan@protonmail.com> | 2020-10-06 19:08:42 +0200 |
| commit | f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6 (patch) | |
| tree | d2d3a6da323ffc1de437a9bf55d2cdcafc0a9d38 | |
| parent | Code Refactor (diff) | |
| download | nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.tar nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.tar.gz nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.tar.bz2 nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.tar.lz nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.tar.xz nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.tar.zst nvim-treesitter-f5ac2b4a1a34b3acbbb25f67935d2dd19c992fd6.zip | |
Shorten module reference shell_command_selectors to shell.
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index f6ba1724f..246530a4a 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -6,7 +6,7 @@ local utils = require'nvim-treesitter.utils' local parsers = require'nvim-treesitter.parsers' local info = require'nvim-treesitter.info' local configs = require'nvim-treesitter.configs' -local shell_command_selectors = require'nvim-treesitter.shell_command_selectors' +local shell = require'nvim-treesitter.shell_command_selectors' local M = {} local lockfile = {} @@ -111,7 +111,7 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync) local compile_location = cache_folder..path_sep..(repo.location or project_name) local parser_lib_name = install_folder..path_sep..lang..".so" - local cc = shell_command_selectors.select_executable(M.compilers) + 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), '", "') @@ -121,21 +121,20 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync) local revision = configs.get_update_strategy() == 'lockfile' and get_revision(lang) local command_list = {} - vim.list_extend(command_list, { shell_command_selectors.select_install_rm_cmd(cache_folder, project_name) }) - vim.list_extend(command_list, - shell_command_selectors.select_download_commands(repo, project_name, cache_folder, revision)) + vim.list_extend(command_list, { shell.select_install_rm_cmd(cache_folder, project_name) }) + vim.list_extend(command_list, shell.select_download_commands(repo, project_name, cache_folder, revision)) vim.list_extend(command_list, { { cmd = cc, info = 'Compiling...', err = 'Error during compilation', opts = { - args = vim.tbl_flatten(shell_command_selectors.select_compiler_args(repo)), + args = vim.tbl_flatten(shell.select_compiler_args(repo)), cwd = compile_location } }, - shell_command_selectors.select_mv_cmd('parser.so', parser_lib_name, compile_location), - shell_command_selectors.select_install_rm_cmd(cache_folder, project_name) + shell.select_mv_cmd('parser.so', parser_lib_name, compile_location), + shell.select_install_rm_cmd(cache_folder, project_name) }) if with_sync then @@ -235,7 +234,7 @@ function M.uninstall(lang) local parser_lib = install_dir..path_sep..lang..".so" local command_list = { - shell_command_selectors.select_rm_file_cmd(parser_lib, "Uninstalling parser for "..lang) + shell.select_rm_file_cmd(parser_lib, "Uninstalling parser for "..lang) } M.iter_cmd(command_list, 1, lang, 'Treesitter parser for '..lang..' has been uninstalled') end |
