From ce621c1cfef280732819d920b9ee5b66142be85b Mon Sep 17 00:00:00 2001 From: lvimuser <109605931+lvimuser@users.noreply.github.com> Date: Mon, 29 Aug 2022 09:47:21 -0300 Subject: chore: remove unnecessary code (#2923) --- lua/lvim/core/lualine/components.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lua/lvim/core') diff --git a/lua/lvim/core/lualine/components.lua b/lua/lvim/core/lualine/components.lua index 5095cfb4..c88bf82b 100644 --- a/lua/lvim/core/lualine/components.lua +++ b/lua/lvim/core/lualine/components.lua @@ -47,15 +47,10 @@ return { function() local utils = require "lvim.core.lualine.utils" if vim.bo.filetype == "python" then - local venv = os.getenv "CONDA_DEFAULT_ENV" + local venv = os.getenv "CONDA_DEFAULT_ENV" or os.getenv "VIRTUAL_ENV" if venv then return string.format("  (%s)", utils.env_cleanup(venv)) end - venv = os.getenv "VIRTUAL_ENV" - if venv then - return string.format("  (%s)", utils.env_cleanup(venv)) - end - return "" end return "" end, -- cgit v1.2.3 From 90c9bd943e83a6d2c626792d91b80f9af621343d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez=20Rivero?= Date: Thu, 1 Sep 2022 13:52:36 +0200 Subject: fix(cmp): do not mutate the original confirm_opts on CR (#2979) --- lua/lvim/core/cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lvim/core') diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua index 10cf56be..7b0b0e6e 100644 --- a/lua/lvim/core/cmp.lua +++ b/lua/lvim/core/cmp.lua @@ -265,7 +265,7 @@ M.config = function() [""] = cmp.mapping.abort(), [""] = cmp.mapping(function(fallback) if cmp.visible() then - local confirm_opts = lvim.builtin.cmp.confirm_opts + local confirm_opts = vim.deepcopy(lvim.builtin.cmp.confirm_opts) -- avoid mutating the original opts below local is_insert_mode = function() return vim.api.nvim_get_mode().mode:sub(1, 1) == "i" end -- cgit v1.2.3