@@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" },
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "d24378edc14a675c820a303b4512af3bbc5761e9" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "b573866ef64122119668f375ebb794bcb3b518e2" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
|
||||||
"copilot.vim": { "branch": "release", "commit": "172955782814a49fbebca2d1a2ccce2059103329" },
|
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "c17d3210b3dec8798b4fc82a11c542989251f85d" },
|
|
||||||
"diffview.nvim": { "branch": "main", "commit": "7e5a85c186027cab1e825d018f07c350177077fc" },
|
|
||||||
"doom-one.nvim": { "branch": "main", "commit": "a43528cbd7908ccec7af4587ec8e18be149095bd" },
|
|
||||||
"dracula.nvim": { "branch": "main", "commit": "9fe831e685a76e1a1898a694623b33247c4d036c" },
|
|
||||||
"fine-cmdline.nvim": { "branch": "main", "commit": "ead2b85e455eacde10469a8fcf1a717822d2bb9a" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "377d45475b49e37460a902d6d569d2093d4037d0" },
|
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "41e22dc843c6821a410db57be0b7025154f9d8ec" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "749267aaa863c30d721c9913699c5d94e0c07dd3" },
|
|
||||||
"keyseer.nvim": { "branch": "main", "commit": "ebcd7f7494c8b5debb4bf8103710865d37508509" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2997f467881ac4faa6f8c5e7065e3a672297c8ad" },
|
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "a51c2d063c5377ee9e58c5f9cda7c7436787be72" },
|
|
||||||
"mellow.nvim": { "branch": "main", "commit": "6e5845571d4543b282cf915f2410c5b77064c014" },
|
|
||||||
"moonlight.nvim": { "branch": "pure-lua", "commit": "e24e4218ec680b6396532808abf57ca0ada82e66" },
|
|
||||||
"neogit": { "branch": "master", "commit": "a5fb1b47975c43c1400e338f57badd94a6e09450" },
|
|
||||||
"neorg": { "branch": "main", "commit": "f296a22864bbac0d94ad00fa18cc8231dbeaa1e3" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
|
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" },
|
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "27c59475ae610cc8ccbb81d9d7859e5ffbd4ec8a" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
|
|
||||||
"nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" },
|
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "920868dba13466586897a8f40220eca6b2caac41" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "2ee71c1a2fa74c10692be10ae420ff0c3a02eb3c" },
|
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" },
|
|
||||||
"nvimcord": { "branch": "master", "commit": "3a087d3e568136f168047c242fd6d568e5e6ad96" },
|
|
||||||
"oceanic-next.nvim": { "branch": "main", "commit": "374cb9cd0c72f65f9c1ace5273d16c16fdff3e5c" },
|
|
||||||
"onedarkpro.nvim": { "branch": "main", "commit": "c81dff789f7623c431d1f43cf334237e52bbfd61" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
|
|
||||||
"presence.nvim": { "branch": "main", "commit": "aafdf49ea6c198a960a71b9f989d849543c91eb5" },
|
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
|
||||||
"telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" },
|
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
|
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" },
|
|
||||||
"transparent.nvim": { "branch": "main", "commit": "4cf97fc0b1c4a88cf246b2f6facb735a536a558e" },
|
|
||||||
"trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
|
|
||||||
}
|
|
||||||
@@ -3,43 +3,217 @@ if not setup then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
lualine.setup {
|
local colors = {
|
||||||
options = {
|
bg = '#202328',
|
||||||
icons_enabled = true,
|
fg = '#bbc2cf',
|
||||||
theme = 'auto',
|
yellow = '#ECBE7B',
|
||||||
component_separators = { left = '', right = ''},
|
cyan = '#008080',
|
||||||
section_separators = { left = '', right = ''},
|
darkblue = '#081633',
|
||||||
disabled_filetypes = {
|
green = '#98be65',
|
||||||
statusline = {},
|
orange = '#FF8800',
|
||||||
winbar = {},
|
violet = '#a9a1e1',
|
||||||
},
|
magenta = '#c678dd',
|
||||||
ignore_focus = {},
|
blue = '#51afef',
|
||||||
always_divide_middle = true,
|
red = '#ec5f67',
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local conditions = {
|
||||||
|
buffer_not_empty = function()
|
||||||
|
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
|
||||||
|
end,
|
||||||
|
hide_in_width = function()
|
||||||
|
return vim.fn.winwidth(0) > 80
|
||||||
|
end,
|
||||||
|
check_git_workspace = function()
|
||||||
|
local filepath = vim.fn.expand('%:p:h')
|
||||||
|
local gitdir = vim.fn.finddir('.git', filepath .. ';')
|
||||||
|
return gitdir and #gitdir > 0 and #gitdir < #filepath
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Config
|
||||||
|
local config = {
|
||||||
|
options = {
|
||||||
|
-- Disable sections and component separators
|
||||||
|
component_separators = '',
|
||||||
|
section_separators = '',
|
||||||
|
theme = {
|
||||||
|
-- We are going to use lualine_c an lualine_x as left and
|
||||||
|
-- right section. Both are highlighted by c theme . So we
|
||||||
|
-- are just setting default looks o statusline
|
||||||
|
normal = { c = { fg = colors.fg, bg = colors.bg } },
|
||||||
|
inactive = { c = { fg = colors.fg, bg = colors.bg } },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
-- these are to remove the defaults
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
||||||
lualine_y = {'progress'},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'location'},
|
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {}
|
lualine_z = {},
|
||||||
|
-- These will be filled later
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
-- these are to remove the defaults
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
},
|
},
|
||||||
tabline = {},
|
|
||||||
winbar = {},
|
|
||||||
inactive_winbar = {},
|
|
||||||
extensions = {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Inserts a component in lualine_c at left section
|
||||||
|
local function ins_left(component)
|
||||||
|
table.insert(config.sections.lualine_c, component)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Inserts a component in lualine_x at right section
|
||||||
|
local function ins_right(component)
|
||||||
|
table.insert(config.sections.lualine_x, component)
|
||||||
|
end
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
function()
|
||||||
|
return '▊'
|
||||||
|
end,
|
||||||
|
color = { fg = colors.blue }, -- Sets highlighting of component
|
||||||
|
padding = { left = 0, right = 1 }, -- We don't need space before this
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
-- mode component
|
||||||
|
function()
|
||||||
|
return ''
|
||||||
|
end,
|
||||||
|
color = function()
|
||||||
|
-- auto change color according to neovims mode
|
||||||
|
local mode_color = {
|
||||||
|
n = colors.red,
|
||||||
|
i = colors.green,
|
||||||
|
v = colors.blue,
|
||||||
|
[''] = colors.blue,
|
||||||
|
V = colors.blue,
|
||||||
|
c = colors.magenta,
|
||||||
|
no = colors.red,
|
||||||
|
s = colors.orange,
|
||||||
|
S = colors.orange,
|
||||||
|
[''] = colors.orange,
|
||||||
|
ic = colors.yellow,
|
||||||
|
R = colors.violet,
|
||||||
|
Rv = colors.violet,
|
||||||
|
cv = colors.red,
|
||||||
|
ce = colors.red,
|
||||||
|
r = colors.cyan,
|
||||||
|
rm = colors.cyan,
|
||||||
|
['r?'] = colors.cyan,
|
||||||
|
['!'] = colors.red,
|
||||||
|
t = colors.red,
|
||||||
|
}
|
||||||
|
return { fg = mode_color[vim.fn.mode()] }
|
||||||
|
end,
|
||||||
|
padding = { right = 1 },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
-- filesize component
|
||||||
|
'filesize',
|
||||||
|
cond = conditions.buffer_not_empty,
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
'filename',
|
||||||
|
cond = conditions.buffer_not_empty,
|
||||||
|
color = { fg = colors.magenta, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left { 'location' }
|
||||||
|
|
||||||
|
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
'diagnostics',
|
||||||
|
sources = { 'nvim_diagnostic' },
|
||||||
|
symbols = { error = ' ', warn = ' ', info = ' ' },
|
||||||
|
diagnostics_color = {
|
||||||
|
color_error = { fg = colors.red },
|
||||||
|
color_warn = { fg = colors.yellow },
|
||||||
|
color_info = { fg = colors.cyan },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Insert mid section. You can make any number of sections in neovim :)
|
||||||
|
-- for lualine it's any number greater then 2
|
||||||
|
ins_left {
|
||||||
|
function()
|
||||||
|
return '%='
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
-- Lsp server name .
|
||||||
|
function()
|
||||||
|
local msg = 'No Active Lsp'
|
||||||
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||||
|
local clients = vim.lsp.get_active_clients()
|
||||||
|
if next(clients) == nil then
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
local filetypes = client.config.filetypes
|
||||||
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||||
|
return client.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return msg
|
||||||
|
end,
|
||||||
|
icon = ' LSP:',
|
||||||
|
color = { fg = '#ffffff', gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add components to right sections
|
||||||
|
ins_right {
|
||||||
|
'o:encoding', -- option component same as &encoding in viml
|
||||||
|
fmt = string.upper, -- I'm not sure why it's upper case either ;)
|
||||||
|
cond = conditions.hide_in_width,
|
||||||
|
color = { fg = colors.green, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
'fileformat',
|
||||||
|
fmt = string.upper,
|
||||||
|
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
|
||||||
|
color = { fg = colors.green, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
'branch',
|
||||||
|
icon = '',
|
||||||
|
color = { fg = colors.violet, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
'diff',
|
||||||
|
-- Is it me or the symbol for modified us really weird
|
||||||
|
symbols = { added = ' ', modified = ' ', removed = ' ' },
|
||||||
|
diff_color = {
|
||||||
|
added = { fg = colors.green },
|
||||||
|
modified = { fg = colors.orange },
|
||||||
|
removed = { fg = colors.red },
|
||||||
|
},
|
||||||
|
cond = conditions.hide_in_width,
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
function()
|
||||||
|
return '▊'
|
||||||
|
end,
|
||||||
|
color = { fg = colors.blue },
|
||||||
|
padding = { left = 1 },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Now don't forget to initialize lualine
|
||||||
|
lualine.setup(config)
|
||||||
|
|||||||
Reference in New Issue
Block a user