From 9800f5d26522b483a044b9530cc3e7427a3b72d7 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Mon, 4 Aug 2025 03:04:29 +0200 Subject: [PATCH] up --- init.lua | 2 +- lua/{keymaps.lua => keymaps/base.lua} | 0 lua/keymaps/init.lua | 7 +++++ lua/keymaps/neotree.lua | 5 ++++ lua/kickstart/plugins/mini.lua | 38 ++++++++++++++++++++++++++- lua/kickstart/plugins/neo-tree.lua | 4 ++- lua/lazy-plugins.lua | 10 +++---- 7 files changed, 58 insertions(+), 8 deletions(-) rename lua/{keymaps.lua => keymaps/base.lua} (100%) create mode 100644 lua/keymaps/init.lua create mode 100644 lua/keymaps/neotree.lua diff --git a/init.lua b/init.lua index 1d45e37..be798f7 100644 --- a/init.lua +++ b/init.lua @@ -96,7 +96,7 @@ vim.g.have_nerd_font = true -- [[ Setting options ]] require 'options' --- [[ Basic Keymaps ]] +-- [[ Keymaps ]] require 'keymaps' -- [[ Basic Autocommands ]] diff --git a/lua/keymaps.lua b/lua/keymaps/base.lua similarity index 100% rename from lua/keymaps.lua rename to lua/keymaps/base.lua diff --git a/lua/keymaps/init.lua b/lua/keymaps/init.lua new file mode 100644 index 0000000..bfc728a --- /dev/null +++ b/lua/keymaps/init.lua @@ -0,0 +1,7 @@ +-- local wk = require 'kickstart.plugins.which-key' + +-- load neovim standard mappings +require 'keymaps.base' + +-- load which-key mappings +--require 'keymaps.neotree' diff --git a/lua/keymaps/neotree.lua b/lua/keymaps/neotree.lua new file mode 100644 index 0000000..24d7a85 --- /dev/null +++ b/lua/keymaps/neotree.lua @@ -0,0 +1,5 @@ +local wk = require 'kickstart.plugins.which-key' + +wk.register { + { 'e', 'Neotree toggle reveal', desc = 'Fichiers...', mode = 'n' }, +} diff --git a/lua/kickstart/plugins/mini.lua b/lua/kickstart/plugins/mini.lua index d98a109..9157ad8 100644 --- a/lua/kickstart/plugins/mini.lua +++ b/lua/kickstart/plugins/mini.lua @@ -36,8 +36,44 @@ return { return '%2l:%-2v' end + local dashboard = require 'mini.starter' + dashboard.setup { + evaluate_single = true, + header = table.concat({ + ' ⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣤⣀⡀', + ' ⠀⠀⠀⠀⠀⢀⣴⣿⣿⠿⠛⠋⠉⠉⠛⠛⠻⢿⣷⣦⡀', + ' ⠀⠀⠀⢀⣴⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⣿⣿⣆', + ' ⠀⠀⣠⣿⠏⠀⠀⢀⣠⣤⣤⣤⣤⣀⠀⠀⠀⠀⠀⠀⠹⣿⣿⡄', + ' ⠀⣾⣿⠃⠀⠀⠘⠛⠉⠀⠀⠀⠉⠛⠂⠀⠀⠀⠀⠀⠀⠈⣿⣿⣷', + ' ⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿', + ' ⠘⣿⣿⣆⠀⠀⠀⠀⣠⣤⣤⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⠃', + ' ⠀⠛⠻⢿⣿⣷⣶⣾⣿⣿⣿⣿⣿⣷⣦⣄⣀⣀⣀⣤⣴⠿⠛⠁', + '', + }, '\n'), + items = { + { action = 'edit ~/.config/nvim/init.lua', name = ' Configuration', section = 'Configuration' }, + { action = 'Telescope find_files', name = '󰱼 Rechercher fichier', section = 'Telescope' }, + { action = 'Telescope oldfiles', name = '󰋚 Fichiers récents', section = 'Telescope' }, + { action = 'Telescope live_grep', name = '󰱼 Rechercher texte', section = 'Telescope' }, + { action = 'e .', name = ' Parcourir', section = 'Fichiers' }, + { action = 'qa', name = '󰗼 Quitter', section = 'Quitter' }, + }, + content_hooks = { + require('mini.starter').gen_hook.adding_bullet '󰐊 ', + require('mini.starter').gen_hook.aligning('center', 'center'), + }, + } + + -- Simple way to visualize and work with indent scope + local indentscope = require 'mini.indentscope' + indentscope.setup {} + + -- Simple way to (un)comment line(s) + local commenter = require 'mini.comment' + commenter.setup {} + -- ... and there is more! -- Check out: https://github.com/echasnovski/mini.nvim end, }, -} \ No newline at end of file +} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index 0c43fab..6c7d062 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -8,6 +8,7 @@ return { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 'MunifTanjim/nui.nvim', + 'folke/snacks.nvim', -- optional }, lazy = false, keys = { @@ -22,4 +23,5 @@ return { }, }, }, -} \ No newline at end of file +} + diff --git a/lua/lazy-plugins.lua b/lua/lazy-plugins.lua index 915269f..88975ac 100644 --- a/lua/lazy-plugins.lua +++ b/lua/lazy-plugins.lua @@ -21,11 +21,11 @@ require('lazy').setup({ require 'kickstart.plugins.tokyonight', require 'kickstart.plugins.todo-comments', -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + -- require 'kickstart.plugins.indent_line', -- use alternative mini module -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps require 'kickstart.plugins.mini', require 'kickstart.plugins.treesitter', require 'kickstart.plugins.which-key', @@ -63,4 +63,4 @@ require('lazy').setup({ }) -- The line beneath this is called `modeline`. See `:help modeline` --- vim: ts=2 sts=2 sw=2 et \ No newline at end of file +-- vim: ts=2 sts=2 sw=2 et