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', {
desc = '',
pattern = 'markdown',

View File

@@ -1,18 +1,25 @@
-- Edition mappings
--
local status_wk, wk = pcall(require, 'which-key')
if not status_wk then
--
local status_kh, kh = pcall(require, 'custom.plugins.keymaps-helper')
if not status_kh then
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 },
},
}
kh.map({ 'n', 'v', 'i' }, '<C-z>', '<CMD>undo<CR>', { silent = true, noremap = true, desc = 'Undo' })
-- local status_wk, wk = pcall(require, 'which-key')
-- if not status_wk then
-- 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`
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -1,7 +1,10 @@
-- 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 {
{

View File

@@ -1,7 +1,10 @@
-- 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 {
mode = { 'n', 'v', 'i' },

View File

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

View File

@@ -9,7 +9,7 @@ wk.add {
-- gitsigns
{ '<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>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`

View File

@@ -30,8 +30,8 @@ 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 dir=' .. vim.fn.expand '%:p:h')
-- vim.cmd 'Neotree position=left reveal=true'
-- vim.cmd('Neotree toggle position=left reveal_force_cwd=true dir=' .. vim.fn.expand '%:p:h')
vim.cmd 'Neotree position=left reveal_force_cwd=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())

View File

@@ -11,7 +11,7 @@ return {
---@type render.md.UserConfig
opts = {
-- 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,
-- and in other modes such as insert the marks added by the plugin will disappear.
-- render_modes = { 'n', 'c', 't' },

View File

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

View File

@@ -8,7 +8,7 @@ return {
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
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
auto_install = true,
highlight = {
@@ -28,3 +28,4 @@ return {
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
},
}