Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Use other than "LazyVim/LazyVim" as source repo #112

Closed
3 tasks done
TheJoeSchr opened this issue Jan 23, 2023 · 3 comments
Closed
3 tasks done

bug: Use other than "LazyVim/LazyVim" as source repo #112

TheJoeSchr opened this issue Jan 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@TheJoeSchr
Copy link
Contributor

TheJoeSchr commented Jan 23, 2023

Did you check docs and existing issues?

  • I have read all the LazyVim docs
  • I have searched the existing issues of LazyVim
  • I have searched the exsiting issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.0-dev-594+gc590641feb Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 C

Operating system/version

6.1.1-1-MANJARO #1 SMP PREEMPT_DYNAMIC

Describe the bug

So I'm trying to load my own fork of LazyVim to experiment with getting rid of some plugins, keymaps, etc.

But I'm getting this error after opening nvim for the second time on a fresh install:

Failed (1)
                     ● LazyVim 1.35ms  start     ■■ origin failed
                         Origin has changed:
                           * old: https://github.com/TheJoeSchr/LazyVim
                           * new: https://github.com/LazyVim/LazyVim.git
                         Please run update to fix

Steps To Reproduce

I was using the starter as source, so the file/folder structure is accordingly. I posted the complete lazy.lua in belows field for init.lua

prerequisite: rm -rf ~/.local/share/nvim/lazy

  1. open config/lazy.lua
  2. replace
-- { "LazyVim/LazyVim", import = "lazyvim.plugins" },
  1. with
 { "TheJoeSchr/LazyVim", dir = "~/.local/share/nvim/lazy/LazyVimJoe/", import = "lazyvim.plugins" },

3a. (or optionally with same dirmane) { dir = "~/.local/share/nvim/lazy/LazyVim/", import = "lazyvim.plugins" },
3b. (also tried directly cloning it:) git clone https://github.com/TheJoeSchr/LazyVim ~/.local/share/nvim/lazy/LazyVim/
4. open nvim, let everything Install => all should be fine
5. close and reopen => above error

Expected Behavior

Letting me use my own fork. Or even preferably a easy way to slim down plugins and keymaps not needed. I'm converting my original init.vim and :checkhealth WhichKey crashes and :checkhealth Lazy complains about quite a lot of overrides. So that's why I thought I try this route.

Repro

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- bootstrap lazy.nvim
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

require("lazy").setup({
  spec = {
    -- import LazyVim plugins
    -- { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    -- { "TheJoeSchr/LazyVim", dir = "~/.local/share/nvim/lazy/LazyVimJoe/", import = "lazyvim.plugins" },
    { dir = "~/.local/share/nvim/lazy/LazyVimJoe/", import = "lazyvim.plugins" },
    { import = "plugins" },
    -- import any extras modules here
    -- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
    -- treesitter, mason and typescript.nvim. So instead of the above, you can use:
    { import = "lazyvim.plugins.extras.lang.typescript" },
    -- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
    { import = "lazyvim.plugins.extras.lang.json" },
    -- use my own mini.starter instead of LazyVim's
    { import = "plugins.extras.ui.mini-starter" },
  },
  defaults = {
    -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
    -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
    lazy = false,
    -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
    -- have outdated releases, which may break your Neovim install.
    version = false, -- always use the latest git commit
    -- version = "*", -- try installing the latest stable version for plugins that support semver
  },
  install = { colorscheme = { "tokyonight", "habamax" } },
  checker = { enabled = true }, -- automatically check for plugin updates
  performance = {
    rtp = {
      -- disable some rtp plugins
      disabled_plugins = {
        "gzip",
        "matchit",
        "matchparen",
        -- "netrwPlugin",
        "tarPlugin",
        "tohtml",
        "tutor",
        "zipPlugin",
      },
    },
  },
})
@TheJoeSchr TheJoeSchr added the bug Something isn't working label Jan 23, 2023
@folke
Copy link
Collaborator

folke commented Jan 23, 2023

You're of course free to fork this repo and do with it what you want, but I hope you understand that I don't support this. I have to chose where I spend my time. You're on your own

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
@TheJoeSchr
Copy link
Contributor Author

Of course. But do you have any idea why the origin always switches back? is it somewhere hardcoded as "LazyVim/LazyVim" as fallback or something?

All I want to do is to have a copy to debug stuff and get a minimal base going before adding more and more stuff back in agaim.

@folke
Copy link
Collaborator

folke commented Jan 23, 2023

Check lua/lazyvim/plugins/core.lua remove that lazyVim spec there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants