revert(statuscolumn): remove statuscolumn diagnostic colors
This code was not functioning properly so in the interest of performance, it is to be removed until it can be fixed
This commit is contained in:
+24
-22
@@ -93,28 +93,30 @@ _G.CustomStatusColumn = function()
|
|||||||
-- Use the plugin's original status column
|
-- Use the plugin's original status column
|
||||||
local original_statuscolumn = require('snacks.statuscolumn').get()
|
local original_statuscolumn = require('snacks.statuscolumn').get()
|
||||||
|
|
||||||
-- Check for diagnostics on the current line
|
--FIXME: Diagnistics indications currently non-functional
|
||||||
local diagnostics = vim.diagnostic.get(0, { lnum = lnum - 1 }) -- Get diagnostics for the current line (subtract 1 for 0-based index)
|
--
|
||||||
local highlight_group = nil
|
-- -- Check for diagnostics on the current line
|
||||||
|
-- local diagnostics = vim.diagnostic.get(0, { lnum = lnum - 1 }) -- Get diagnostics for the current line (subtract 1 for 0-based index)
|
||||||
-- Loop through diagnostics to determine highlight group based on severity
|
-- local highlight_group = nil
|
||||||
for _, diagnostic in ipairs(diagnostics) do
|
--
|
||||||
if diagnostic.severity == vim.diagnostic.severity.ERROR then
|
-- -- Loop through diagnostics to determine highlight group based on severity
|
||||||
highlight_group = 'DiagnosticSignError'
|
-- for _, diagnostic in ipairs(diagnostics) do
|
||||||
break
|
-- if diagnostic.severity == vim.diagnostic.severity.ERROR then
|
||||||
elseif diagnostic.severity == vim.diagnostic.severity.WARN then
|
-- highlight_group = 'DiagnosticSignError'
|
||||||
highlight_group = 'DiagnosticSignWarn'
|
-- break
|
||||||
elseif diagnostic.severity == vim.diagnostic.severity.INFO then
|
-- elseif diagnostic.severity == vim.diagnostic.severity.WARN then
|
||||||
highlight_group = 'DiagnosticSignInfo'
|
-- highlight_group = 'DiagnosticSignWarn'
|
||||||
elseif diagnostic.severity == vim.diagnostic.severity.HINT then
|
-- elseif diagnostic.severity == vim.diagnostic.severity.INFO then
|
||||||
highlight_group = 'DiagnosticSignHint'
|
-- highlight_group = 'DiagnosticSignInfo'
|
||||||
end
|
-- elseif diagnostic.severity == vim.diagnostic.severity.HINT then
|
||||||
end
|
-- highlight_group = 'DiagnosticSignHint'
|
||||||
|
-- end
|
||||||
-- Highlight for lines with diagnostics
|
-- end
|
||||||
if highlight_group then
|
--
|
||||||
return '%#' .. highlight_group .. '#' .. original_statuscolumn .. '%*' -- Use the corresponding highlight for this line
|
-- -- Highlight for lines with diagnostics
|
||||||
end
|
-- if highlight_group then
|
||||||
|
-- return '%#' .. highlight_group .. '#' .. original_statuscolumn .. '%*' -- Use the corresponding highlight for this line
|
||||||
|
-- end
|
||||||
|
|
||||||
-- Highlight for the current line
|
-- Highlight for the current line
|
||||||
if lnum == cursor_lnum then
|
if lnum == cursor_lnum then
|
||||||
|
|||||||
Reference in New Issue
Block a user