From 6ab3e8a73920e3d2e02e57f7dd3a1f3d8e54ee63 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 23 Jul 2022 14:16:43 +0200 Subject: chore: bump plugins version (#2723) --- lua/lvim/core/telescope/custom-finders.lua | 50 ++++++++++++++++-------------- lua/lvim/plugins.lua | 2 ++ lua/lvim/utils/git.lua | 18 +++++------ 3 files changed, 36 insertions(+), 34 deletions(-) (limited to 'lua') diff --git a/lua/lvim/core/telescope/custom-finders.lua b/lua/lvim/core/telescope/custom-finders.lua index b0ee1c07..69428a44 100644 --- a/lua/lvim/core/telescope/custom-finders.lua +++ b/lua/lvim/core/telescope/custom-finders.lua @@ -55,33 +55,35 @@ function M.view_lunarvim_changelog() } opts.entry_maker = make_entry.gen_from_git_commits(opts) - pickers.new(opts, { - prompt_title = "~ LunarVim Changelog ~", + pickers + .new(opts, { + prompt_title = "~ LunarVim Changelog ~", - finder = finders.new_oneshot_job( - vim.tbl_flatten { - "git", - "log", - "--pretty=oneline", - "--abbrev-commit", + finder = finders.new_oneshot_job( + vim.tbl_flatten { + "git", + "log", + "--pretty=oneline", + "--abbrev-commit", + }, + opts + ), + previewer = { + previewers.git_commit_diff_as_was.new(opts), }, - opts - ), - previewer = { - previewers.git_commit_diff_as_was.new(opts), - }, - --TODO: consider opening a diff view when pressing enter - attach_mappings = function(_, map) - map("i", "", copy_to_clipboard_action) - map("n", "", copy_to_clipboard_action) - map("i", "", actions._close) - map("n", "", actions._close) - map("n", "q", actions._close) - return true - end, - sorter = sorters.generic_sorter, - }):find() + --TODO: consider opening a diff view when pressing enter + attach_mappings = function(_, map) + map("i", "", copy_to_clipboard_action) + map("n", "", copy_to_clipboard_action) + map("i", "", actions._close) + map("n", "", actions._close) + map("n", "q", actions._close) + return true + end, + sorter = sorters.generic_sorter, + }) + :find() end -- Smartly opens either git_files or find_files, depending on whether the working directory is diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index dd40b967..fec91bc9 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -12,6 +12,7 @@ local core_plugins = { }, { "lunarvim/onedarker.nvim", + branch = "freeze", config = function() pcall(function() if lvim and lvim.colorscheme == "onedarker" then @@ -37,6 +38,7 @@ local core_plugins = { -- Telescope { "nvim-telescope/telescope.nvim", + branch = "0.1.x", config = function() require("lvim.core.telescope").setup() end, diff --git a/lua/lvim/utils/git.lua b/lua/lvim/utils/git.lua index 62915458..99c178f3 100644 --- a/lua/lvim/utils/git.lua +++ b/lua/lvim/utils/git.lua @@ -13,16 +13,14 @@ local function git_cmd(opts) opts.cwd = opts.cwd or get_lvim_base_dir() local stderr = {} - local stdout, ret = Job - :new({ - command = "git", - args = opts.args, - cwd = opts.cwd, - on_stderr = function(_, data) - table.insert(stderr, data) - end, - }) - :sync() + local stdout, ret = Job:new({ + command = "git", + args = opts.args, + cwd = opts.cwd, + on_stderr = function(_, data) + table.insert(stderr, data) + end, + }):sync() if not vim.tbl_isempty(stderr) then Log:debug(stderr) -- cgit v1.2.3