nvim: Switch to lua for all the things

This commit is contained in:
2023-10-21 12:54:32 +02:00
parent 7c6fd745cd
commit 059ac7737b
10 changed files with 731 additions and 296 deletions

View File

@ -0,0 +1,116 @@
-- vim.cmd([[
-- augroup packer_user_config
-- autocmd!
-- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
-- augroup end
-- ]])
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Simple plugins can be specified as strings
use 'rstacruz/vim-closer'
-- Lazy loading:
-- Load on specific commands
use {'tpope/vim-dispatch', opt = true, cmd = {'Dispatch', 'Make', 'Focus', 'Start'}}
-- Load on an autocommand event
use {'andymass/vim-matchup', event = 'VimEnter'}
-- Load on a combination of conditions: specific filetypes or commands
-- Also run code after load (see the "config" key)
use {
'w0rp/ale',
ft = {'sh', 'zsh', 'bash', 'c', 'cpp', 'cmake', 'html', 'markdown', 'racket', 'vim', 'tex'},
cmd = 'ALEEnable',
config = 'vim.cmd[[ALEEnable]]'
}
-- Plugins can have dependencies on other plugins
use {
'haorenW1025/completion-nvim',
opt = true,
requires = {{'hrsh7th/vim-vsnip', opt = true}, {'hrsh7th/vim-vsnip-integ', opt = true}}
}
-- Plugins can also depend on rocks from luarocks.org:
--use {
-- 'my/supercoolplugin',
-- rocks = {'lpeg', {'lua-cjson', version = '2.1.0'}}
--}
-- You can specify rocks in isolation
use_rocks 'penlight'
use_rocks {'lua-resty-http', 'lpeg'}
-- Local plugins can be included
--use '~/projects/personal/hover.nvim'
-- Plugins can have post-install/update hooks
use {'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', cmd = 'MarkdownPreview'}
-- Post-install/update hook with neovim command
use 'nvim-treesitter/nvim-treesitter'
-- Post-install/update hook with call of vimscript function with argument
use { 'glacambre/firenvim', run = function() vim.fn['firenvim#install'](0) end }
-- Use specific branch, dependency and run lua file after load
--use {
-- 'glepnir/galaxyline.nvim', branch = 'main', config = function() require'statusline' end,
-- requires = {'kyazdani42/nvim-web-devicons'}
--}
-- Use dependency and run lua function after load
--use {
-- 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' },
-- config = function() require('gitsigns').setup() end
--}
-- You can specify multiple plugins in a single call
use {'tjdevries/colorbuddy.vim', {'nvim-treesitter/nvim-treesitter', opt = true}}
-- You can alias plugin names
use {'dracula/vim', as = 'dracula'}
-- example plugins above
-- my stuff below
use 'ellisonleao/gruvbox.nvim'
use 'danilamihailov/beacon.nvim'
-- language server stuff
use 'williamboman/mason.nvim'
use 'williamboman/mason-lspconfig.nvim'
use 'neovim/nvim-lspconfig'
use 'simrat39/rust-tools.nvim'
use 'WhoIsSethDaniel/lualine-lsp-progress.nvim'
-- Completion framework:
use 'hrsh7th/nvim-cmp'
-- LSP completion source:
use 'hrsh7th/cmp-nvim-lsp'
-- Useful completion sources:
use 'hrsh7th/cmp-nvim-lua'
use 'hrsh7th/cmp-nvim-lsp-signature-help'
use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/vim-vsnip'
-- telescope
use "nvim-lua/plenary.nvim"
use {
'nvim-telescope/telescope.nvim', branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
-- status line
use {
'nvim-lualine/lualine.nvim',
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
end)