swtich from airline to lualine

This commit is contained in:
JesseBot 2023-03-05 16:29:23 +01:00
parent a7d2d02b30
commit b47e3a8c76
No known key found for this signature in database
GPG key ID: C01D207CE04D55D9
5 changed files with 135 additions and 77 deletions

View file

@ -56,8 +56,8 @@ require('user.folding')
-- syntax highlgihting for hex codes
require('user.nvim-colorizer')
-- status line for vim; may change to galazyline or lualine; need to latest airline features
require('user.airline')
-- status line at bottom of window for cool file facts
require('user.lualine')
-- directory tree for neovim; can option with :NvimTreeToggle
require('user.nvim-tree')

View file

@ -20,20 +20,20 @@ return require('packer').startup(function(use)
-- -------------------- startup screen for neovim ------------------------
use {'glepnir/dashboard-nvim'}
-- quick session manager (requires :PackerCompile)
use({'glepnir/dbsession.nvim',
event = 'BufRead',
config = function() require('dbsession').setup({}) end
})
-- quick session manager (requires :PackerCompile) I don't use this a lot
--use({'glepnir/dbsession.nvim',
-- event = 'BufRead',
-- config = function() require('dbsession').setup({}) end
--})
-- cute halloween dashboard for neovim start screen :3
-- use {'folke/drop.nvim'}
-- -------------------------- status line --------------------------------
-- may replace soon, because it is very crowded
use {'vim-airline/vim-airline'}
use {'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
-- -------------------- floating window plugins --------------------------
-- terminal window
@ -43,17 +43,15 @@ return require('packer').startup(function(use)
use {'hsalem7/nvim-k8s',
commit = 'f216b1736e6fb41fdbca1af684d89551151b7e31'}
-- this is more stuff for floating windows
-- NeoVim UI toolkit that supports floating windows
use {'MunifTanjim/nui.nvim'}
-- ------------------------- file directory tree -------------------------
-- nvim new nerdtree replacement
use {
'nvim-tree/nvim-tree.lua',
requires = {'nvim-tree/nvim-web-devicons'},
tag = 'nightly'
}
use {'nvim-tree/nvim-tree.lua',
requires = {'nvim-tree/nvim-web-devicons'},
tag = 'nightly'
}
-- ---------------- scroll bar for the right hand side -------------------
use {"petertriho/nvim-scrollbar"}
@ -63,7 +61,6 @@ return require('packer').startup(function(use)
use {'tpope/vim-fugitive'}
-- puts a git + or - in side line to show git changes in file
-- use {'airblade/vim-gitgutter'}
use {'lewis6991/gitsigns.nvim'}
-- ---------------- syntax highlighting installer ------------------------
@ -83,7 +80,7 @@ return require('packer').startup(function(use)
use({"yioneko/nvim-yati",
tag = "*",
requires = "nvim-treesitter/nvim-treesitter"
})
})
-- This is helpful for markdown -- 'junegunn/limelight.config/vim'
use {'junegunn/limelight.vim'}

View file

@ -1,28 +0,0 @@
-- Airline:
-- A pure vim script status line for vim
-- ------------------------------------------------------------------------
-- use custome space_chalk theme :)
vim.g.airline_theme = 'spacechalk'
-- use powerline fonts
vim.g.airline_powerline_fonts = 1
-- don't show the section if it's not in use e.g. error section
vim.g.airline_skip_empty_sections = 1
-- put ALE errors in our status line
vim.cmd [[let g:airline#extensions#ale#enabled = 1]]
-- changing separators to match personal powerline for shell
vim.g.airline_left_sep = ''
vim.g.airline_right_sep = ''
-- this is a smaller more consise final airline segment
vim.cmd [[
function! LinePercent()
return line('.') * 100 / line('$') . '%'
endfunction
]]
vim.g.airline_section_z = ' %l (%{LinePercent()})  %v'

View file

@ -1,30 +1,14 @@
-- ------------------- from airline ---------------------------
-- changing separators to match personal powerline for shell
-- vim.g.airline_left_sep = ''
-- vim.g.airline_right_sep = ''
-- vim.g.airline_section_z = ' %l (%{LinePercent()})  %v'
local gl = require('galaxyline')
local gls = gl.section
gl.short_line_list = {'LuaTree','vista','dbui'}
-- #E8FBFF bright white
-- #bdd8ff off blueish white
-- #ffaff9 light pink
-- #f289f9 neon magenta
-- #f2748a pale dark red
-- #ff8d87 soft redish orange
-- #fdcd36 light orange
-- #f7fb53 bright yellow
-- #f6f76a soft yellow
-- #C1FF87 soft green
-- #a8fd57 lime green
-- #5ac4b9 dark teal? (this color feels weird, maybe change it)
-- #6DF2E5 cyan
-- #5cc9fd blue
-- #5f87ff cornflower blue
-- #a3a8f8 medium cornflowerblue
-- #232336 blueish black
-- #1d2652 navy blue
-- #2569aa darker blue
-- #585858 gray
-- #3E3E3E darker gray
-- #323232 grayish black
local colors = {
bg = '#232336',
yellow = '#f7fb53',
@ -63,15 +47,16 @@ end
-- "r?": "CNFIRM",
-- "!": "!SHELL",
-- "t": "TERM "
-- these are the colors for the first mode segment
local mode_colors = {n = colors.cornflowerblue,
i = colors.green,
c = colors.blue,
v = colors.magenta,
V = colors.pink,
R = colors.orange,
['!'] = colors.orange,
[''] = colors.magenta}
i = colors.green,
c = colors.blue,
v = colors.magenta,
V = colors.pink,
R = colors.orange,
['!'] = colors.orange,
[''] = colors.magenta}
gls.left[1] = {
ViMode = {

View file

@ -0,0 +1,104 @@
-- Bubbles config for lualine
-- original author: lokesh-krishna
-- MIT license
--- Background for branch and file format blocks
--- s:gui_termbg = '#585858'
--- Foreground for branch and file format blocks
--- s:gui_termfg = '#c2ff87'
--- Background for middle block
--- s:gui_termbg2 = '#3E3E3E'
--- Foreground for middle block
--- s:gui_termfg2 = '#5f87ff'
--- Background for normal mode and file position blocks
--- s:gui_normalbg = '#5F87FF'
--- Foreground for normal mode and file position blocks
--- s:gui_normalfg = '#323232'
--- Background for insert mode and file position blocks
--- s:gui_insertbg = '#a8fd57'
--- Foreground for insert mode and file position blocks
--- s:gui_insertfg = '#1d2652'
--- Background for visual mode and file position blocks
--- s:gui_visualbg = '#2569aa'
--- Foreground for visual mode and file position blocks
--- s:gui_visualfg = '#a8fd57'
--- Background for replace mode and file position blocks
--- s:gui_replacebg = '#f289f9'
--- Foreground for replace mode and file position blocks
--- s:gui_replacefg = '#323232'
--- Modified file alert color
--- s:gui_alert = '#fdcd36'
--- Background for inactive mode
--- s:gui_inactivebg = '#232336'
--- Foreground for inactive mode
--- s:gui_inactivefg = '#585858'
--- this is for all warnings and errors in the final section
--- s:WARNING = [ "#323232", "#f6f76a", 237, 226 ]
--- s:ERROR = [ "#323232", "#f289f9", 15, 167 ]
-- stylua: ignore
local colors = {
blue = '#5F87FF',
cyan = '#79dac8',
black = '#232336',
white = '#c6c6c6',
red = '#ff5189',
violet = '#d183e8',
grey = '#303030',
}
local bubbles_theme = {
normal = {
a = { fg = colors.black, bg = colors.blue },
b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.black, bg = colors.black },
},
insert = { a = { fg = colors.black, bg = colors.blue } },
visual = { a = { fg = colors.black, bg = colors.cyan } },
replace = { a = { fg = colors.black, bg = colors.red } },
inactive = {
a = { fg = colors.white, bg = colors.black },
b = { fg = colors.white, bg = colors.black },
c = { fg = colors.black, bg = colors.black },
},
}
require('lualine').setup {
options = {
theme = bubbles_theme,
component_separators = '|',
section_separators = { left = '', right = '' },
},
sections = {
lualine_a = {
{ 'mode', separator = { left = '' }, right_padding = 2 },
},
lualine_b = { 'filename', 'branch' },
lualine_c = { 'fileformat' },
lualine_x = {},
lualine_y = { 'filetype', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { 'filename' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { 'location' },
},
tabline = {},
extensions = {},
}