feat: add lightline.vim
This commit is contained in:
parent
bb43b0a76d
commit
8a2f851ff8
23
lua/config/lightline.lua
Normal file
23
lua/config/lightline.lua
Normal file
@ -0,0 +1,23 @@
|
||||
local opt = require 'utils.opt'
|
||||
|
||||
opt('showmode', false)
|
||||
|
||||
vim.cmd [[
|
||||
function! LightlineFilename()
|
||||
let filename = expand('%:t') !=# '' ? expand('%:t') : '[No Name]'
|
||||
let modified = &modified ? ' +' : ''
|
||||
return filename . modified
|
||||
endfunction
|
||||
]]
|
||||
|
||||
vim.g.lightline = {
|
||||
colorscheme = vim.g.colors_name,
|
||||
active = {
|
||||
left = { { 'mode', 'paste' }, { 'gitbranch', 'readonly', 'filename' } }
|
||||
},
|
||||
component_function = {
|
||||
gitbranch = 'FugitiveHead',
|
||||
filename = 'LightlineFilename'
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ opt('cursorline', true, window)
|
||||
opt('shada', [['20,<50,s10,h,/100]])
|
||||
|
||||
-- Show current mode that you are in
|
||||
opt('showmode', false)
|
||||
opt('showmode', true)
|
||||
|
||||
-- Keep non-visible files open
|
||||
opt('hidden', true)
|
||||
|
@ -137,6 +137,9 @@ local function usePlugins(use, use_rocks)
|
||||
|
||||
-- Start screen
|
||||
use { 'glepnir/dashboard-nvim', config = [[require 'config.dashboard']] }
|
||||
|
||||
-- Status line
|
||||
use { 'itchyny/lightline.vim', config = [[require 'config.lightline']]}
|
||||
end
|
||||
|
||||
-- Register custom commands for plugin manager
|
||||
|
Loading…
Reference in New Issue
Block a user