This commit is contained in:
2025-08-24 20:10:59 +02:00
parent 643a7dfe04
commit d033bab96e
10 changed files with 39 additions and 27 deletions

View File

@@ -1,11 +1,6 @@
-- Quarto autocommands file -- Markdown autocommands file
-- --
local status_wk, wk = pcall(require, 'which-key')
if not status_wk then
return
end
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
desc = '', desc = '',
pattern = 'markdown', pattern = 'markdown',

View File

@@ -1,18 +1,25 @@
-- Edition mappings -- Edition mappings
-- --
--
local status_wk, wk = pcall(require, 'which-key') local status_kh, kh = pcall(require, 'custom.plugins.keymaps-helper')
if not status_wk then if not status_kh then
return return
end end
wk.add { kh.map({ 'n', 'v', 'i' }, '<C-z>', '<CMD>undo<CR>', { silent = true, noremap = true, desc = 'Undo' })
{
mode = { 'n', 'v', 'i' }, -- local status_wk, wk = pcall(require, 'which-key')
-- mapping runs here as which-key intercepts ctrl-z signal before term -- if not status_wk then
{ '<C-z>', '<CMD>undo<CR>', desc = 'Undo', silent = true, noremap = true, hidden = true }, -- return
}, -- end
} --
-- wk.add {
-- {
-- mode = { 'n', 'v', 'i' },
-- -- mapping runs here as which-key intercepts ctrl-z signal before term
-- { '<C-z>', '<CMD>undo<CR>', desc = 'Undo', silent = true, noremap = true, hidden = true },
-- },
-- }
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@@ -1,7 +1,10 @@
-- Key mappings groups -- Key mappings groups
-- --
local wk = require 'which-key' local status_wk, wk = pcall(require, 'which-key')
if not status_wk then
return
end
wk.add { wk.add {
{ {

View File

@@ -1,7 +1,10 @@
-- Deactivated key mappings -- Deactivated key mappings
-- --
local wk = require 'which-key' local status_wk, wk = pcall(require, 'which-key')
if not status_wk then
return
end
wk.add { wk.add {
mode = { 'n', 'v', 'i' }, mode = { 'n', 'v', 'i' },

View File

@@ -1,4 +1,4 @@
-- Edition mappings -- Obsidian mappings
-- --
local status_wk, wk = pcall(require, 'which-key') local status_wk, wk = pcall(require, 'which-key')
@@ -9,8 +9,8 @@ end
wk.add { wk.add {
{ {
mode = { 'n', 'v', 'i' }, mode = { 'n', 'v', 'i' },
{ '<leader>on', '<CMD>Obsidian new<CR>', desc = 'create new note', silent = true, noremap = true }, { '<leader>on', '<CMD>Obsidian new<CR>', desc = 'create [n]ew note', silent = true, noremap = true },
{ '<leader>os', '<CMD>Obsidian search<CR>', desc = 'search note', silent = true, noremap = true }, { '<leader>os', '<CMD>Obsidian search<CR>', desc = '[s]earch note', silent = true, noremap = true },
}, },
} }

View File

@@ -9,7 +9,7 @@ wk.add {
-- gitsigns -- gitsigns
{ '<leader>tb', gitsigns.toggle_current_line_blame, desc = 'toggle git show [b]lame line' }, { '<leader>tb', gitsigns.toggle_current_line_blame, desc = 'toggle git show [b]lame line' },
{ '<leader>tD', gitsigns.preview_hunk_inline, desc = 'toggle git show [D]eleted' }, { '<leader>tD', gitsigns.preview_hunk_inline, desc = 'toggle git show [D]eleted' },
{ '<leader>tm', '<CMD>RenderMarkdown buf_toggle<CR>', desc = 'toggle markdown rendering for current' }, { '<leader>tm', '<CMD>RenderMarkdown buf_toggle<CR>', desc = 'toggle [m]arkdown rendering for current' },
} }
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`

View File

@@ -30,8 +30,8 @@ function M.smart_open()
vim.cmd('Neotree toggle reveal=false position=float dir=' .. vim.fn.expand '~') 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 -- Si c'est un fichier réel, révéler le fichier dans l'arborescence
elseif is_real_file and bufname ~= '' then elseif is_real_file and bufname ~= '' then
vim.cmd('Neotree toggle position=left reveal=true dir=' .. vim.fn.expand '%:p:h') -- vim.cmd('Neotree toggle position=left reveal_force_cwd=true dir=' .. vim.fn.expand '%:p:h')
-- vim.cmd 'Neotree position=left reveal=true' vim.cmd 'Neotree position=left reveal_force_cwd=true'
-- Sinon, ouvrir dans le répertoire de travail courant -- Sinon, ouvrir dans le répertoire de travail courant
else else
-- vim.cmd('Neotree toggle position=left reveal_force_cwd=true dir=' .. vim.fn.getcwd()) -- vim.cmd('Neotree toggle position=left reveal_force_cwd=true dir=' .. vim.fn.getcwd())

View File

@@ -11,7 +11,7 @@ return {
---@type render.md.UserConfig ---@type render.md.UserConfig
opts = { opts = {
-- run on both Markdown and Quarto files -- run on both Markdown and Quarto files
file_types = { 'markdown', 'quarto' }, file_types = { 'markdown', 'quarto', 'vimwiki' },
-- means that in normal, command, and terminal modes you'll get a rendered view, -- means that in normal, command, and terminal modes you'll get a rendered view,
-- and in other modes such as insert the marks added by the plugin will disappear. -- and in other modes such as insert the marks added by the plugin will disappear.
-- render_modes = { 'n', 'c', 't' }, -- render_modes = { 'n', 'c', 't' },

View File

@@ -18,6 +18,9 @@ return {
---@module 'obsidian' ---@module 'obsidian'
---@type obsidian.config ---@type obsidian.config
opts = { opts = {
ui = {
enable = false,
},
legacy_commands = false, legacy_commands = false,
workspaces = { workspaces = {
{ {

View File

@@ -8,7 +8,7 @@ return {
main = 'nvim-treesitter.configs', -- Sets main module to use for opts main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = { opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, ensure_installed = { 'bash', 'c', 'diff', 'html', 'latex', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'r', 'vim', 'vimdoc' },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,
highlight = { highlight = {
@@ -27,4 +27,5 @@ return {
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
}, },
} }