my own vim

This commit is contained in:
Benjamin Kyd
2023-01-27 17:33:00 +00:00
parent 5476a67250
commit 15de8214c4
33 changed files with 1339 additions and 612 deletions

View File

@@ -0,0 +1,127 @@
local fn = vim.fn
local installPath = DATA_PATH..'/site/pack/packer/start/packer.nvim'
-- install packer if it's not installed already
local packerBootstrap = nil
if fn.empty(fn.glob(installPath)) > 0 then
packerBootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', installPath})
vim.cmd [[packadd packer.nvim]]
end
local packer = require('packer').startup(function(use)
-- Packer should manage itself
use 'wbthomason/packer.nvim'
-- colorscheme
use 'drewtempelmeyer/palenight.vim'
-- git integration
use {
'lewis6991/gitsigns.nvim',
requires = {
'nvim-lua/plenary.nvim'
}
}
-- surround vim
use 'tpope/vim-surround'
-- nerd commenter
use 'scrooloose/nerdcommenter'
-- status line
use 'glepnir/galaxyline.nvim'
-- show recent files on empty nvim command
use 'mhinz/vim-startify'
-- lsp config
use {
'neovim/nvim-lspconfig',
'williamboman/nvim-lsp-installer',
}
-- for LSP autocompletion
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-cmdline'
use 'hrsh7th/nvim-cmp'
-- For vsnip users.
use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/vim-vsnip'
-- TODO: prettify telescope vim, make it use regex & shorten the window
-- telescope - searching / navigation
use {
'nvim-telescope/telescope.nvim',
requires = { {'nvim-lua/plenary.nvim'} }
}
-- better hotfix window (for showing and searching through results in telescope's find usages)
-- TODO: learn how to use?
use {"kevinhwang91/nvim-bqf"}
-- better highlighting
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
config = function() require'nvim-tree'.setup {} end
}
-- which-key
use {
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
-- prettier tabs
use 'romgrk/barbar.nvim'
-- nice diagnostic pane on the bottom
use 'folke/lsp-trouble.nvim'
-- support the missing lsp diagnostic colors
use 'folke/lsp-colors.nvim'
-- better LSP UI (for code actions, rename etc.)
use 'tami5/lspsaga.nvim'
-- show indentation levels
use 'lukas-reineke/indent-blankline.nvim'
-- highlight variables under cursor
use 'RRethy/vim-illuminate'
-- this will automatically install listed dependencies
-- only the first time NeoVim is opened, because that's when Packer gets installed
if packerBootstrap then
require('packer').sync()
end
end)
-- plugin specific configs go here
require('plugin-config/nvim-cmp')
require('plugin-config/telescope')
require('plugin-config/nvim-tree')
require('plugin-config/nvim-treesitter')
require('plugin-config/barbar')
require('plugin-config/lsp-colors')
require('plugin-config/lsp-trouble')
require('plugin-config/lspsaga')
require('plugin-config/galaxyline')
require('plugin-config/gitsigns')
require('plugin-config/indent-guide-lines')
return packer