Skip to main content

Improved Xonsh's Python completions using jedi

Project description

Xonsh Python completions using jedi.

If you like the idea click ⭐ on the repo and tweet.

Installation

To install use pip:

xpip install xontrib-jedi
# or: xpip install -U git+https://github.com/xonsh/xontrib-jedi

Usage

xontrib load jedi

import json
json.<Tab>

The xontrib swaps xonsh's built-in python completer for jedi_python. Other completers in the chain (including xonsh_imp, which completes __xonsh__.imp.<module>) are left alone, so they keep working as before.

Operator and shell-syntax tokens (<=, **, $(, @(, ,, …) are pulled from xonsh's own XONSH_EXPR_TOKENS, so the menu stays in sync with the host xonsh version. Keywords already produced by jedi (if, and, lambda, …) are filtered out to avoid duplicates.

Configuration

  • $XONTRIB_JEDI_FUZZY (bool, default False) — when True, jedi is called with fuzzy=True, so e.g. ooa matches foobar. Off by default since fuzzy mode returns more noisy candidates.
  • $XONTRIB_JEDI_CASE_SENSITIVE (bool, default False) — when True, jedi matches candidate names case-sensitively (sets jedi.settings.case_insensitive_completion = False). Off by default to match jedi's own default.

Examples:

$XONTRIB_JEDI_FUZZY = True
$XONTRIB_JEDI_CASE_SENSITIVE = True

Release

  • update the version in pyproject.toml
  • Create a new release with the same tag using Github releases

Credits

This package was created with xontrib template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xontrib_jedi-0.2.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xontrib_jedi-0.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file xontrib_jedi-0.2.0.tar.gz.

File metadata

  • Download URL: xontrib_jedi-0.2.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xontrib_jedi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4d530328a3b59ecd0284c52ddfbf6910384b50e10e80042b5359e86837604703
MD5 88bb8dbcd51d5abd62414282f87aaa55
BLAKE2b-256 e1981ccd24f0a3f2526693d61892fbb183ab2d53228f37c249207b8ca7d1974c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xontrib_jedi-0.2.0.tar.gz:

Publisher: release.yml on xonsh/xontrib-jedi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xontrib_jedi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xontrib_jedi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xontrib_jedi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e387175f194a27ab758d73c527b6af8b6a6b4d932ea722e16242fea58ad1c5b5
MD5 7b7bd7fd4358a0a063b74fa726565594
BLAKE2b-256 27f453eceabb0d3136a65171b5ad8fca9a7be4adda5d3471673371b4f6c18815

See more details on using hashes here.

Provenance

The following attestation bundles were made for xontrib_jedi-0.2.0-py3-none-any.whl:

Publisher: release.yml on xonsh/xontrib-jedi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page