change: nvim: packer -> lazy.nvim

switched plugin manager
This commit is contained in:
qwjyh 2023-03-12 01:39:11 +09:00
parent b8fff8602e
commit d4378f82d1
2 changed files with 35 additions and 32 deletions

View file

@ -1,4 +1,38 @@
--print("init.lua loaded")
-----------------------------------------------------------
-- Installing plugin manager 'lazy.nvim'
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not 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)
-- Installing plugins
require('lazy').setup({
-- fzf
{ 'ibhagwan/fzf-lua',
-- optional icon
--requires = { 'kyazdan142/nvim-web/devicons' } -- not found
},
-- lualine(statusline)
{
'nvim-lualine/lualine.nvim',
dependencies = { 'kyazdani42/nvim-web-devicons', lazy = true }
},
'neovim/nvim-lspconfig',
{
'hrsh7th/nvim-cmp',
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' },
},
})
-----------------------------------------------------------
-- basic configurations
vim.o.number = true
@ -41,10 +75,6 @@ if vim.fn.has('win32') == 1 then
end
-----------------------------------------------------------
-- Plugins
require 'plugins'
--vim.cmd [[autocmd BufWritePost plugins.lua PackerCompile]]
-----------------------------------------------------------
-- LSP config

View file

@ -1,27 +0,0 @@
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
-- fzf
use { 'ibhagwan/fzf-lua',
-- optional icon
--requires = { 'kyazdan142/nvim-web/devicons' } -- not found
}
-- lualine(statusline)
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
-- LSP
use 'neovim/nvim-lspconfig'
use "williamboman/mason.nvim"
use "williamboman/mason-lspconfig.nvim"
use "hrsh7th/nvim-cmp"
use "hrsh7th/cmp-nvim-lsp"
use "hrsh7th/vim-vsnip"
end)