Skip to main content

A PyQt GUI for Neovim

Project description

Welcome to Nysor

Yet another graphical interface for Neovim.

Written in Python, with Qt.

logo

Pronounced similar to "organizer", but without the "orga" and changing the "e" for an "o".

Why another GUI for Neovim?

It's basically a pet project: one aimed to learn about Neovim and how to use it programmatically. But at the same time the idea is to provide a high quality interface for the everyday usage.

What it offers?

Nysor is mainly a GUI with an editor inside. You run it, optionally indicating a file to load, and will edit it using Neovim as backend.

In other words, Nysor does not really edit the file, it's Neovim, and Neovim is the one that handlers all your keystrokes and (most of) the mouse actions. Nysor is not an emulation of Neovim.

Currently, version 0.1, it's just a window with the editor inside. There is nothing extra so far, but all the basics should work. It may have rough edges, though (there are even two buttons for debugging purposes); see below what to expect in the future.

Screenshot showing a simple GUI

Default init message (the clear background is because of my Neovim config, not a GUI decision)

How to run it?

You call it from the project (no packaging yet), but previously you need to create a virtualenv; e.g.:

…/nysor$ python3 -m venv env
…/nysor$ source env/bin/activate
(env) …/nysor$ pip install -r requirements.txt
(env) …/nysor$ python -m nysor

You can indicate it to open a file to edit:

(env) …/nysor$ python -m nysor myfile.txt

By default, currently, some INFO is sent to the terminal, you can reduce the logs verbosity with -q/--quiet, increase it with -v/--verbose, or even use -t/--trace to see everything that is going one under the hood (specially the interaction with Neovim through the socket).

Nysor will use nvim if it's in the PATH, but you can always specify the binary location using --nvim.

Roadmap

These are the plans for the future. They are quite informal, the idea is to follow this list, but we can reorder stuff if needed, of if something is requested.

The path to 1.0

The idea is to have a solid editor in one window for version 1.0; there will be not much more functionality than it currently exists, but it should improve in quality.

These are the items lousely grouped to get there:

For 0.6:

  • Show version in the "About"
  • The "create a new issue" should ask for a title and a text, and jump into a page prefill with indicated info, plus:
    • nysor version
    • qué version de neovim tiene
    • environment (OS, etc)
  • if "-" is the parameter, it should handle stdin
    • let's see if Neovim supports through API telling it to open stdin
    • otherwise just make it work: open a temporary file with content retrieved from stdin and tell Neovim to use that
    • FIXME.92

For 0.7:

  • Simplify/optimize the different _paint_cursor_*
    • only have one that receives the precalculated values
    • the value is calculated once (and cached), not on every call
    • change that caching!

For 1.0:

  • Think about "distribution"
    • upload it to PyPI and check uvx and fades work to run it
    • package it with pyempaq

After 1.0

The path after that is less descriptive. The following are the big items I want to add to the editor in the following versions:

For version 2:

  • try to separate, if possible, the command bar from Neovim's grid itself
    • add better history and ways to search/filter previous commands
  • try to separate, if possible, the windows for messages from the editor
    • not only from the Neovim itself (like myfile.txt 23L, 10023B written) but also from plugins, like linters
    • these windows should be easily resizeable, and with buttons somewhere to turn them on/off
    • have a pane specifically for "errors"? (what today is a pop-up)
  • add a treeview in the left of the window
    • simple, showing the directory where the process is run
    • if double click in a file, it should open a new window/tab with the new buffer
  • support multiple buffers open
    • FIXME.90
    • switch back and forward clicking on tabs
    • when going back to a tab, it should check if underneath file changed
    • support closing properly, each tab or the whole program, asking for the buffers that are not properly saved

For version 3:

  • it should open more than a file if it's given in the command line
    • each file should be a separate window in the "right pane zone"
  • double clicking in the tree view should also edit the file
  • when open from a terminal, the layout should change according to the indicated parameters
    • if it's one or more files, open them as (multiple) windows, without a treeview
    • if it's a directory, open it with a treeview based in that directory
      • if this is not the first time the directory is "opened", it should remember which files were previosly open
    • if nothing is indicated, open it empty, with no treeview

For version 4:

  • different Nysor runs should be different processes, but aware of them
    • if you're trying to open the same file twice, it should not, the other editor should get focus
  • add functionality to the contextual window (when you right click on a word)
    • FIXME.93
    • to search that token in all the proyect ... maybe also in the project's virtual env?
    • to jump to the definition of that word (function, class, module, etc)

For version 5:

  • automatically run linters
    • if the standard ones are in the virtual environment, use them, add decorations for their results
  • minimum git support
    • decoration of lines added/removed/changed
  • support minimal configuration
    • overrid automatic detections, like virtualenv directories, linters to run, etc
    • placement of decoration for line length
    • scrollbars behaviour (never, always, dynamic)
    • nvim exec path

For version 6:

  • incorporate the possibility of AIs to read/write code

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

nysor-0.5.1.tar.gz (56.5 kB view details)

Uploaded Source

Built Distribution

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

nysor-0.5.1-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

Details for the file nysor-0.5.1.tar.gz.

File metadata

  • Download URL: nysor-0.5.1.tar.gz
  • Upload date:
  • Size: 56.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for nysor-0.5.1.tar.gz
Algorithm Hash digest
SHA256 deb2a8ade137b3be6943acfd25c6e94c50e4c57013b3e1c54962a2f0149f51cd
MD5 16d00e9041ea3566b54c4b8632731017
BLAKE2b-256 4f93cd47151297f3a5f6f2d13878418848e4db4078a0e15023d4dfb93a9a1b18

See more details on using hashes here.

File details

Details for the file nysor-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: nysor-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 58.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for nysor-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab5d27415d93353c395e72d1a6f8db28a58278f0ac92ed05e57384df62125846
MD5 6d98052e3957788a021dcffa50c383c4
BLAKE2b-256 acd9c4b04ef9baa17ac88a9e00adbdb38410f2c03837e134978c65af79437b55

See more details on using hashes here.

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