Skip to content

Conversation

@rrvsh
Copy link
Contributor

@rrvsh rrvsh commented Jun 29, 2025

This PR adds uv.nvim, which adds the UV package manager functionality, primarily being able to activate virtual environments inside neovim for use with LSPs.

i added it as languages.python.uv.* but it could easily fit under vim.utility as well - let me know if I should make this change

Sanity Checking

  • I have updated the changelog as per my changes
  • I have tested, and self-reviewed my code
  • My changes fit guidelines found in hacking nvf
  • Style and consistency
    • I ran Alejandra to format my code (nix fmt)
    • My code conforms to the editorconfig configuration of the project
    • My changes are consistent with the rest of the codebase
  • If new changes are particularly complex:
    • My code includes comments in particularly complex areas
    • I have added a section in the manual
    • (For breaking changes) I have included a migration guide
  • Package(s) built:
    • .#nix (default package)
    • .#maximal
    • .#docs-html (manual, must build)
    • .#docs-linkcheck (optional, please build if adding links)
  • Tested on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Add a 👍 reaction to pull requests you find important.

@github-actions
Copy link

github-actions bot commented Jun 29, 2025

🚀 Live preview deployed from 5bad5dd

View it here:

Debug Information

Triggered by: rrvsh

HEAD at: uv-nvim

Reruns: 1008

@rrvsh
Copy link
Contributor Author

rrvsh commented Jun 29, 2025

sorry clicked the evil github update branch button give me a second to force push to rebase onto main

Copy link
Owner

@NotAShelf NotAShelf left a comment

Choose a reason for hiding this comment

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

Looks good. I don't use Python, or uv, myself but I'm sure this'll be useful to have.

I'd like to ask you to move it under vim.languages.python.extensions, you can take a look at the Markdown and Typst module to see an example but it's really straightforward. LGTM otherwise.

inherit (cfg.uv) setupOpts;
# Plugin should be loaded whenever we enter a buffer
# so it can load the uv virtual environment.
event = ["BufEnter"];
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not FileType python? or even BufEnter *.py if there are event order issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants