Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unnecessary code #2923

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lua/lvim/core/lualine/components.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
kylo252 marked this conversation as resolved.
Show resolved Hide resolved
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,
Expand Down
5 changes: 2 additions & 3 deletions lua/lvim/lsp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ return {
header = "",
prefix = "",
format = function(d)
local t = vim.deepcopy(d)
kylo252 marked this conversation as resolved.
Show resolved Hide resolved
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,
},
},
Expand Down