1
0

feat: add lightline.vim

This commit is contained in:
Rokas Puzonas 2021-11-01 16:46:57 +02:00
parent bb43b0a76d
commit 8a2f851ff8
3 changed files with 27 additions and 1 deletions

23
lua/config/lightline.lua Normal file
View 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'
}
}

View File

@ -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)

View File

@ -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