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.

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.5:

  • present an error window if a nvim executable is not Found
    • include instructions to install it
    • not yet configurable, but run it with --nvim
  • Include the icon, so it's shown in the window decoration

For 0.6:

  • complete "GUI window"
    • add a very clean menu
    • File: Exit, About
    • the About should present name, icon, and versions for Nysor and the nvim it's using
  • remove the two debug buttons

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
    • improve error management around "opening a file that was left open previously because of crashing or similar"
  • 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
  • remove the "debug buttons"
    • FIXME.91

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
    • 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
      • no treeview
      • FIXME.92

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 github 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

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.4.tar.gz (31.2 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.4-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nysor-0.4.tar.gz
Algorithm Hash digest
SHA256 e6bfb58467d69db679c714fa495fa8e6c5c69523d85fb84bda2845b6f40ceac3
MD5 95ccbfba9408f255806b5b6bace0e2e2
BLAKE2b-256 07522457b0c7441c1b6674d02e17e1e73b98b4a2d39d05ea6dcc8065950b4589

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nysor-0.4-py3-none-any.whl
  • Upload date:
  • Size: 29.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a9b64a1473752520b1fd873409ab41925655b14e39192f9ad77eff9a0972ef93
MD5 278f5adc1cba1ee02a22bb877ab6019b
BLAKE2b-256 53e913cc29504b39844682ac3e7d99ba66740e122aa1d2a7aab9dca55cc14bfe

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