nvim: packer -> lazy
This commit is contained in:
16
tree/.config/nvim/lua/lazy.lua
Normal file
16
tree/.config/nvim/lua/lazy.lua
Normal file
@ -0,0 +1,16 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
@ -12,7 +12,7 @@ opt.signcolumn = "yes" -- str: Show the sign column
|
||||
|
||||
-- [[ Filetypes ]]
|
||||
opt.encoding = 'utf8' -- str: String encoding to use
|
||||
opt.fileencoding = 'utf8' -- str: File encoding to use
|
||||
-- opt.fileencoding = 'utf8' -- str: File encoding to use
|
||||
vim.filetype.add({extension = {wgsl = "wgsl"}})
|
||||
|
||||
-- [[ Theme ]]
|
||||
|
||||
@ -1,127 +1,52 @@
|
||||
-- vim.cmd([[
|
||||
-- augroup packer_user_config
|
||||
-- autocmd!
|
||||
-- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
-- augroup end
|
||||
-- ]])
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- install plugins
|
||||
{ 'nvim-treesitter/nvim-treesitter', opts = {} },
|
||||
{ 'ellisonleao/gruvbox.nvim' },
|
||||
{ 'danilamihailov/beacon.nvim' },
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
-- -- language server stuff
|
||||
{'williamboman/mason.nvim' },
|
||||
{'williamboman/mason-lspconfig.nvim' },
|
||||
{'neovim/nvim-lspconfig' },
|
||||
{'simrat39/rust-tools.nvim' },
|
||||
|
||||
-- Simple plugins can be specified as strings
|
||||
use 'rstacruz/vim-closer'
|
||||
-- -- nushell support
|
||||
-- --use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
|
||||
{ 'LhKipp/nvim-nu' },
|
||||
|
||||
-- Lazy loading:
|
||||
-- Load on specific commands
|
||||
use {'tpope/vim-dispatch', opt = true, cmd = {'Dispatch', 'Make', 'Focus', 'Start'}}
|
||||
-- -- Completion framework:
|
||||
{ 'hrsh7th/nvim-cmp' },
|
||||
|
||||
-- Load on an autocommand event
|
||||
use {'andymass/vim-matchup', event = 'VimEnter'}
|
||||
-- -- LSP completion source:
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
|
||||
-- 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]]'
|
||||
}
|
||||
-- -- Useful completion sources:
|
||||
{ 'hrsh7th/cmp-nvim-lua' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
|
||||
{ 'hrsh7th/cmp-vsnip' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/vim-vsnip' },
|
||||
|
||||
-- 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}}
|
||||
}
|
||||
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x',
|
||||
dependencies = {'nvim-lua/plenary.nvim' }
|
||||
},
|
||||
|
||||
-- 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'
|
||||
|
||||
-- You can alias plugin names
|
||||
use {'dracula/vim', as = 'dracula'}
|
||||
|
||||
-- example plugins above
|
||||
-- my stuff below
|
||||
use 'ellisonleao/gruvbox.nvim'
|
||||
use 'danilamihailov/beacon.nvim'
|
||||
use "nvim-lua/plenary.nvim"
|
||||
use {
|
||||
'folke/todo-comments.nvim',
|
||||
event = 'VimEnter',
|
||||
requires = { 'nvim-lua/plenary.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'
|
||||
|
||||
-- nushell support
|
||||
--use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
|
||||
use 'LhKipp/nvim-nu'
|
||||
|
||||
-- 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-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 }
|
||||
}
|
||||
|
||||
use "Pocco81/auto-save.nvim"
|
||||
end)
|
||||
-- -- status line
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
--requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
||||
},
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user