diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..1f02b6d --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +lua 5.1.5 diff --git a/lua/custom/keymaps/display.lua b/lua/custom/keymaps/display.lua index daa7bd5..5a208d1 100644 --- a/lua/custom/keymaps/display.lua +++ b/lua/custom/keymaps/display.lua @@ -5,9 +5,7 @@ local wk = require 'which-key' wk.add { mode = { 'n', 'v', 'i' }, - { 'E', group = 'Affichage' }, -- group - { '', 'bprevious', desc = 'Buffer précédent', silent = true }, - { '', 'bnext', desc = 'Buffer suivant', silent = true }, + { 'A', group = 'Affichage' }, -- group } -- The line beneath this is called `modeline`. See `:help modeline` diff --git a/lua/custom/keymaps/edit.lua b/lua/custom/keymaps/edit.lua index 638deb9..4b9d464 100644 --- a/lua/custom/keymaps/edit.lua +++ b/lua/custom/keymaps/edit.lua @@ -2,14 +2,10 @@ -- local wk = require 'which-key' -local header = require 'header' wk.add { mode = { 'n', 'v', 'i' }, - { 'E', group = 'Édition' }, -- group - { 'Eah', header.add_headers, desc = 'Ajouter en-tête', silent = true }, - { 'Eal', header.add_license_header 'gpl3', desc = 'Ajouter license', silent = true }, - { '', 'undo', desc = 'Défaire', silent = true }, + { '', 'undo', desc = 'Défaire', silent = true, hidden = true }, } -- The line beneath this is called `modeline`. See `:help modeline` diff --git a/lua/custom/keymaps/files.lua b/lua/custom/keymaps/files.lua index 82d896d..0c6a68b 100644 --- a/lua/custom/keymaps/files.lua +++ b/lua/custom/keymaps/files.lua @@ -8,14 +8,18 @@ local bufremove = require 'mini.bufremove' wk.add { mode = { 'n', 'v' }, { 'F', group = 'Fichier' }, -- group - { 'Fo', neotree_utils.smart_open, desc = 'Fichiers...' }, + { 'Fe', neotree_utils.smart_open, desc = 'Parcourir fichiers' }, { 'Fc', bufremove.delete, desc = 'Fermer buffer', silent = true }, { 'Fr', 'source %', desc = 'Recharger buffer', silent = true }, { 'Fs', 'w', desc = 'Sauver buffer', silent = true }, - { '', 'source %', desc = 'Recharger buffer', silent = true }, - { '', 'w', desc = 'Sauver buffer', silent = true }, - { '', bufremove.delete, desc = 'Fermer buffer', silent = true }, - { '', neotree_utils.smart_open, desc = 'Fichiers...' }, + { 'Fp', 'bprevious', desc = 'Buffer précédent', silent = true }, + { 'Fs', 'bnext', desc = 'Buffer suivant', silent = true }, + { '', 'bprevious', desc = 'Buffer précédent', silent = true, hidden = true }, + { '', 'bnext', desc = 'Buffer suivant', silent = true, hidden = true }, + { '', 'source %', desc = 'Recharger buffer', silent = true, hidden = true }, + { '', 'w', desc = 'Sauver buffer', silent = true, hidden = true }, + { '', bufremove.delete, desc = 'Fermer buffer', silent = true, hidden = true }, + { '', neotree_utils.smart_open, desc = 'Parcourir fichiers', silent = true, hidden = true }, } -- The line beneath this is called `modeline`. See `:help modeline` diff --git a/lua/custom/keymaps/general.lua b/lua/custom/keymaps/general.lua new file mode 100644 index 0000000..27d32bb --- /dev/null +++ b/lua/custom/keymaps/general.lua @@ -0,0 +1,12 @@ +-- General mappings +-- + +local wk = require 'which-key' + +wk.add { + mode = { 'n', 'v', 'i' }, + { 'q', 'qall', desc = 'Quitter', silent = true }, +} + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/init.lua b/lua/custom/keymaps/init.lua index a4e9e1d..c6bc20e 100644 --- a/lua/custom/keymaps/init.lua +++ b/lua/custom/keymaps/init.lua @@ -1,9 +1,11 @@ -- load which-key mappings -- -require 'custom.keymaps.buffers' +require 'custom.keymaps.nop' +require 'custom.keymaps.general' +require 'custom.keymaps.files' require 'custom.keymaps.edit' -require 'custom.keymaps.neotree' +require 'custom.keymaps.display' -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/nop.lua b/lua/custom/keymaps/nop.lua new file mode 100644 index 0000000..206aa38 --- /dev/null +++ b/lua/custom/keymaps/nop.lua @@ -0,0 +1,14 @@ +-- Deactivated key mappings +-- + +local wk = require 'which-key' + +wk.add { + mode = { 'n', 'v', 'i' }, + -- deactivate the following mappings + { 'gc', '', hidden = true }, + { 'gcc', '', hidden = true }, +} + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/neotree.lua b/lua/custom/plugins/neotree.lua index 29b56c6..967f825 100644 --- a/lua/custom/plugins/neotree.lua +++ b/lua/custom/plugins/neotree.lua @@ -13,10 +13,10 @@ function M.smart_open() vim.cmd('Neotree toggle reveal=false position=float dir=' .. vim.fn.expand '~') -- Si c'est un fichier réel, révéler le fichier dans l'arborescence elseif is_real_file and bufname ~= '' then - vim.cmd 'Neotree toggle position=left reveal=true' + vim.cmd 'Neotree position=left reveal=true' -- Sinon, ouvrir dans le répertoire de travail courant else - vim.cmd('Neotree toggle position=left reveal_force_cwd=true dir=' .. vim.fn.getcwd()) + vim.cmd('Neotree position=float reveal_force_cwd=true dir=' .. vim.fn.getcwd()) end end @@ -24,4 +24,3 @@ return M -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et - diff --git a/lua/kickstart/core/lazy-plugins.lua b/lua/kickstart/core/lazy-plugins.lua index bf817fc..8c7d966 100644 --- a/lua/kickstart/core/lazy-plugins.lua +++ b/lua/kickstart/core/lazy-plugins.lua @@ -15,24 +15,25 @@ require('lazy').setup({ require 'kickstart.plugins.mini', require 'kickstart.plugins.noice', - require 'kickstart.plugins.gitsigns', require 'kickstart.plugins.telescope', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.snacks', + require 'kickstart.plugins.treesitter', require 'kickstart.plugins.lsp', + require 'kickstart.plugins.autopairs', require 'kickstart.plugins.autoformat', require 'kickstart.plugins.autocompletion', + require 'kickstart.plugins.gitsigns', require 'kickstart.plugins.todo-comments', -- require 'kickstart.plugins.debug', -- 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.treesitter', require 'kickstart.plugins.header', require 'kickstart.plugins.which-key', + require 'kickstart.plugins.quarto', -- Themes - require 'kickstart.themes.onedark', + require 'kickstart.themes.yorumi', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lua/kickstart/plugins/logos.lua b/lua/kickstart/plugins/logos.lua new file mode 100644 index 0000000..6e93098 --- /dev/null +++ b/lua/kickstart/plugins/logos.lua @@ -0,0 +1,28 @@ +-- Logos for starter page +-- + +local M = {} + +M.default = { + ' ⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣤⣀⡀', + ' ⠀⠀⠀⠀⠀⢀⣴⣿⣿⠿⠛⠋⠉⠉⠛⠛⠻⢿⣷⣦⡀', + ' ⠀⠀⠀⢀⣴⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⣿⣿⣆', + ' ⠀⠀⣠⣿⠏⠀⠀⢀⣠⣤⣤⣤⣤⣀⠀⠀⠀⠀⠀⠀⠹⣿⣿⡄', + ' ⠀⣾⣿⠃⠀⠀⠘⠛⠉⠀⠀⠀⠉⠛⠂⠀⠀⠀⠀⠀⠀⠈⣿⣿⣷', + ' ⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿', + ' ⠘⣿⣿⣆⠀⠀⠀⠀⣠⣤⣤⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⠃', + ' ⠀⠛⠻⢿⣿⣷⣶⣾⣿⣿⣿⣿⣿⣷⣦⣄⣀⣀⣀⣤⣴⠿⠛⠁', + '', +} + +M.neovim1 = { + ' _ _ _ _ ', + '( ) ( ) ( ) ( )_ ', + '| `\\| | __ _ | | | (_) ___ ___ ', + "| , ` |/'__`\\/'_`\\| | | | /' _ ` _ `\\", + '| |`\\ ( ___( (_) | \\_/ | | ( ) ( ) |', + '(_) (_`\\____`\\___/`\\___/(_(_) (_) (_)', + '', +} + +return M diff --git a/lua/kickstart/plugins/mini.lua b/lua/kickstart/plugins/mini.lua index 104140f..83a6fd3 100644 --- a/lua/kickstart/plugins/mini.lua +++ b/lua/kickstart/plugins/mini.lua @@ -36,20 +36,11 @@ return { return '%2l:%-2v' end - local dashboard = require 'mini.starter' - dashboard.setup { + local starter = require 'mini.starter' + local logo = require 'kickstart.plugins.logos' + starter.setup { evaluate_single = true, - header = table.concat({ - ' ⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣤⣀⡀', - ' ⠀⠀⠀⠀⠀⢀⣴⣿⣿⠿⠛⠋⠉⠉⠛⠛⠻⢿⣷⣦⡀', - ' ⠀⠀⠀⢀⣴⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⣿⣿⣆', - ' ⠀⠀⣠⣿⠏⠀⠀⢀⣠⣤⣤⣤⣤⣀⠀⠀⠀⠀⠀⠀⠹⣿⣿⡄', - ' ⠀⣾⣿⠃⠀⠀⠘⠛⠉⠀⠀⠀⠉⠛⠂⠀⠀⠀⠀⠀⠀⠈⣿⣿⣷', - ' ⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿', - ' ⠘⣿⣿⣆⠀⠀⠀⠀⣠⣤⣤⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⠃', - ' ⠀⠛⠻⢿⣿⣷⣶⣾⣿⣿⣿⣿⣿⣷⣦⣄⣀⣀⣀⣤⣴⠿⠛⠁', - '', - }, '\n'), + header = table.concat(logo.neovim1, '\n'), items = { { action = 'edit ~/.config/nvim/init.lua', name = ' Configuration', section = 'Configuration' }, { action = 'Telescope find_files', name = '󰱼 Rechercher fichier', section = 'Telescope' }, @@ -70,7 +61,14 @@ return { -- Simple way to (un)comment line(s) local commenter = require 'mini.comment' - commenter.setup {} + commenter.setup { + mappings = { + comment = 'c', + comment_line = 'cl', + comment_visual = 'c', + textobject = 'c', + }, + } -- Minimal and fast tabline showing listed buffers local tabline = require 'mini.tabline' diff --git a/lua/kickstart/plugins/quarto.lua b/lua/kickstart/plugins/quarto.lua new file mode 100644 index 0000000..9fb2958 --- /dev/null +++ b/lua/kickstart/plugins/quarto.lua @@ -0,0 +1,12 @@ +-- Quarto +-- https://github.com/quarto-dev/quarto-nvim + +return { + { + 'quarto-dev/quarto-nvim', + dependencies = { + 'jmbuhr/otter.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + }, +} diff --git a/lua/kickstart/plugins/snacks.lua b/lua/kickstart/plugins/snacks.lua new file mode 100644 index 0000000..f05a63f --- /dev/null +++ b/lua/kickstart/plugins/snacks.lua @@ -0,0 +1,28 @@ +-- snacks +-- A collection of small QoL plugins for Neovim. +-- https://github.com/folke/snacks.nvim + +return { + { + 'folke/snacks.nvim', + priority = 1000, + lazy = false, + ---@type snacks.Config + -- opts = { + -- -- your configuration comes here + -- -- or leave it empty to use the default settings + -- -- refer to the configuration section below + -- bigfile = { enabled = true }, + -- dashboard = { enabled = true }, + -- explorer = { enabled = true }, + -- indent = { enabled = true }, + -- input = { enabled = true }, + -- picker = { enabled = true }, + -- notifier = { enabled = true }, + -- quickfile = { enabled = true }, + -- scope = { enabled = true }, + -- scroll = { enabled = true }, + -- statuscolumn = { enabled = true }, + -- words = { enabled = true }, + }, +} diff --git a/lua/kickstart/themes/yorumi.lua b/lua/kickstart/themes/yorumi.lua new file mode 100644 index 0000000..68d19d4 --- /dev/null +++ b/lua/kickstart/themes/yorumi.lua @@ -0,0 +1,22 @@ +-- Yorumi +-- https://github.com/yorumicolors/yorumi.nvim + +return { + { -- You can easily change to a different colorscheme. + -- Change the name of the colorscheme plugin below, and then + -- change the command in the config to whatever the name of that colorscheme is. + -- + -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. + 'yorumicolors/yorumi.nvim', + priority = 1000, -- Make sure to load this before all the other start plugins. + config = function() + ---@diagnostic disable-next-line: missing-fields + + -- Load the colorscheme here. + -- Like many other themes, this one has different styles, and you could load + -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. + vim.cmd.colorscheme 'yorumi' + end, + }, +} +