Skip to content

nova-python/Python.novaextension

Repository files navigation

🔋 A batteries-included Python extension for Nova!

What's in the box?

  • Integration with several language servers:
  • Code formatting using:
  • Linting (and import organization) with Ruff
  • A Virtual Environment task for running a script or Python module as though the project's virtual environment is active
  • A Cleanup task for clearing out Python cache files, build artifacts, and other files/directories
  • A tree-sitter based syntax for requirements.txt files, based off of tree-sitter-requirements
  • A sidebar showing all packages installed in your configured Python environment, along with any outdated versions, and optionally any known vulnerabilities using pip-audit

Python Sidebar

Requirements

If you use Homebrew, the easiest way to get started is:

brew install pyright pyrefly ty uv ruff pip-audit

This extension will try to find tools installed on your PATH, so installing into your virtual environment or another location should work, as well.

Language Server Configuration

Selecting which language server to use can be done in Nova's extension and project settings dialogs.

Further configuration is done by writing the specific settings defined by each language server directly into .nova/Configuration.json. See the following documentaion for available settings:

For example :

{
  "python.langServer" : "pyright",
  "python.analysis.diagnosticMode": "workspace"
}
{
  "python.langServer" : "ty",
  "ty.configurationFile": "\/Users\/johndoe\/.config\/ty.toml"
}

Note: Previous versions allowed setting certain Pyright-specific settings through the UI. These UI options have been removed since settings differ greatly between language servers.

Acknowledgements

This project drew inspiration (and code!) from many others that came before it:

Attributions

About

Python for Nova

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •