Skip to content

Commit

Permalink
neovim: Split mini.nvim
Browse files Browse the repository at this point in the history
 refs #206
  • Loading branch information
m-b-t-n committed Jan 7, 2025
1 parent 9c9f33b commit 07b577f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
2 changes: 0 additions & 2 deletions neovim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ require("lazy").setup({
-- add your plugins here
{ import = "plugins" },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "vim-jp/vimdoc-ja" },
{ 'echasnovski/mini.nvim', version = '*' },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
Expand Down
41 changes: 41 additions & 0 deletions neovim/lua/plugins/mini-nvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
-- https://github.com/echasnovski/mini.nvim

return {
{
'echasnovski/mini.nvim',
version = '*',
config = function(_, opts)
require("mini.ai").setup()
require("mini.comment").setup()
require("mini.diff").setup()
require("mini.git").setup()

--[[
function statusline_set_config()
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
local git = MiniStatusline.section_git({ trunc_width = 75 })
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 } },
'%<', -- Mark general truncate point
{ hl = "MiniStatuslineFilename" , strings = { filename } },
'%=', -- End left alignment
{ hl = "MiniStatuslineDevinfo", strings = { git } },
{ hl = "MiniStatuslineFileinfo", strings = { fileinfo } },
{ hl = "MiniStatuslineDevinfo", strings = { location } },
})
end
require("mini.statusline").setup({
content = {
active = statusline_set_config,
},
})
]]--
end,
},
}

0 comments on commit 07b577f

Please sign in to comment.