This commit is contained in:
2025-08-10 14:02:33 +02:00
parent 36f51bb73c
commit bc65b628dd
13 changed files with 246 additions and 94 deletions

View File

@@ -8,12 +8,12 @@ return {
cmd = { 'ConformInfo' },
keys = {
{
'<leader>f',
'<leader>bf',
function()
require('conform').format { async = true, lsp_format = 'fallback' }
end,
mode = '',
desc = '[F]ormat buffer',
desc = '[F]ormat [B]uffer',
},
},
opts = {
@@ -42,4 +42,5 @@ return {
},
},
},
}
}

View File

@@ -42,12 +42,12 @@ return {
evaluate_single = true,
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' },
{ action = 'Telescope oldfiles', name = '󰋚 Fichiers récents', section = 'Telescope' },
{ action = 'Telescope live_grep', name = '󰱼 Rechercher texte', section = 'Telescope' },
{ action = 'e .', name = ' Ouvrir', section = 'Fichiers' },
{ action = 'qa', name = '󰗼 Quitter', section = 'Quitter' },
{ action = 'Neotree reveal=true position=float dir=~/.config/nvim/', name = ' Configuration', section = 'General' },
{ action = 'e .', name = ' Open', section = 'Files' },
{ action = 'Telescope find_files', name = '󰱼 Find file', section = 'Files' },
{ action = 'Telescope oldfiles', name = '󰋚 Recent files', section = 'Files' },
{ action = 'Telescope live_grep', name = '󰱼 Find text', section = 'Files' },
{ action = 'qa', name = '󰗼 Quit', section = 'General' },
},
content_hooks = {
require('mini.starter').gen_hook.adding_bullet '󰐊 ',
@@ -64,7 +64,7 @@ return {
commenter.setup {
mappings = {
comment = '<leader>c',
comment_line = '<leader>cl',
comment_line = '<leader>c',
comment_visual = '<leader>c',
textobject = '<leader>c',
},

View File

@@ -4,72 +4,82 @@
local neotree_helper = require 'custom.plugins.neotree-helper'
return {
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
'folke/snacks.nvim', -- optional for image preview
'saifulapm/neotree-file-nesting-config', -- optional for VSCode like file nesting
},
lazy = false,
keys = {
-- { '<C-o>', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
hide_root_node = true, -- recommanded config for VSCode like file nesting
retain_hidden_root_indent = true, -- recommanded config for VSCode like file nesting
filesystem = {
filtered_items = {
show_hidden_count = false, -- recommanded config for VSCode like file nesting
never_show = { -- recommanded config for VSCode like file nesting
'.DS_Store',
},
},
window = {
mappings = {
['<C-o>'] = {
'close_window',
desc = 'close neo-tree',
},
['d'] = {
'trash',
desc = 'trash file',
{
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
'folke/snacks.nvim', -- optional for image preview
'saifulapm/neotree-file-nesting-config', -- optional for VSCode like file nesting
},
lazy = false,
keys = {
-- { '<C-o>', ':Neotree toggle reveal<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
hide_root_node = true, -- recommanded config for VSCode like file nesting
retain_hidden_root_indent = true, -- recommanded config for VSCode like file nesting
filesystem = {
filtered_items = {
show_hidden_count = false, -- recommanded config for VSCode like file nesting
never_show = { -- recommanded config for VSCode like file nesting
'.DS_Store',
},
},
window = {
mappings = {
-- ['<C-o>'] = {
-- 'close_window',
-- desc = 'close neo-tree',
-- },
['d'] = {
'trash',
desc = 'trash file',
},
['P'] = {
'toggle_preview',
desc = 'preview image',
config = {
use_float = false,
use_snacks_image = true,
},
},
},
},
commands = {
trash = neotree_helper.trash,
trash_visual = neotree_helper.trash_visual,
},
},
commands = {
trash = neotree_helper.trash,
trash_visual = neotree_helper.trash_visual,
-- recommanded config for VSCode like file nesting
default_component_configs = {
indent = {
with_expanders = true,
expander_collapsed = '',
expander_expanded = '',
},
},
event_handlers = {
{
event = 'file_opened',
handler = function()
-- auto close
-- vim.cmd 'Neotree close'
-- or
require('neo-tree.command').execute { action = 'close' }
end,
},
},
},
-- recommanded config for VSCode like file nesting
default_component_configs = {
indent = {
with_expanders = true,
expander_collapsed = '',
expander_expanded = '',
},
},
event_handlers = {
{
event = 'file_opened',
handler = function()
-- auto close
-- vim.cmd 'Neotree close'
-- or
require('neo-tree.command').execute { action = 'close' }
end,
},
},
config = function(_, opts)
-- Adding rules from plugin
opts.nesting_rules = require('neotree-file-nesting-config').nesting_rules
require('neo-tree').setup(opts)
end,
},
-- recommanded config for VSCode like file nesting
config = function(_, opts)
-- Adding rules from plugin
opts.nesting_rules = require('neotree-file-nesting-config').nesting_rules
require('neo-tree').setup(opts)
end,
}
-- The line beneath this is called `modeline`. See `:help modeline`

View File

@@ -1,5 +1,8 @@
-- Quarto
-- https://github.com/quarto-dev/quarto-nvim
-- Quarto and other tools to use with
-- quarto: https://github.com/quarto-dev/quarto-nvim
-- vim-slime: https://github.com/jpalardy/vim-slime
-- molten: https://github.com/benlubas/molten-nvim
--
return {
{
@@ -9,4 +12,96 @@ return {
'nvim-treesitter/nvim-treesitter',
},
},
-- {
-- 'jpalardy/vim-slime',
-- init = function()
-- vim.g.slime_target = 'kitty'
-- vim.g.slime_no_mappings = 1
-- end,
-- },
-- {
-- 'benlubas/molten-nvim',
-- version = '^1.0.0', -- use version <2.0.0 to avoid breaking changes
-- dependencies = { '3rd/image.nvim' },
-- build = ':UpdateRemotePlugins',
-- init = function()
-- -- these are examples, not defaults. Please see the readme
-- vim.g.molten_image_provider = 'image.nvim'
-- vim.g.molten_output_win_max_height = 20
-- end,
-- },
-- {
-- '3rd/image.nvim',
-- build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
-- opts = {
-- backend = 'kitty',
-- processor = 'magick_cli', -- or "magick_rock"
-- integrations = {
-- markdown = {
-- enabled = true,
-- clear_in_insert_mode = false,
-- download_remote_images = true,
-- only_render_image_at_cursor = false,
-- only_render_image_at_cursor_mode = 'popup',
-- floating_windows = false, -- if true, images will be rendered in floating markdown windows
-- filetypes = { 'markdown', 'vimwiki', 'quarto' }, -- markdown extensions (ie. quarto) can go here
-- },
-- neorg = {
-- enabled = true,
-- filetypes = { 'norg' },
-- },
-- typst = {
-- enabled = true,
-- filetypes = { 'typst' },
-- },
-- html = {
-- enabled = false,
-- },
-- css = {
-- enabled = false,
-- },
-- },
-- max_width = nil,
-- max_height = nil,
-- max_width_window_percentage = nil,
-- max_height_window_percentage = 50,
-- window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
-- window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', 'snacks_notif', 'scrollview', 'scrollview_sign' },
-- editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
-- tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
-- hijack_file_patterns = { '*.png', '*.jpg', '*.jpeg', '*.gif', '*.webp', '*.avif' }, -- render image files as images when opened
-- },
-- },
-- {
-- 'HakonHarnes/img-clip.nvim',
-- event = 'BufEnter',
-- ft = { 'markdown', 'quarto', 'latex' },
-- opts = {
-- -- add options here
-- -- or leave it empty to use the default settings
-- default = {
-- dir_path = 'img',
-- },
-- filetypes = {
-- markdown = {
-- url_encode_path = true,
-- template = '![$CURSOR]($FILE_PATH)',
-- drag_and_drop = {
-- download_images = false,
-- },
-- },
-- quarto = {
-- url_encode_path = true,
-- template = '![$CURSOR]($FILE_PATH)',
-- drag_and_drop = {
-- download_images = false,
-- },
-- },
-- },
-- },
-- keys = {
-- -- suggested keymap
-- { '<leader>p', '<cmd>PasteImage<cr>', desc = 'Paste image from system clipboard' },
-- },
-- },
}