moved lualine into separate file
This commit is contained in:
parent
3198f2870c
commit
96c376133b
35
init.lua
35
init.lua
@ -171,39 +171,7 @@ require('lazy').setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
-- TODO: move to plugins
|
|
||||||
-- Set lualine as statusline
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
-- See `:help lualine.txt`
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
icons_enabled = false,
|
|
||||||
theme = _G.THEME_NAME,
|
|
||||||
component_separators = '|',
|
|
||||||
section_separators = '|',
|
|
||||||
},
|
|
||||||
--winbar = {} -- Not used, because `barbecue.nvim` uses it.
|
|
||||||
tabline = {
|
|
||||||
lualine_a = {'mode', 'branch'},
|
|
||||||
lualine_b = {'filename', 'diff', 'diagnostics'},
|
|
||||||
lualine_c = {'searchcount'},
|
|
||||||
lualine_x = {},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {'windows', 'tabs'},
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {},
|
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype', 'filesize'},
|
|
||||||
lualine_y = {'progress'},
|
|
||||||
lualine_z = {'location', 'windows', 'tabs'}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
-- Add indentation guides even on blank lines
|
-- Add indentation guides even on blank lines
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
@ -279,6 +247,7 @@ vim.wo.listchars = "tab:»·,trail:·,extends:>,precedes:<,nbsp:."
|
|||||||
vim.wo.colorcolumn = '120'
|
vim.wo.colorcolumn = '120'
|
||||||
vim.wo.wrap = false
|
vim.wo.wrap = false
|
||||||
vim.opt.cmdheight = 2
|
vim.opt.cmdheight = 2
|
||||||
|
vim.opt.showmode = true
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
vim.opt.showtabline = 2
|
vim.opt.showtabline = 2
|
||||||
|
|
||||||
|
76
lua/custom/plugins/lualine.lua
Normal file
76
lua/custom/plugins/lualine.lua
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
return {
|
||||||
|
-- TODO: move to plugins
|
||||||
|
-- Set lualine as statusline
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
-- See `:help lualine.txt`
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
icons_enabled = false,
|
||||||
|
theme = _G.THEME_NAME,
|
||||||
|
component_separators = '|',
|
||||||
|
section_separators = '||',
|
||||||
|
},
|
||||||
|
--winbar = {} -- Not used, because `barbecue.nvim` uses it.
|
||||||
|
tabline = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
'filename',
|
||||||
|
file_status = true, -- Displays file status (readonly status, modified status)
|
||||||
|
newfile_status = false, -- Display new file status (new file means no write after created)
|
||||||
|
path = 3, -- 0: Just the filename
|
||||||
|
-- 1: Relative path
|
||||||
|
-- 2: Absolute path
|
||||||
|
-- 3: Absolute path, with tilde as the home directory
|
||||||
|
-- 4: Filename and parent dir, with tilde as the home directory
|
||||||
|
|
||||||
|
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
||||||
|
-- for other components. (terrible name, any suggestions?)
|
||||||
|
symbols = {
|
||||||
|
modified = '[+]', -- Text to show when the file is modified.
|
||||||
|
readonly = '[r]', -- Text to show when the file is non-modifiable or readonly.
|
||||||
|
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
||||||
|
newfile = '[New]', -- Text to show for newly created file before first write
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_x = {
|
||||||
|
|
||||||
|
},
|
||||||
|
lualine_y = {
|
||||||
|
},
|
||||||
|
lualine_z = {
|
||||||
|
'windows',
|
||||||
|
{
|
||||||
|
'datetime',
|
||||||
|
-- options: default, us, uk, iso, or your own format string ("%H:%M", etc..)
|
||||||
|
style = 'default'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {'mode', 'filename'},
|
||||||
|
lualine_b = {
|
||||||
|
'location',
|
||||||
|
'searchcount',
|
||||||
|
'diagnostics',
|
||||||
|
},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {
|
||||||
|
|
||||||
|
{
|
||||||
|
'tabs',
|
||||||
|
mode = 2, -- 0: Shows tab_nr
|
||||||
|
-- 1: Shows tab_name
|
||||||
|
-- 2: Shows tab_nr + tab_name
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user