local MiniBufremove = require('mini.bufremove') local MiniFiles = require('mini.files') local MiniIndentscope = require('mini.indentscope') local MiniNotify = require('mini.notify') local MiniStatusline = require('mini.statusline') local function section_git(args) if MiniStatusline.is_truncated(args.trunc_width) then return '' end return vim.fn.FugitiveHead() end MiniStatusline.setup({ content = { -- copy-pasted from default, we just want to remove the icon active = function() local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 }) local git = section_git({ trunc_width = 75 }) local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75, icon = '' }) local filename = MiniStatusline.section_filename({ trunc_width = 140 }) local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 }) local location = MiniStatusline.section_location({ trunc_width = 75 }) return MiniStatusline.combine_groups({ { hl = mode_hl, strings = { mode } }, { hl = 'MiniStatuslineDevinfo', strings = { git, diagnostics } }, '%<', -- Mark general truncate point { hl = 'MiniStatuslineFilename', strings = { filename } }, '%=', -- End left alignment { hl = 'MiniStatuslineFileinfo', strings = { fileinfo } }, { hl = mode_hl, strings = { location } }, }) end }, }) -- notifications MiniNotify.setup() vim.notify = MiniNotify.make_notify() vim.keymap.set('n', 'n', MiniNotify.show_history) -- file explorer MiniFiles.setup({ content = { -- remove icons prefix = function() end, } }) vim.keymap.set('n', 'ft', function() MiniFiles.open(MiniFiles.get_latest_path()) end) vim.keymap.set('n', 'fc', function() MiniFiles.open(vim.api.nvim_buf_get_name(0)) end) -- delete buffer while preserving layout MiniBufremove.setup() vim.keymap.set('n', 'q', MiniBufremove.delete) vim.keymap.set('n', 'Q', function() MiniBufremove.delete(0, true) end) -- shows a line indicating the current indentation scope MiniIndentscope.setup() -- cursor display vim.keymap.set('n', 'c', 'set cursorline! cursorcolumn!')