-- Install Packer automatically if it's not installed(Bootstraping) -- Hint: string concatenation is done by `..` local ensure_packer = function() local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) vim.cmd [[packadd packer.nvim]] return true end return false end local packer_bootstrap = ensure_packer() -- Reload configurations if we modify plugins.lua -- Hint -- - replaced with the filename of the buffer being manipulated vim.cmd([[ augroup packer_user_config autocmd! autocmd BufWritePost plugins.lua source | PackerSync augroup end ]]) -- Install plugins here - `use ...` -- Packer.nvim hints -- after = string or list, -- Specifies plugins to load before this plugin. See "sequencing" below -- config = string or function, -- Specifies code to run after this plugin is loaded -- requires = string or list, -- Specifies plugin dependencies. See "dependencies". -- ft = string or list, -- Specifies filetypes which load this plugin. -- run = string, function, or table, -- Specify operations to be run after successful installs/updates of a plugin return require('packer').startup(function(use) use 'wbthomason/packer.nvim' use 'tanvirtin/monokai.nvim' -- LSP use { 'neovim/nvim-lspconfig' } use { "williamboman/mason.nvim", run = ":MasonUpdate" } -- Complétion - UNE SEULE déclaration de chaque plugin use 'hrsh7th/nvim-cmp' use 'hrsh7th/cmp-nvim-lsp' use 'hrsh7th/cmp-path' use 'hrsh7th/cmp-cmdline' use 'L3MON4D3/LuaSnip' use 'saadparwaiz1/cmp_luasnip' -- Autres plugins use({ "iamcco/markdown-preview.nvim", run = function() vim.fn["mkdp#util#install"]() end, }) use { "luukvbaal/nnn.nvim", config = function() require("nnn").setup() end } use { 'https://git.plop.me/tfa/vim-log-highlighting' } use 'mzlogin/vim-markdown-toc' use 'dpelle/vim-LanguageTool' use { 'hat0uma/csvview.nvim', config = function() require('csvview').setup({ quote_char = '"', separator = ',', }) end } if packer_bootstrap then require('packer').sync() end end)