feat: move lazy config to file for reloading

This commit is contained in:
Fey Naomi Schrewe 2024-09-07 10:31:18 +02:00
parent dadc8060ca
commit 48f9e170aa
4 changed files with 97 additions and 86 deletions

View File

@ -9,3 +9,19 @@ vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = false
vim.opt.relativenumber = true
-- bootstrap lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup('plugins')

View File

@ -21,6 +21,7 @@
"nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rose-pine": { "branch": "main", "commit": "b6fe88c3282cf9f117a3e836d761c2d78d02f417" },
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
"suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },

View File

@ -4,6 +4,7 @@ local lspconfig = require('lspconfig')
lspconfig.lua_ls.setup {}
lspconfig.tsserver.setup {}
lspconfig.ccls.setup {}
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions

View File

@ -1,88 +1,81 @@
-- bootstrap lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
return require('lazy').setup {
spec = {
{
'rose-pine/neovim',
name = 'rose-pine',
config = function() vim.cmd [[colorscheme rose-pine-moon]] end
return {
{
'rose-pine/neovim',
name = 'rose-pine',
config = function() vim.cmd [[colorscheme rose-pine-moon]] end
},
{
"L3MON4D3/LuaSnip",
version = "v2.*",
build = "make install_jsregexp"
},
'saadparwaiz1/cmp_luasnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
{
'hrsh7th/nvim-cmp',
config = function() require 'cmp-setup' end
},
"lukas-reineke/cmp-under-comparator",
'folke/neodev.nvim',
{ 'neovim/nvim-lspconfig', config = function() require 'lsp-setup' end, after = 'neodev.nvim' },
'simrat39/rust-tools.nvim',
'mfussenegger/nvim-dap',
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
},
{
"NeogitOrg/neogit",
version = "v0.0.1",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
},
{
"L3MON4D3/LuaSnip",
version = "v2.*",
build = "make install_jsregexp"
},
'saadparwaiz1/cmp_luasnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
{
'hrsh7th/nvim-cmp',
config = function() require 'cmp-setup' end
},
"lukas-reineke/cmp-under-comparator",
'folke/neodev.nvim',
{ 'neovim/nvim-lspconfig', config = function() require 'lsp-setup' end, after = 'neodev.nvim' },
'simrat39/rust-tools.nvim',
'mfussenegger/nvim-dap',
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
},
{
"NeogitOrg/neogit",
version = "v0.0.1",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
},
config = true,
},
'lambdalisue/suda.vim',
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
config = function()
require("nvim-surround").setup({})
end
},
{
'nvim-treesitter/nvim-treesitter',
config = function() require 'nvim-treesitter.configs'.setup({}) end,
build = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
},
{
'theblob42/drex.nvim',
dependencies = 'kyazdani42/nvim-web-devicons',
config = function()
vim.keymap.set('n', '<F2>', ':DrexDrawerToggle<CR>')
end
},
{
"klen/nvim-test",
config = function()
require('nvim-test').setup()
end
},
'direnv/direnv.vim'
}
config = true,
},
{
"ahmedkhalf/project.nvim",
config = function()
require("project_nvim").setup {
}
end
},
'lambdalisue/suda.vim',
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
config = function()
require("nvim-surround").setup({})
end
},
{
'nvim-treesitter/nvim-treesitter',
config = function() require 'nvim-treesitter.configs'.setup({
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp" }
}) end,
build = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
},
{
'theblob42/drex.nvim',
dependencies = 'kyazdani42/nvim-web-devicons',
config = function()
vim.keymap.set('n', '<F2>', ':DrexDrawerToggle<CR>')
end
},
{
"klen/nvim-test",
config = function()
require('nvim-test').setup()
end
},
'direnv/direnv.vim'
}