diff options
author | lvimuser <[email protected]> | 2022-08-29 09:47:21 -0300 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-29 14:47:21 +0200 |
commit | ce621c1cfef280732819d920b9ee5b66142be85b (patch) | |
tree | 91ea0c1dc2488cc63f2ddfdecda87ead85df3a4e /lua/lvim | |
parent | df84e4ecce5a7c8838fd21d5de939128f3214ef4 (diff) |
chore: remove unnecessary code (#2923)
Diffstat (limited to 'lua/lvim')
-rw-r--r-- | lua/lvim/core/lualine/components.lua | 7 | ||||
-rw-r--r-- | lua/lvim/lsp/config.lua | 5 |
2 files changed, 3 insertions, 9 deletions
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, diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index 2cd1bc6e..96a1b823 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -64,12 +64,11 @@ return { header = "", prefix = "", format = function(d) - local t = vim.deepcopy(d) local code = d.code or (d.user_data and d.user_data.lsp.code) if code then - t.message = string.format("%s [%s]", t.message, code):gsub("1. ", "") + return string.format("%s [%s]", d.message, code):gsub("1. ", "") end - return t.message + return d.message end, }, }, |