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

Fix file path resolution to use GitHub root path #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joshuavial
Copy link
Owner

@joshuavial joshuavial commented May 16, 2024

Related to #7 (testing out copilot workspace)

Implements functionality to correctly handle file paths relative to the GitHub root path in the Aider Plugin for Neovim.

  • Determines GitHub root path: Adds a function get_git_root_path in lua/aider.lua that determines the GitHub root path using git rev-parse --show-toplevel.
  • Adjusts file paths: Modifies AiderOpen, AiderOnBufferOpen, and AiderOnBufferClose functions to prepend the GitHub root path to file paths before adding or managing them. This ensures that file paths are handled correctly when opened from outside the GitHub root.
  • Updates documentation: Enhances the README.md to include information on how the plugin now handles file paths relative to the GitHub root path, ensuring users are aware of the new functionality.

For more details, open the Copilot Workspace session.

@ikusteu
Copy link

ikusteu commented Oct 20, 2024

Any plans on merging this? I love using the tool, but this resolution issue gets really annoying (especially on JS monorepos with nvim using the root of the package as cwd, for a reason)

@aweis89 aweis89 mentioned this pull request Nov 27, 2024
@joshuavial
Copy link
Owner Author

I think this may be resolved with aider's new handling of file paths - will test more locally

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