mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 11:24:55 +02:00
nvim: moved stuff around.
This commit is contained in:
parent
300d300664
commit
0d7a5fab7b
22 changed files with 975 additions and 990 deletions
|
|
@ -1,5 +1,9 @@
|
|||
local icons = require("user.icons")
|
||||
|
||||
--
|
||||
-- Helper functions
|
||||
--
|
||||
|
||||
local function indent_settings()
|
||||
return (vim.bo.expandtab and "SPC" or "TAB")
|
||||
.. ":"
|
||||
|
|
@ -26,6 +30,141 @@ local function linter()
|
|||
return "no linter"
|
||||
end
|
||||
|
||||
--
|
||||
-- Options
|
||||
--
|
||||
|
||||
local options = {
|
||||
options = {
|
||||
globalstatus = true,
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
disabled_filetypes = {
|
||||
statusline = {
|
||||
"dashboard",
|
||||
"alpha",
|
||||
},
|
||||
winbar = {
|
||||
"neo-tree",
|
||||
"NvimTree",
|
||||
"alpha"
|
||||
}
|
||||
},
|
||||
theme = {
|
||||
normal = {
|
||||
a = "StatusLineNormal",
|
||||
b = "StatusLineLualine",
|
||||
c = "StatusLineLualine",
|
||||
x = "StatusLineLualine",
|
||||
y = "StatusLineLualine",
|
||||
z = "StatusLineLualine",
|
||||
},
|
||||
command = {
|
||||
a = "StatusLineCommand",
|
||||
},
|
||||
insert = {
|
||||
a = "StatusLineInsert",
|
||||
},
|
||||
visual = {
|
||||
a = "StatusLineVisual",
|
||||
},
|
||||
replace = {
|
||||
a = "StatusLineReplace",
|
||||
},
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
"mode",
|
||||
},
|
||||
lualine_b = {
|
||||
{"branch"},
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = icons.diagnostics.error .. " ",
|
||||
warn = icons.diagnostics.warn .. " ",
|
||||
info = icons.diagnostics.info .. " ",
|
||||
hint = icons.diagnostics.hint .. " ",
|
||||
},
|
||||
},
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = icons.diff.added .. " ",
|
||||
modified = icons.diff.modified .. " ",
|
||||
removed = icons.diff.removed .. " ",
|
||||
},
|
||||
},
|
||||
{
|
||||
"lsp-status",
|
||||
disabled_filetypes = {
|
||||
"TelescopePrompt",
|
||||
},
|
||||
on_click = function (_, btn, _)
|
||||
if btn == "l" then
|
||||
vim.cmd(":LspInfo")
|
||||
elseif btn == "r" then
|
||||
vim.cmd(":LspRestart")
|
||||
end
|
||||
end
|
||||
},
|
||||
linter,
|
||||
},
|
||||
lualine_c = {},
|
||||
lualine_x = {
|
||||
{
|
||||
"filetype",
|
||||
cond = is_not_popup
|
||||
},
|
||||
{
|
||||
"fileformat",
|
||||
symbols = {
|
||||
unix = "NL",
|
||||
dos = "NLCR",
|
||||
mac = 'NL'
|
||||
}
|
||||
},
|
||||
indent_settings,
|
||||
},
|
||||
lualine_y = {
|
||||
"location",
|
||||
"progress",
|
||||
},
|
||||
lualine_z = {},
|
||||
},
|
||||
winbar = {
|
||||
lualine_c = {
|
||||
{ "filetype", icon_only = true },
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_winbar = {
|
||||
lualine_c = {
|
||||
{ "filetype", icon_only = true },
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
"lazy",
|
||||
"neo-tree",
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
|
|
@ -33,136 +172,7 @@ return {
|
|||
"nvim-tree/nvim-web-devicons",
|
||||
"pnx/lualine-lsp-status",
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
globalstatus = true,
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
disabled_filetypes = {
|
||||
statusline = {
|
||||
"dashboard",
|
||||
"alpha",
|
||||
},
|
||||
winbar = {
|
||||
"neo-tree",
|
||||
"NvimTree",
|
||||
"alpha"
|
||||
}
|
||||
},
|
||||
theme = {
|
||||
normal = {
|
||||
a = "StatusLineNormal",
|
||||
b = "StatusLineLualine",
|
||||
c = "StatusLineLualine",
|
||||
x = "StatusLineLualine",
|
||||
y = "StatusLineLualine",
|
||||
z = "StatusLineLualine",
|
||||
},
|
||||
command = {
|
||||
a = "StatusLineCommand",
|
||||
},
|
||||
insert = {
|
||||
a = "StatusLineInsert",
|
||||
},
|
||||
visual = {
|
||||
a = "StatusLineVisual",
|
||||
},
|
||||
replace = {
|
||||
a = "StatusLineReplace",
|
||||
},
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
"mode",
|
||||
},
|
||||
lualine_b = {
|
||||
{"branch"},
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = icons.diagnostics.error .. " ",
|
||||
warn = icons.diagnostics.warn .. " ",
|
||||
info = icons.diagnostics.info .. " ",
|
||||
hint = icons.diagnostics.hint .. " ",
|
||||
},
|
||||
},
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = icons.diff.added .. " ",
|
||||
modified = icons.diff.modified .. " ",
|
||||
removed = icons.diff.removed .. " ",
|
||||
},
|
||||
},
|
||||
{
|
||||
"lsp-status",
|
||||
disabled_filetypes = {
|
||||
"TelescopePrompt",
|
||||
},
|
||||
on_click = function (_, btn, _)
|
||||
if btn == "l" then
|
||||
vim.cmd(":LspInfo")
|
||||
elseif btn == "r" then
|
||||
vim.cmd(":LspRestart")
|
||||
end
|
||||
end
|
||||
},
|
||||
linter,
|
||||
},
|
||||
lualine_c = {},
|
||||
lualine_x = {
|
||||
{
|
||||
"filetype",
|
||||
cond = is_not_popup
|
||||
},
|
||||
{
|
||||
"fileformat",
|
||||
symbols = {
|
||||
unix = "NL",
|
||||
dos = "NLCR",
|
||||
mac = 'NL'
|
||||
}
|
||||
},
|
||||
indent_settings,
|
||||
},
|
||||
lualine_y = {
|
||||
"location",
|
||||
"progress",
|
||||
},
|
||||
lualine_z = {},
|
||||
},
|
||||
winbar = {
|
||||
lualine_c = {
|
||||
{ "filetype", icon_only = true },
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_winbar = {
|
||||
lualine_c = {
|
||||
{ "filetype", icon_only = true },
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
"lazy",
|
||||
"neo-tree",
|
||||
},
|
||||
},
|
||||
opts = options,
|
||||
init = function ()
|
||||
-- disable mode in the command line, as its already shown in lualine
|
||||
vim.o.showmode = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue