-- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = "https://github.com/folke/lazy.nvim.git" local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) if vim.v.shell_error ~= 0 then vim.api.nvim_echo({ { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, { out, "WarningMsg" }, { "\nPress any key to exit..." }, }, true, {}) vim.fn.getchar() os.exit(1) end end vim.opt.rtp:prepend(lazypath) -- Make sure to setup `mapleader` and `maplocalleader` before -- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) vim.g.mapleader = " " vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ spec = { { "gbprod/nord.nvim", lazy = false, priority = 1000, config = function() require("nord").setup({ transparent = true }) vim.cmd.colorscheme("nord") end, }, { "folke/snacks.nvim", ---@type snacks.Config opts = { picker = {}, explorer = {}, zen = {}, terminal = {} }, keys = { -- explore and find { "", function() Snacks.picker.smart() end, desc = "Smart Find Files" }, { ",", function() Snacks.picker.buffers() end, desc = "Buffers" }, { "/", function() Snacks.picker.grep() end, desc = "Grep" }, { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, { "n", function() Snacks.picker.notifications() end, desc = "Notification History" }, { "e", function() Snacks.explorer() end, desc = "File Explorer" }, { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, { "fr", function() Snacks.picker.recent() end, desc = "Recent" }, -- zen mode { "z", function() Snacks.zen() end, desc = "Toggle Zen mode" }, -- terminal { "tt", function() Snacks.terminal.get() end, desc = "Terminal" }, } }, { "nvim-treesitter/nvim-treesitter", -- master : nvim 0.10/0.11 (figé) ; main : nvim >= 0.12 (réécriture incompatible) branch = vim.fn.has("nvim-0.12") == 1 and "main" or "master", lazy = false, build = ":TSUpdate", config = function() local langs = { "markdown", "markdown_inline", "html", "yaml", "lua", "vim", "vimdoc" } if vim.fn.has("nvim-0.12") == 1 then if vim.fn.executable("tree-sitter") == 1 then require("nvim-treesitter").install(langs) else vim.notify("nvim-treesitter : CLI `tree-sitter` absente, parsers non installés", vim.log.levels.WARN) end vim.api.nvim_create_autocmd("FileType", { pattern = { "markdown", "html", "yaml", "lua", "vim", "help" }, callback = function() pcall(vim.treesitter.start) end, }) else require("nvim-treesitter.configs").setup({ ensure_installed = langs, highlight = { enable = true }, }) end end, }, { "echasnovski/mini.icons", lazy = true, opts = {} }, { "MeanderingProgrammer/render-markdown.nvim", ft = { "markdown" }, dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, ---@module 'render-markdown' ---@type render.md.UserConfig opts = { latex = { enabled = false }, -- aucun convertisseur (utftex/latex2text) installé }, keys = { { "mp", function() require("render-markdown").toggle() end, ft = "markdown", desc = "Toggle Markdown render" }, }, }, }, -- Configure any other settings here. See the documentation for more details. -- colorscheme that will be used when installing plugins. install = { colorscheme = { "nord" } }, -- automatically check for plugin updates checker = { enabled = true }, })