Replace vim-plug with lazy-nvim
This commit is contained in:
parent
aacc322e34
commit
bae8cdc462
1 changed files with 52 additions and 39 deletions
|
@ -48,43 +48,56 @@ vim.api.nvim_set_keymap("t", "<c-k>", "<c-\\><c-n><c-w>k", { noremap = true })
|
||||||
vim.api.nvim_set_keymap("t", "<c-h>", "<c-\\><c-n><c-w>h", { noremap = true })
|
vim.api.nvim_set_keymap("t", "<c-h>", "<c-\\><c-n><c-w>h", { noremap = true })
|
||||||
vim.api.nvim_set_keymap("t", "<c-l>", "<c-\\><c-n><c-w>l", { noremap = true })
|
vim.api.nvim_set_keymap("t", "<c-l>", "<c-\\><c-n><c-w>l", { noremap = true })
|
||||||
|
|
||||||
-- vim-plug
|
vim.keymap.set({"i", "n", "t", "v"}, "<F10>", function () vim.cmd("nohlsearch") end)
|
||||||
vim.cmd([[
|
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
||||||
silent !curl -fLo ~/.config/local/share/nvim/autoload/plug.vim --create-dirs
|
|
||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
|
|
||||||
function! Cond(cond, ...)
|
-- lazy.nvim
|
||||||
let opts = get(a:000, 0, {})
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
return a:cond ? extend(opts, { 'on': [], 'for': [] })
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
endfunction
|
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)
|
||||||
|
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
require("lazy").setup({
|
||||||
Plug 'williamboman/mason.nvim'
|
{
|
||||||
Plug 'williamboman/mason-lspconfig.nvim'
|
"dracula/vim",
|
||||||
Plug 'neovim/nvim-lspconfig'
|
name = "dracula",
|
||||||
Plug 'nvimdev/lspsaga.nvim'
|
lazy = false,
|
||||||
Plug 'nvim-lualine/lualine.nvim'
|
priority = 1000,
|
||||||
Plug 'nvim-tree/nvim-web-devicons'
|
config = function ()
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
vim.cmd([[colorscheme dracula]])
|
||||||
Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' }
|
end,
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
|
},
|
||||||
Plug 'neovim/nvim-lspconfig'
|
"williamboman/mason.nvim",
|
||||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
"williamboman/mason-lspconfig.nvim",
|
||||||
Plug 'hrsh7th/cmp-buffer'
|
"neovim/nvim-lspconfig",
|
||||||
Plug 'hrsh7th/cmp-path'
|
"nvimdev/lspsaga.nvim",
|
||||||
Plug 'hrsh7th/cmp-cmdline'
|
"nvim-lualine/lualine.nvim",
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
"nvim-tree/nvim-web-devicons",
|
||||||
Plug 'hrsh7th/cmp-vsnip'
|
"nvim-lua/plenary.nvim",
|
||||||
Plug 'hrsh7th/vim-vsnip'
|
{ "nvim-telescope/telescope.nvim", branch = "0.1.x" },
|
||||||
Plug 'tpope/vim-fugitive'
|
{
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
"nvim-treesitter/nvim-treesitter",
|
||||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
build = ":TSUpdate",
|
||||||
Plug 'tpope/vim-surround'
|
},
|
||||||
call plug#end()
|
"neovim/nvim-lspconfig",
|
||||||
]])
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
"hrsh7th/cmp-vsnip",
|
||||||
|
"hrsh7th/vim-vsnip",
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
"tpope/vim-surround",
|
||||||
|
})
|
||||||
|
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
require('mason-lspconfig').setup()
|
require('mason-lspconfig').setup()
|
||||||
|
|
Loading…
Reference in a new issue