init
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
-- lua/conf_statusline.lua
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
theme = 'auto', -- Automatically matches your colorscheme
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
globalstatus = true, -- Single statusline at the bottom for all windows
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {
|
||||
{
|
||||
-- Custom function to show which LSP is active
|
||||
function()
|
||||
local msg = 'No Active LSP'
|
||||
local buf_ft = vim.api.nvim_get_option_value('filetype', { buf = 0 })
|
||||
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
||||
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 = ' ',
|
||||
color = { fg = '#ffffff', gui = 'bold' },
|
||||
},
|
||||
'encoding',
|
||||
'fileformat',
|
||||
'filetype'
|
||||
},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user