Skip to content

nvim: don't clone lazy.nvim into the current directory - #23

Open
presto8 wants to merge 1 commit into
mainfrom
fix/lazy-nvim-clone-cwd
Open

presto8 wants to merge 1 commit into
mainfrom
fix/lazy-nvim-clone-cwd

Conversation

@presto8

@presto8 presto8 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

setup_nvim ran 'git clone ... lazy.nvim.git --branch=stable' with no
destination argument, so the clone landed in $PWD rather than under
~/.local/share/nvim/lazy. Running the script from a checkout of this
repo left a stray lazy.nvim/ directory in the working tree.

The clone was redundant regardless: init.lua already bootstraps
lazy.nvim into stdpath('data')/lazy/lazy.nvim on first launch.


🤖 Generated with Claude Code

setup_nvim ran 'git clone ... lazy.nvim.git --branch=stable' with no
destination argument, so the clone landed in $PWD rather than under
~/.local/share/nvim/lazy. Running the script from a checkout of this
repo left a stray lazy.nvim/ directory in the working tree.

The clone was redundant regardless: init.lua already bootstraps
lazy.nvim into stdpath('data')/lazy/lazy.nvim on first launch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Dropping the mkdir -p ~/.local/share/nvim/lazy step can cause the init.lua bootstrap git clone to fail when the intermediate lazy/ directory does not exist.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the setup_nvim installer logic to avoid leaving an unintended lazy.nvim/ clone in the caller’s working directory, and instead rely on the existing Neovim config’s lazy.nvim bootstrap behavior.

Changes:

  • Removed the git clone of folke/lazy.nvim from setup_nvim (previously cloned into $PWD due to missing destination).
  • Added an inline note clarifying that lazy.nvim is bootstrapped on first Neovim launch via init.lua.
File summaries
File Description
setup Removes redundant/incorrect lazy.nvim cloning step from setup_nvim.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread setup
local nvimdata="$HOME/.local/share/nvim"
mkdir -p "$nvimdata"/lazy
git clone --filter=blob:none https://github.com/folke/lazy.nvim.git --branch=stable
# lazy.nvim bootstraps itself on first nvim launch; see init.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants