feat: update LSP icons (signcolumn + statusline)
also add a globals.lua file
This commit is contained in:
parent
c7068ff557
commit
4959c90448
@ -3,6 +3,7 @@
|
|||||||
-- License : GPLv3
|
-- License : GPLv3
|
||||||
-- Description : neovim configuration file
|
-- Description : neovim configuration file
|
||||||
|
|
||||||
|
require("globals") -- ./lua/globals.lua
|
||||||
require("settings") -- ./lua/settings.lua
|
require("settings") -- ./lua/settings.lua
|
||||||
require("plugins") -- ./lua/plugins.lua
|
require("plugins") -- ./lua/plugins.lua
|
||||||
require("maps") -- ./lua/maps.lua
|
require("maps") -- ./lua/maps.lua
|
||||||
|
6
.config/nvim/lua/globals.lua
Normal file
6
.config/nvim/lua/globals.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
globals = {
|
||||||
|
sign_error = "",
|
||||||
|
sign_warning = "",
|
||||||
|
sign_hint = "",
|
||||||
|
sign_info = "",
|
||||||
|
}
|
@ -5,17 +5,32 @@
|
|||||||
|
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"LspDiagnosticsSignError",
|
"LspDiagnosticsSignError",
|
||||||
{texthl = "LspDiagnosticsSignError", text = "", numhl = "LspDiagnosticsSignError"}
|
{
|
||||||
|
texthl = "LspDiagnosticsSignError",
|
||||||
|
text = globals.sign_error,
|
||||||
|
numhl = "LspDiagnosticsSignError"
|
||||||
|
}
|
||||||
)
|
)
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"LspDiagnosticsSignWarning",
|
"LspDiagnosticsSignWarning",
|
||||||
{texthl = "LspDiagnosticsSignWarning", text = "", numhl = "LspDiagnosticsSignWarning"}
|
{
|
||||||
|
texthl = "LspDiagnosticsSignWarning",
|
||||||
|
text = globals.sign_warning,
|
||||||
|
numhl = "LspDiagnosticsSignWarning"}
|
||||||
)
|
)
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"LspDiagnosticsSignHint",
|
"LspDiagnosticsSignHint",
|
||||||
{texthl = "LspDiagnosticsSignHint", text = "", numhl = "LspDiagnosticsSignHint"}
|
{
|
||||||
|
texthl = "LspDiagnosticsSignHint",
|
||||||
|
text = globals.sign_hint,
|
||||||
|
numhl = "LspDiagnosticsSignHint"
|
||||||
|
}
|
||||||
)
|
)
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"LspDiagnosticsSignInformation",
|
"LspDiagnosticsSignInformation",
|
||||||
{texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}
|
{
|
||||||
|
texthl = "LspDiagnosticsSignInformation",
|
||||||
|
text = globals.sign_info,
|
||||||
|
numhl = "LspDiagnosticsSignInformation"
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
@ -155,9 +155,21 @@ local function statusline_focused()
|
|||||||
gen_section(
|
gen_section(
|
||||||
"%#Alert#",
|
"%#Alert#",
|
||||||
{
|
{
|
||||||
process_diagnostics("E:", diagnostics.errors, "%#LspDiagnosticsDefaultError#"),
|
process_diagnostics(
|
||||||
process_diagnostics("W:", diagnostics.warnings, "%#LspDiagnosticsDefaultWarning#"),
|
globals.sign_error .. " ",
|
||||||
process_diagnostics("I:", diagnostics.info, "%#LspDiagnosticsDefaultInformation#")
|
diagnostics.errors,
|
||||||
|
"%#LspDiagnosticsDefaultError#"
|
||||||
|
),
|
||||||
|
process_diagnostics(
|
||||||
|
globals.sign_warning .. " ",
|
||||||
|
diagnostics.warnings,
|
||||||
|
"%#LspDiagnosticsDefaultWarning#"
|
||||||
|
),
|
||||||
|
process_diagnostics(
|
||||||
|
globals.sign_info .. " ",
|
||||||
|
diagnostics.info,
|
||||||
|
"%#LspDiagnosticsDefaultInformation#"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user