Compare commits
	
		
			2 Commits
		
	
	
		
			1ba07cf703
			...
			8f04c0e04c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8f04c0e04c | |||
| 6851e16bcf | 
| @@ -16,9 +16,11 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { | |||||||
|     -- email commands: my/msy to paste the html inside the clipboard |     -- email commands: my/msy to paste the html inside the clipboard | ||||||
|     vim.keymap.set('', '<LocalLeader>msy', ':w !pandoc -f markdown+emoji -t html5 -s | wl-copy --type text/html<CR><CR>', |     vim.keymap.set('', '<LocalLeader>msy', ':w !pandoc -f markdown+emoji -t html5 -s | wl-copy --type text/html<CR><CR>', | ||||||
|       { noremap = true, silent = true, desc = "[M]arkdown to [S]ingle page [Y]ank" }) |       { noremap = true, silent = true, desc = "[M]arkdown to [S]ingle page [Y]ank" }) | ||||||
|     vim.keymap.set('', '<LocalLeader>my', ':w !pandoc -f markdown+emoji --wrap=none -t html5 | wl-copy --type text/html<CR><CR>', |     vim.keymap.set('', '<LocalLeader>my', | ||||||
|  |       ':w !pandoc -f markdown+emoji --wrap=none -t html5 | wl-copy --type text/html<CR><CR>', | ||||||
|       { noremap = true, silent = true, desc = "[M]arkdown to HTML [Y]ank" }) |       { noremap = true, silent = true, desc = "[M]arkdown to HTML [Y]ank" }) | ||||||
|     vim.keymap.set('', '<LocalLeader>mp', '<Plug>MarkdownPreviewToggle', { noremap = true, silent = true, desc = "[M]arkdown [P]review" }) |     vim.keymap.set('', '<LocalLeader>mp', '<Plug>MarkdownPreviewToggle', | ||||||
|  |       { noremap = true, silent = true, desc = "[M]arkdown [P]review" }) | ||||||
|   end |   end | ||||||
| }) | }) | ||||||
|  |  | ||||||
| @@ -83,4 +85,3 @@ vim.api.nvim_create_autocmd("FileType", { | |||||||
|     require('spelling').spell_keymap() |     require('spelling').spell_keymap() | ||||||
|   end, |   end, | ||||||
| }) | }) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -62,5 +62,5 @@ vim.o.scrolloff = 10 | |||||||
| vim.cmd "set formatoptions-=t" | vim.cmd "set formatoptions-=t" | ||||||
|  |  | ||||||
| -- Make some typographic chars visible | -- Make some typographic chars visible | ||||||
| vim.opt.listchars:append({nbsp = "·", trail = "¤", eol = '↲'}) | vim.opt.listchars:append({ nbsp = "·", trail = "¤", eol = '↲' }) | ||||||
| vim.o.list = true | vim.o.list = true | ||||||
|   | |||||||
| @@ -191,7 +191,7 @@ require('lazy').setup({ | |||||||
|   }, |   }, | ||||||
|  |  | ||||||
|   -- "gc" to comment visual regions/lines |   -- "gc" to comment visual regions/lines | ||||||
|   { 'numToStr/Comment.nvim', opts = {} }, |   { 'numToStr/Comment.nvim',    opts = {} }, | ||||||
|  |  | ||||||
|   -- Fuzzy Finder (files, lsp, etc) |   -- Fuzzy Finder (files, lsp, etc) | ||||||
|   { |   { | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ local on_attach = function(_, bufnr) | |||||||
|  |  | ||||||
|   nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame') |   nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame') | ||||||
|   nmap('<leader>c', vim.lsp.buf.code_action, '[C]ode action') -- NOTE: to see if ca is needed |   nmap('<leader>c', vim.lsp.buf.code_action, '[C]ode action') -- NOTE: to see if ca is needed | ||||||
|   nmap('<leader>f', function() -- https://stackoverflow.com/a/74303272 |   nmap('<leader>f', function()                                -- https://stackoverflow.com/a/74303272 | ||||||
|     vim.lsp.buf.code_action({ |     vim.lsp.buf.code_action({ | ||||||
|       filter = function(a) |       filter = function(a) | ||||||
|         return a.isPreferred |         return a.isPreferred | ||||||
|   | |||||||
| @@ -1,7 +1,8 @@ | |||||||
| local map_list = { | local map_list = { | ||||||
|   -- ["w|"] = ":vsplit", ["w-"] = ":split", -- w| / w- pour créer des splits verticaux et horizontaux |   -- ["w|"] = ":vsplit", ["w-"] = ":split", -- w| / w- pour créer des splits verticaux et horizontaux | ||||||
|   -- ["ge"] = ":bprevious", ["gn"] = ":bnext", |   -- ["ge"] = ":bprevious", ["gn"] = ":bnext", | ||||||
|   ["W"] = ":w", ["<C-t>"] = ":tabnew", |   ["W"] = ":w", | ||||||
|  |   ["<C-t>"] = ":tabnew", | ||||||
| } | } | ||||||
|  |  | ||||||
| local keymap = vim.keymap.set | local keymap = vim.keymap.set | ||||||
|   | |||||||
| @@ -47,16 +47,16 @@ vim.api.nvim_set_keymap("n", "<Leader>nef", ":Neorg export to-file ", | |||||||
|  |  | ||||||
| -- Tasks | -- Tasks | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>td", "<Plug>(neorg.qol.todo-items.todo.task-done)", | vim.api.nvim_set_keymap("n", "<LocalLeader>td", "<Plug>(neorg.qol.todo-items.todo.task-done)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask [D]one"}) |   { noremap = true, silent = true, desc = "[T]ask [D]one" }) | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>tu", "<Plug>(neorg.qol.todo-items.todo.task-undone)", | vim.api.nvim_set_keymap("n", "<LocalLeader>tu", "<Plug>(neorg.qol.todo-items.todo.task-undone)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask [U]ndone"}) |   { noremap = true, silent = true, desc = "[T]ask [U]ndone" }) | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>tp", "<Plug>(neorg.qol.todo-items.todo.task-pending)", | vim.api.nvim_set_keymap("n", "<LocalLeader>tp", "<Plug>(neorg.qol.todo-items.todo.task-pending)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask [P]ending"}) |   { noremap = true, silent = true, desc = "[T]ask [P]ending" }) | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>th", "<Plug>(neorg.qol.todo-items.todo.task-on_hold)", | vim.api.nvim_set_keymap("n", "<LocalLeader>th", "<Plug>(neorg.qol.todo-items.todo.task-on_hold)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask on [H]old"}) |   { noremap = true, silent = true, desc = "[T]ask on [H]old" }) | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>tc", "<Plug>(neorg.qol.todo-items.todo.task-cancelled)", | vim.api.nvim_set_keymap("n", "<LocalLeader>tc", "<Plug>(neorg.qol.todo-items.todo.task-cancelled)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask on [C]ancelled"}) |   { noremap = true, silent = true, desc = "[T]ask on [C]ancelled" }) | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>tr", "<Plug>(neorg.qol.todo-items.todo.task-recurring)", | vim.api.nvim_set_keymap("n", "<LocalLeader>tr", "<Plug>(neorg.qol.todo-items.todo.task-recurring)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask on [R]ecurring"}) |   { noremap = true, silent = true, desc = "[T]ask on [R]ecurring" }) | ||||||
| vim.api.nvim_set_keymap("n", "<LocalLeader>ti", "<Plug>(neorg.qol.todo-items.todo.task-important)", | vim.api.nvim_set_keymap("n", "<LocalLeader>ti", "<Plug>(neorg.qol.todo-items.todo.task-important)", | ||||||
|   { noremap = true, silent = true, desc = "[T]ask on [I]mportant"}) |   { noremap = true, silent = true, desc = "[T]ask on [I]mportant" }) | ||||||
|   | |||||||
| @@ -81,5 +81,5 @@ vim.keymap.set('n', '<leader>sb', require('telescope.builtin').lsp_document_symb | |||||||
| -- vim telescope | -- vim telescope | ||||||
| vim.keymap.set('n', '<leader>gc', require('telescope.builtin').git_commits, { desc = '[G]it [C]ommits' }) | vim.keymap.set('n', '<leader>gc', require('telescope.builtin').git_commits, { desc = '[G]it [C]ommits' }) | ||||||
| vim.keymap.set('n', '<leader>gs', require('telescope.builtin').git_status, { desc = '[G]it [S]tatus' }) | vim.keymap.set('n', '<leader>gs', require('telescope.builtin').git_status, { desc = '[G]it [S]tatus' }) | ||||||
| vim.keymap.set({'n', 'x'}, '<leader>gB', require('telescope.builtin').git_bcommits, { desc = '[G]it [B]commits' }) | vim.keymap.set({ 'n', 'x' }, '<leader>gB', require('telescope.builtin').git_bcommits, { desc = '[G]it [B]commits' }) | ||||||
| vim.keymap.set('n', '<leader>gb', require('telescope.builtin').git_branches, { desc = '[G]it [B]ranches' }) | vim.keymap.set('n', '<leader>gb', require('telescope.builtin').git_branches, { desc = '[G]it [B]ranches' }) | ||||||
|   | |||||||
| @@ -4,8 +4,8 @@ vim.defer_fn(function() | |||||||
|   require('nvim-treesitter.configs').setup { |   require('nvim-treesitter.configs').setup { | ||||||
|     -- Add languages to be installed here that you want installed for treesitter |     -- Add languages to be installed here that you want installed for treesitter | ||||||
|     ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash', 'norg', 'norg_meta', 'gdscript' }, |     ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash', 'norg', 'norg_meta', 'gdscript' }, | ||||||
|     ignore_install = {'latex', 'tex', 'markdown'}, |     ignore_install = { 'latex', 'tex', 'markdown' }, | ||||||
|     disable = {'latex', 'tex', 'markdown'}, |     disable = { 'latex', 'tex', 'markdown' }, | ||||||
|  |  | ||||||
|     -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) |     -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) | ||||||
|     auto_install = false, |     auto_install = false, | ||||||
| @@ -15,7 +15,7 @@ vim.defer_fn(function() | |||||||
|     highlight = { enable = true }, |     highlight = { enable = true }, | ||||||
|     indent = { |     indent = { | ||||||
|       enable = true, |       enable = true, | ||||||
|       disable = {'javascript'} |       disable = { 'javascript' } | ||||||
|     }, |     }, | ||||||
|     incremental_selection = { |     incremental_selection = { | ||||||
|       enable = true, |       enable = true, | ||||||
|   | |||||||
| @@ -1,21 +1,21 @@ | |||||||
| local options = { | local options = { | ||||||
|   plugins = { |   plugins = { | ||||||
|     marks = true, -- shows a list of your marks on ' and ` |     marks = true,     -- shows a list of your marks on ' and ` | ||||||
|     registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode |     registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode | ||||||
|     -- the presets plugin, adds help for a bunch of default keybindings in Neovim |     -- the presets plugin, adds help for a bunch of default keybindings in Neovim | ||||||
|     -- No actual key bindings are created |     -- No actual key bindings are created | ||||||
|     spelling = { |     spelling = { | ||||||
|       enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions |       enabled = true,   -- enabling this will show WhichKey when pressing z= to select spelling suggestions | ||||||
|       suggestions = 20, -- how many suggestions should be shown in the list? |       suggestions = 20, -- how many suggestions should be shown in the list? | ||||||
|     }, |     }, | ||||||
|     presets = { |     presets = { | ||||||
|       operators = false, -- adds help for operators like d, y, ... |       operators = false,    -- adds help for operators like d, y, ... | ||||||
|       motions = true, -- adds help for motions |       motions = true,       -- adds help for motions | ||||||
|       text_objects = false, -- help for text objects triggered after entering an operator |       text_objects = false, -- help for text objects triggered after entering an operator | ||||||
|       windows = true, -- default bindings on <c-w> |       windows = true,       -- default bindings on <c-w> | ||||||
|       nav = true, -- misc bindings to work with windows |       nav = true,           -- misc bindings to work with windows | ||||||
|       z = true, -- bindings for folds, spelling and others prefixed with z |       z = true,             -- bindings for folds, spelling and others prefixed with z | ||||||
|       g = true, -- bindings for prefixed with g |       g = true,             -- bindings for prefixed with g | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   -- add operators that will trigger motion and text object completion |   -- add operators that will trigger motion and text object completion | ||||||
| @@ -38,27 +38,27 @@ local options = { | |||||||
|   }, |   }, | ||||||
|   popup_mappings = { |   popup_mappings = { | ||||||
|     scroll_down = "<c-d>", -- binding to scroll down inside the popup |     scroll_down = "<c-d>", -- binding to scroll down inside the popup | ||||||
|     scroll_up = "<c-u>", -- binding to scroll up inside the popup |     scroll_up = "<c-u>",   -- binding to scroll up inside the popup | ||||||
|   }, |   }, | ||||||
|   window = { |   window = { | ||||||
|     border = "none", -- none, single, double, shadow |     border = "none",          -- none, single, double, shadow | ||||||
|     position = "bottom", -- bottom, top |     position = "bottom",      -- bottom, top | ||||||
|     margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size. |     margin = { 1, 0, 1, 0 },  -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size. | ||||||
|     padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left] |     padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left] | ||||||
|     winblend = 0, -- value between 0-100 0 for fully opaque and 100 for fully transparent |     winblend = 0,             -- value between 0-100 0 for fully opaque and 100 for fully transparent | ||||||
|     zindex = 1000, -- positive value to position WhichKey above other floating windows. |     zindex = 1000,            -- positive value to position WhichKey above other floating windows. | ||||||
|   }, |   }, | ||||||
|   layout = { |   layout = { | ||||||
|     height = { min = 4, max = 25 }, -- min and max height of the columns |     height = { min = 4, max = 25 },                                                 -- min and max height of the columns | ||||||
|     width = { min = 20, max = 50 }, -- min and max width of the columns |     width = { min = 20, max = 50 },                                                 -- min and max width of the columns | ||||||
|     spacing = 3, -- spacing between columns |     spacing = 3,                                                                    -- spacing between columns | ||||||
|     align = "left", -- align columns left, center or right |     align = "left",                                                                 -- align columns left, center or right | ||||||
|   }, |   }, | ||||||
|   ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label |   ignore_missing = false,                                                           -- enable this to hide mappings for which you didn't specify a label | ||||||
|   hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "^:", "^ ", "^call ", "^lua " }, -- hide mapping boilerplate |   hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "^:", "^ ", "^call ", "^lua " }, -- hide mapping boilerplate | ||||||
|   show_help = true, -- show a help message in the command line for using WhichKey |   show_help = true,                                                                 -- show a help message in the command line for using WhichKey | ||||||
|   show_keys = true, -- show the currently pressed key and its label as a message in the command line |   show_keys = true,                                                                 -- show the currently pressed key and its label as a message in the command line | ||||||
|   triggers = "auto", -- automatically setup triggers |   triggers = "auto",                                                                -- automatically setup triggers | ||||||
|   -- triggers = {"<leader>"} -- or specifiy a list manually |   -- triggers = {"<leader>"} -- or specifiy a list manually | ||||||
|   -- list of triggers, where WhichKey should not wait for timeoutlen and show immediately |   -- list of triggers, where WhichKey should not wait for timeoutlen and show immediately | ||||||
|   triggers_nowait = { |   triggers_nowait = { | ||||||
|   | |||||||
| @@ -4,7 +4,12 @@ In this repository lies my Neovim configuration starting from | |||||||
| The provided `init.lua` file has then been split into (tentatively) semantically | The provided `init.lua` file has then been split into (tentatively) semantically | ||||||
| consistent files inside `lua/` and personal customizations have been applied. | consistent files inside `lua/` and personal customizations have been applied. | ||||||
|  |  | ||||||
| The process to design this configuration and some thoughts can be found [here](https://blog.epheme.re/software/nvim-kickstart.html). | The process to design this configuration and some thoughts can be found | ||||||
|  | [here](https://blog.epheme.re/software/nvim-kickstart.html). | ||||||
|  |  | ||||||
|  | Note that if the global principles remain true, the blog post dates from 2023, | ||||||
|  | and things may have changed a bit since then. Just use it as a reference for my | ||||||
|  | rationals. | ||||||
|  |  | ||||||
| ## Testing it | ## Testing it | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user