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.shiftwidth = 2
vim.opt.expandtab = false vim.opt.expandtab = false
vim.opt.relativenumber = true 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-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" }, "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rose-pine": { "branch": "main", "commit": "b6fe88c3282cf9f117a3e836d761c2d78d02f417" }, "rose-pine": { "branch": "main", "commit": "b6fe88c3282cf9f117a3e836d761c2d78d02f417" },
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
"suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },

View File

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

View File

@ -1,19 +1,4 @@
-- bootstrap lazy return {
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', 'rose-pine/neovim',
name = 'rose-pine', name = 'rose-pine',
@ -54,6 +39,13 @@ return require('lazy').setup {
}, },
config = true, config = true,
}, },
{
"ahmedkhalf/project.nvim",
config = function()
require("project_nvim").setup {
}
end
},
'lambdalisue/suda.vim', 'lambdalisue/suda.vim',
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
@ -64,7 +56,9 @@ return require('lazy').setup {
}, },
{ {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
config = function() require 'nvim-treesitter.configs'.setup({}) end, config = function() require 'nvim-treesitter.configs'.setup({
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp" }
}) end,
build = function() build = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update() ts_update()
@ -85,4 +79,3 @@ return require('lazy').setup {
}, },
'direnv/direnv.vim' 'direnv/direnv.vim'
} }
}