- new neovim config
This commit is contained in:
39
lua/plugins/mini.lua
Normal file
39
lua/plugins/mini.lua
Normal file
@ -0,0 +1,39 @@
|
||||
return {
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
require("mini.statusline").setup({
|
||||
use_icons = true,
|
||||
content = {
|
||||
active = function()
|
||||
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
||||
local git = MiniStatusline.section_git({ trunc_width = 75 })
|
||||
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
|
||||
local filename = MiniStatusline.section_filename({ trunc_width = 40 })
|
||||
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|
||||
local location = MiniStatusline.section_location({ trunc_width = 75 })
|
||||
local search = MiniStatusline.section_searchcount({ trunc_width = 75 })
|
||||
local lsp = MiniStatusline.section_lsp({ trunc_width = 75 })
|
||||
local recording = vim.fn.reg_recording()
|
||||
if recording:len() > 0 then
|
||||
recording = "Rec: " .. recording
|
||||
end
|
||||
|
||||
return MiniStatusline.combine_groups({
|
||||
{ hl = mode_hl, strings = { mode } },
|
||||
{ hl = mode_hl, strings = { recording } },
|
||||
{ hl = 'MiniStatuslineDevinfo', strings = { git, diagnostics } },
|
||||
'%<', -- Mark general truncate point
|
||||
{ hl = 'MiniStatuslineFilename', strings = { filename } },
|
||||
'%=', -- End left alignment
|
||||
{ hl = 'MiniStatuslineDevinfo', strings = { lsp } },
|
||||
{ hl = 'MiniStatuslineFileinfo', strings = { fileinfo } },
|
||||
{ hl = mode_hl, strings = { search, location } },
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
require("mini.tabline").setup()
|
||||
require("mini.pairs").setup()
|
||||
require("mini.colors").setup()
|
||||
end
|
||||
}
|
Reference in New Issue
Block a user