Modified to ensure Packer installed

This commit is contained in:
Nefrace 2024-06-10 04:58:49 +03:00
parent f6e1288059
commit a28eae433a
3 changed files with 28 additions and 1 deletions

View File

@ -40,7 +40,7 @@ require'lspconfig'.gdscript.setup{}
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {'tsserver', 'eslint', 'rust_analyzer', 'gopls'},
ensure_installed = {'rust_analyzer', 'gopls'},
handlers = {
lsp.default_setup,
lua_ls = function()

View File

@ -1,2 +1,4 @@
require("nefrace.packerensure")
require("nefrace.packer")
require("nefrace.remap")
require("nefrace.set")

View File

@ -0,0 +1,25 @@
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('nefrace.packer').startup(function(use)
use 'wbthomason/packer.nvim'
-- My plugins here
-- use 'foo1/bar1.nvim'
-- use 'foo2/bar2.nvim'
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('nefrace.packer').sync()
end
end)