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