feat(nvim): sessions & tweaks to configs

This commit is contained in:
2024-12-10 01:13:52 +02:00
parent 0964253be5
commit 320ae35dcd
3 changed files with 28 additions and 5 deletions

View File

@@ -13,9 +13,11 @@ vim.loader.enable() -- Enable the plugin loader
-- vim.global -- vim.global
g.mapleader = ' ' -- Space as the leader key g.mapleader = ' ' -- Space as the leader key
g.maplocalleader = ' ' -- Space as the local leader key g.maplocalleader = ' ' -- Space as the local leader key
g.colors_theme = 'tokyonight' -- Set the colorscheme g.colors_theme = 'tokyonight' -- Set the colorscheme
g.colors_variant_light = 'tokyonight-day' -- Set the light variant g.colors_variant_light = 'tokyonight-day' -- Set the light variant
g.colors_variant_dark = 'tokyonight-storm' -- Set the dark variant g.colors_variant_dark = 'tokyonight-storm' -- Set the dark variant
g.editorconfig = true -- Make sure editorconfig support is enabled g.editorconfig = true -- Make sure editorconfig support is enabled
g.loaded_perl_provider = 0 -- Disable perl provider g.loaded_perl_provider = 0 -- Disable perl provider
g.loaded_ruby_provider = 0 -- Disable ruby provider g.loaded_ruby_provider = 0 -- Disable ruby provider

View File

@@ -12,7 +12,20 @@ return {
notify = { enabled = true }, notify = { enabled = true },
notifier = { enabled = true }, notifier = { enabled = true },
quickfile = { enabled = true }, quickfile = { enabled = true },
statuscolumn = { enabled = true }, statuscolumn = {
enabled = true,
left = { "mark", "sign" }, -- priority of signs on the left (high to low)
right = { "fold", "git" }, -- priority of signs on the right (high to low)
folds = {
open = true, -- show open fold icons
git_hl = false, -- use Git Signs hl for fold icons
},
git = {
-- patterns to match Git signs
patterns = { "GitSign", "MiniDiffSign" },
},
refresh = 50, -- refresh at most every 50ms
},
words = { enabled = true }, words = { enabled = true },
styles = { styles = {
notification = { notification = {

View File

@@ -21,6 +21,11 @@ return {
local miniclue = require 'mini.clue' local miniclue = require 'mini.clue'
miniclue.setup { miniclue.setup {
window = {
config = {
width = 'auto',
},
},
triggers = { triggers = {
-- Leader triggers -- Leader triggers
{ mode = 'n', keys = '<Leader>' }, { mode = 'n', keys = '<Leader>' },
@@ -53,8 +58,8 @@ return {
{ mode = 'x', keys = 'z' }, { mode = 'x', keys = 'z' },
}, },
-- These mark the sections in the popup
clues = { clues = {
-- Enhance this by adding descriptions for <Leader> mapping groups
miniclue.gen_clues.builtin_completion(), miniclue.gen_clues.builtin_completion(),
miniclue.gen_clues.g(), miniclue.gen_clues.g(),
miniclue.gen_clues.marks(), miniclue.gen_clues.marks(),
@@ -176,6 +181,9 @@ return {
-- Text edit operators -- Text edit operators
{ 'echasnovski/mini.operators', version = '*', opts = {} }, { 'echasnovski/mini.operators', version = '*', opts = {} },
-- Session management (read, write, delete)
{ 'echasnovski/mini.sessions', version = '*', opts = {} },
-- Split and join arguments, lists, and other sequences -- Split and join arguments, lists, and other sequences
-- Replaced Wansmer/treesj -- Replaced Wansmer/treesj
{ 'echasnovski/mini.splitjoin', version = '*', opts = {} }, { 'echasnovski/mini.splitjoin', version = '*', opts = {} },
@@ -197,8 +205,8 @@ return {
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 }) local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
local git = MiniStatusline.section_git({ trunc_width = 75 }) local git = MiniStatusline.section_git({ trunc_width = 75 })
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 }) local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
local filename = MiniStatusline.section_filename({ trunc_width = 140 }) local filename = MiniStatusline.section_filename({ trunc_width = 50 })
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 }) -- local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
local location = MiniStatusline.section_location({ trunc_width = 75 }) local location = MiniStatusline.section_location({ trunc_width = 75 })
return MiniStatusline.combine_groups({ return MiniStatusline.combine_groups({
{ hl = mode_hl, strings = { mode } }, { hl = mode_hl, strings = { mode } },
@@ -206,7 +214,7 @@ return {
'%<', -- Mark general truncate point '%<', -- Mark general truncate point
{ hl = 'MiniStatuslineFilename', strings = { filename } }, { hl = 'MiniStatuslineFilename', strings = { filename } },
'%=', -- End left alignment '%=', -- End left alignment
{ hl = 'MiniStatuslineFileinfo', strings = { fileinfo } }, -- { hl = 'MiniStatuslineFileinfo', strings = { fileinfo } },
{ hl = mode_hl, strings = { location } }, { hl = mode_hl, strings = { location } },
}) })
end, end,