dotfiles/home/.config/nvim/lua/plugins/init.lua

160 lines
4.1 KiB
Lua
Raw Normal View History

local fn = vim.fn
-- Install packer if it's not yet installed
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
2022-08-22 14:57:24 +03:00
if fn.empty(fn.glob(install_path)) > 0 then
2022-08-23 09:28:07 +03:00
print('Installing Packer')
2022-08-22 14:57:24 +03:00
Packer_bootstrap = fn.system({
'git', 'clone', '--depth', '1',
'https://github.com/wbthomason/packer.nvim', install_path
})
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' ..
vim.o.runtimepath
2022-08-23 09:28:07 +03:00
print('Installed Packer')
end
-- Configure packer
2022-08-22 14:57:24 +03:00
vim.cmd [[packadd packer.nvim]]
require('packer').startup(function()
2022-08-23 09:41:00 +03:00
local use = require('packer').use
-- The plugin manager itself
2022-08-23 09:41:00 +03:00
use {'wbthomason/packer.nvim', opt = true}
-- Colorscheme
use({'catppuccin/nvim', as = 'catppuccin'})
2021-08-18 09:29:44 +03:00
-- Git in signcolumn
use 'airblade/vim-gitgutter'
-- Statusline
use {
'hoob3rt/lualine.nvim',
requires = {'kyazdani42/nvim-web-devicons', opt = true}
}
-- Tabline/bufferline
use {
'akinsho/nvim-bufferline.lua',
tag = '*',
requires = 'kyazdani42/nvim-web-devicons'
}
2021-08-18 14:17:19 +03:00
-- Git commands
use 'tpope/vim-fugitive'
-- Indent characters
use 'lukas-reineke/indent-blankline.nvim'
-- Tree explorer
use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'}
2022-03-02 18:00:05 +02:00
-- Telescope
2022-03-02 17:50:32 +02:00
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}}
}
2022-03-02 18:00:05 +02:00
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} -- Use fzf for fuzzy finder
use {'nvim-telescope/telescope-ui-select.nvim'} -- Replace vim built in select with telescope
-- Do stuff as sudo
use 'lambdalisue/suda.vim'
2022-08-23 12:17:21 +03:00
-- Display possible keybinds
use {
'folke/which-key.nvim',
config = function()
require('which-key').setup {}
end
}
-- Read editorconfig settings
use 'editorconfig/editorconfig-vim'
-- Configs for built-in LSP
use 'neovim/nvim-lspconfig'
-- Install LSP server executables
2022-08-23 12:17:21 +03:00
use {'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim'}
2022-03-02 17:50:32 +02:00
-- Additional LSP features for Java
use 'mfussenegger/nvim-jdtls'
2022-02-24 18:08:59 +02:00
-- Display function signature
use {'ray-x/lsp_signature.nvim'}
-- Completion
2021-12-18 00:19:49 +02:00
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp
use 'hrsh7th/cmp-path' -- Path source for nvim-cmp
use 'petertriho/cmp-git' -- Git source for nvim-cmp
use 'hrsh7th/cmp-buffer' -- Buffer source for nvim-cmp
2021-12-18 00:19:49 +02:00
use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp
use 'L3MON4D3/LuaSnip' -- Snippets plugin
use 'rafamadriz/friendly-snippets' -- Snippets collection
-- Enable brackets for completions
use {
2022-08-23 12:17:21 +03:00
'windwp/nvim-autopairs',
config = function() require('nvim-autopairs').setup {} end
}
-- treesitter syntax highlight
2022-08-05 09:37:38 +03:00
use {
'nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({with_sync = true})
end
}
-- treesitter plugin for commentstring
use 'JoosepAlviste/nvim-ts-context-commentstring'
-- Additional plugins for formats not supported
-- by treesitter
use 'jamespeapen/swayconfig.vim'
-- mappings for commenting in code
use 'tpope/vim-commentary'
-- we all know this one
use 'tpope/vim-surround'
-- Formatter plugin
use 'sbdchd/neoformat'
-- Make editing passwords safer
use {
'https://git.zx2c4.com/password-store',
rtp = 'contrib/vim/redact_pass.vim'
}
2021-11-20 12:13:39 +02:00
-- Neovim inside Firefox
use {
'glacambre/firenvim',
run = function() vim.fn['firenvim#install'](0) end
}
2022-04-17 23:23:53 +03:00
-- Vim <3 Asciidoctor
use 'habamax/vim-asciidoctor'
2022-04-10 13:16:45 +03:00
end)
2022-08-23 09:28:07 +03:00
-- Sync plugins if Packer was just
-- installed
if Packer_bootstrap then
print('Syncing plugins')
require('packer').sync()
print('Synced')
end
2022-08-22 14:57:24 +03:00
-- Source configurations
require 'plugins/lualine'
require 'plugins/bufferline'
require 'plugins/lsp'
require 'plugins/completion'
require 'plugins/treesitter'
require 'plugins/indent-blankline'
require 'plugins/nvim-tree'
require 'plugins/colorscheme'
require 'plugins/telescope'