.dotfiles/nvim/lua/plugins.lua

128 lines
3.6 KiB
Lua

-- Join paths
local function join(...)
local sep = '/'
return table.concat({ ... }, sep)
end
-- Packer paths and files
local home = os.getenv 'HOME'
local homepath = join(home, '.var', 'app', 'io.neovim.nvim', 'data', 'site')
local pack_path = join(homepath)
local package_root = join(pack_path, 'pack')
-- Bootstrap packer
local ensure_packer = function()
local fn = vim.fn
local packer_install_path = join(package_root, 'packer', 'start', 'packer.nvim')
if fn.empty(fn.glob(packer_install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', packer_install_path})
return true
end
return false
end
local packer_bootstrap = ensure_packer()
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
use 'wbthomason/packer.nvim'
-- Add plugins here:
use { "ellisonleao/gruvbox.nvim" }
-- TreeSitter - Syntax highlighting
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
require 'nvim-treesitter.configs'.setup {
highlight = {
enable = false,
disable = { }
},
ensure_installed = {
"bash",
"c",
"cmake",
"cpp",
"css",
"dart",
"html",
"javascript",
"json",
"lua",
"make",
"markdown",
"perl",
"php",
"rasi",
"toml",
"vim",
"yaml",
},
sync_install = true,
ignore_install = { },
highlight = {
enable = true,
disable = { "" },
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { "python", "python2", "python3" },
},
}
-- Fold-Cycle - Better management of foldable blocks
use 'jghauser/fold-cycle.nvim'
use { 'yamatsum/nvim-cursorline',
config = function()
require('nvim-cursorline').setup({
cursorline = {
enable = true,
timeout = 0,
number = true,
hl = {
underline = false,
},
},
cursorword = {
enable = true,
min_length = 1,
hl = {
underline = false,
bold = true
},
}
})
end
}
-- LSP - Language Server Protocol
--use 'neovim/nvim-lspconfig'
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-cmdline'
use 'hrsh7th/nvim-cmp'
-- Search
use { 'nvim-telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}} }
use 'tpope/vim-eunuch'
use 'tpope/vim-surround'
use 'tpope/vim-vinegar'
use 'kyazdani42/nvim-web-devicons'
-- Testing
use 'vim-test/vim-test'
-- Git
use 'tpope/vim-fugitive'
use 'vim-airline/vim-airline'
use 'vim-airline/vim-airline-themes'
use 'airblade/vim-gitgutter'
-- Lightline - lightweight status/tabline beautification
use 'itchyny/lightline.vim'
-- Nerdtree - Tree explorer
use 'preservim/nerdtree'
-- Conqueror of Completion
use { 'hrsh7th/nvim-compe' }
use { 'neoclide/coc.nvim', branch = 'release'}
use { 'bmeneg/coc-perl', run = 'yarn install && yarn build'}
-- use 'dart-lang/dart-vim-plugin'
if packer_bootstrap then
require('packer').sync()
end
end)