Separating plugin manager instalation from configuration
This commit is contained in:
parent
834e294b9e
commit
9ef80b2ace
3
init.lua
3
init.lua
|
|
@ -103,4 +103,5 @@ require 'keymaps'
|
|||
require 'autocommands'
|
||||
|
||||
-- [[ Lazy package manager ]]
|
||||
require 'lazy'
|
||||
require 'lazy-install'
|
||||
require 'lazy-config'
|
||||
|
|
|
|||
|
|
@ -1,13 +1,6 @@
|
|||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
||||
end ---@diagnostic disable-next-line: undefined-field
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- [[ Configure and install plugins ]]
|
||||
-- Definitions
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
--
|
||||
-- To check the current status of your plugins, run
|
||||
-- :Lazy
|
||||
|
|
@ -249,7 +242,7 @@ require('lazy').setup({
|
|||
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
||||
-- function will be executed to configure the current buffer
|
||||
autocmd('LspAttach', {
|
||||
group = augroup('kickstart-lsp-attach', { clear = true }),
|
||||
group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
|
||||
-- to define small helper and utility functions so you don't have to repeat yourself.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
||||
end ---@diagnostic disable-next-line: undefined-field
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
Loading…
Reference in New Issue