added plugins
This commit is contained in:
parent
5aeddfdd5d
commit
42a8b0ff06
19 changed files with 322 additions and 74 deletions
29
lua/custom/plugins/incline.lua
Normal file
29
lua/custom/plugins/incline.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
return {
|
||||
'b0o/incline.nvim',
|
||||
config = function()
|
||||
local helper = require 'incline.helpers'
|
||||
local devicons = require 'nvim-web-devicons'
|
||||
|
||||
require('incline').setup {
|
||||
window = {
|
||||
padding = 0,
|
||||
margin = { horizontal = 0 },
|
||||
},
|
||||
render = function(props)
|
||||
local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':p:.')
|
||||
if filename == '' then
|
||||
filename = '[No Name]'
|
||||
end
|
||||
local ft_icon, ft_color = devicons.get_icon_color(filename)
|
||||
local modified = vim.bo[props.buf].modified
|
||||
return {
|
||||
ft_icon and { ' ', ft_icon, ' ', guibg = ft_color, guifg = helper.contrast_color(ft_color) } or '',
|
||||
' ',
|
||||
{ filename, gui = modified and 'bold,italic' or 'bold' },
|
||||
' ',
|
||||
guibg = '#44406e',
|
||||
}
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue