108 lines
3.3 KiB
Lua
108 lines
3.3 KiB
Lua
|
|
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()
|
||
|
|
|
||
|
|
local status, packer = pcall(require, "packer")
|
||
|
|
|
||
|
|
if (not status) then
|
||
|
|
print("Packer is not installed")
|
||
|
|
return
|
||
|
|
end
|
||
|
|
|
||
|
|
return packer.startup(function(use)
|
||
|
|
use 'wbthomason/packer.nvim'
|
||
|
|
|
||
|
|
-- appearances
|
||
|
|
use 'projekt0n/github-nvim-theme'
|
||
|
|
use 'nvim-lualine/lualine.nvim' -- Statusline
|
||
|
|
|
||
|
|
-- LSP and completion
|
||
|
|
use 'nvim-lua/plenary.nvim' -- Common utilities
|
||
|
|
use 'neovim/nvim-lspconfig' -- LSP
|
||
|
|
use 'onsails/lspkind-nvim' -- vscode-like pictograms
|
||
|
|
use 'hrsh7th/cmp-buffer' -- nvim-cmp source for buffer words
|
||
|
|
use 'hrsh7th/cmp-path' -- completion pathname
|
||
|
|
use 'hrsh7th/cmp-nvim-lsp' -- nvim-cmp source for neovim's built-in LSP
|
||
|
|
use 'hrsh7th/nvim-cmp' -- Completion
|
||
|
|
use 'jose-elias-alvarez/null-ls.nvim' -- inject LSP diagnostics, code actions
|
||
|
|
use 'glepnir/lspsaga.nvim' -- LSP UIs
|
||
|
|
use 'mason-org/mason.nvim' -- manage lsp
|
||
|
|
use "mason-org/mason-lspconfig.nvim" -- bridge mason with lspconfig
|
||
|
|
|
||
|
|
-- Snippets
|
||
|
|
use 'L3MON4D3/LuaSnip'
|
||
|
|
use 'honza/vim-snippets'
|
||
|
|
|
||
|
|
-- code fasters
|
||
|
|
use 'Raimondi/delimitMate' -- auto close colon
|
||
|
|
use 'mattn/emmet-vim' -- emmet for vim
|
||
|
|
use 'tpope/vim-surround' -- just tpope the GOD OF VIM
|
||
|
|
use 'ap/vim-css-color' -- colors display
|
||
|
|
use 'numToStr/Comment.nvim' -- comments tools
|
||
|
|
use 'mhartington/formatter.nvim' -- format code
|
||
|
|
use 'AndrewRadev/splitjoin.vim' -- refactor plugin
|
||
|
|
use 'RRethy/vim-illuminate' -- highlight other uses of the word under the cursor
|
||
|
|
use 'folke/trouble.nvim' -- better diagnostics
|
||
|
|
|
||
|
|
-- Ruby development
|
||
|
|
use 'vim-ruby/vim-ruby'
|
||
|
|
use 'tpope/vim-rails'
|
||
|
|
use 'tpope/vim-endwise' -- autoclose function
|
||
|
|
|
||
|
|
-- javacript development
|
||
|
|
use 'peitalin/vim-jsx-typescript'
|
||
|
|
use 'pangloss/vim-javascript'
|
||
|
|
use 'leafgarland/typescript-vim'
|
||
|
|
|
||
|
|
-- GraphQl
|
||
|
|
use 'jparise/vim-graphql'
|
||
|
|
|
||
|
|
-- Rust development
|
||
|
|
use 'rust-lang/rust.vim'
|
||
|
|
use { 'saecki/crates.nvim', requires = { 'nvim-lua/plenary.nvim' } }
|
||
|
|
|
||
|
|
-- IA
|
||
|
|
use { "zbirenbaum/copilot.lua" }
|
||
|
|
|
||
|
|
-- Testing
|
||
|
|
use { 'vim-test/vim-test' }
|
||
|
|
|
||
|
|
-- others utilities
|
||
|
|
use 'nvim-telescope/telescope.nvim' -- equivalent ctrl-p, fzf
|
||
|
|
use({ "kelly-lin/telescope-ag", requires = { { "nvim-telescope/telescope.nvim" } } }) -- silver search with telescope
|
||
|
|
use 'windwp/nvim-autopairs' -- auto brackets pairing
|
||
|
|
use 'lewis6991/gitsigns.nvim' -- git graphic helpers
|
||
|
|
use 'bronson/vim-trailing-whitespace' -- detect trailing-whitespace
|
||
|
|
use 'nvim-tree/nvim-web-devicons' -- use devicons
|
||
|
|
-- File explorer moderne
|
||
|
|
use {
|
||
|
|
'nvim-neo-tree/neo-tree.nvim',
|
||
|
|
branch = 'v3.x',
|
||
|
|
requires = {
|
||
|
|
'nvim-lua/plenary.nvim',
|
||
|
|
'nvim-tree/nvim-web-devicons',
|
||
|
|
'MunifTanjim/nui.nvim',
|
||
|
|
}
|
||
|
|
}
|
||
|
|
use "luukvbaal/stabilize.nvim" -- to fix my fucking headache when openclosed panes
|
||
|
|
use 'f-person/git-blame.nvim'
|
||
|
|
use {'akinsho/git-conflict.nvim', tag = "*", config = function() -- conflict management
|
||
|
|
require('git-conflict').setup()
|
||
|
|
end}
|
||
|
|
|
||
|
|
if packer_bootstrap then
|
||
|
|
require('packer').sync()
|
||
|
|
end
|
||
|
|
end)
|