diff --git a/init.lua b/init.lua index 9ac9b78d..92236cb0 100644 --- a/init.lua +++ b/init.lua @@ -171,39 +171,7 @@ require('lazy').setup({ 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 'lukas-reineke/indent-blankline.nvim', @@ -279,6 +247,7 @@ vim.wo.listchars = "tab:»·,trail:·,extends:>,precedes:<,nbsp:." vim.wo.colorcolumn = '120' vim.wo.wrap = false vim.opt.cmdheight = 2 +vim.opt.showmode = true vim.opt.ignorecase = true vim.opt.showtabline = 2 diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua new file mode 100644 index 00000000..2192b0e0 --- /dev/null +++ b/lua/custom/plugins/lualine.lua @@ -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 + } + + }, + }, + + }, + } +