feat: move lazy config to file for reloading
This commit is contained in:
parent
dadc8060ca
commit
48f9e170aa
16
init.lua
16
init.lua
@ -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')
|
||||
|
||||
@ -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" },
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,19 +1,4 @@
|
||||
-- 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 = {
|
||||
return {
|
||||
{
|
||||
'rose-pine/neovim',
|
||||
name = 'rose-pine',
|
||||
@ -54,6 +39,13 @@ return require('lazy').setup {
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"ahmedkhalf/project.nvim",
|
||||
config = function()
|
||||
require("project_nvim").setup {
|
||||
}
|
||||
end
|
||||
},
|
||||
'lambdalisue/suda.vim',
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
@ -64,7 +56,9 @@ return require('lazy').setup {
|
||||
},
|
||||
{
|
||||
'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()
|
||||
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
|
||||
ts_update()
|
||||
@ -85,4 +79,3 @@ return require('lazy').setup {
|
||||
},
|
||||
'direnv/direnv.vim'
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user