mirror of
https://github.com/qvacua/vimr.git
synced 2024-09-11 17:15:34 +03:00
VimR — Neovim GUI for macOS in Swift
cocoamacosneovimneovim-clientsneovim-experienceneovim-guisobjective-cstarred-qvacua-repostarred-reposwiftvim
The `neoVimBuffer` function was updated in #1015 to used a lua script through `nvimExecLua`. The script returns the dictionary retrieved from the `getbufinfo` vim functions. The issue is that this can grow very large, especially the `variables` entry, and can cause the lua stack to grow too big and error. In the end the `neoVimBuffer` function only needs a small handful of the entries from `getbufinfo`, and so the lua script has been updated to return a dictionary with only those entries. At the same time the `hasDirtyBuffers` function was found to also return the `getbufinfo` dictionary and was similarly fixed. It was also noticed that the argument passed into `getbuinfo` here was a vim style dictionary and not valid lua. This made `hasDirtyBuffers` fail and caused an issue in `MainWindow.windowShouldClose` where selecting `File > Close Window` would close the window even when dirty buffers were present. The proper lua dictionary syntax is now used and fixes this issues. Fixes #1044 |
||
---|---|---|
.github | ||
bin | ||
ci | ||
Commons | ||
docs | ||
Ignore | ||
Neovim@27fb62988e | ||
NvimView | ||
resources | ||
RxPack | ||
Tabs | ||
VimR | ||
VimR.xcworkspace | ||
Workspace | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.swiftformat | ||
.swiftlint.yml | ||
appcast_snapshot.xml | ||
appcast.xml | ||
Brewfile | ||
DEVELOP.md | ||
LICENSE | ||
README.md |
VimR — Neovim GUI for macOS
About
VimR is a Neovim GUI for macOS written in Swift.
The goal is to build an editor that uses Neovim inside with some of the convenience GUI features similar to those present in modern editors.
There are other Neovim GUIs for macOS, see the list, so why?
- Play around with Neovim,
- play around with Swift (and especially with RxSwift),
- Play around with the main idea of Redux architecture, and
- (most importantly) have fun!
If you feel chatty, there is a chat room: https://matrix.to/#/#vimr:matrix.org
If you want to support VimR financially, use Github's Sponsor.
Download
Pre-built Universal signed and notarized binaries can be found under Releases.
Reusable Components
- NvimView: SwiftPM module containing
an NSView which bundles everything, e.g., Neovim binary and its
runtime
-files, needed to embed Neovim in a Cocoa App. - RxMsgpackRpc: Implementation of MsgpackRpc using RxSwift.
- RxNeovimApi: RxSwift wrapper of Neovim API.
Some Features
- Markdown preview
- Generic HTML preview (retains the scroll position when reloading)
- Fuzzy file finder a la Xcode's "Open Quickly..."
- Trackpad support: Pinching for zooming and two-finger scrolling.
- Ligatures: Turned off by default. Turn it on in the Preferences.
- Command line tool.
- (Simple) File browser
- Flexible workspace model a la JetBrain's IDEs
How to Build
Clone this repository. Install homebrew
, then in the project root:
git submodule update --init
xcode-select --install # install the Xcode command line tools, if you haven't already
brew bundle # install dependencies, e.g., build tools for Neovim
clean=true notarize=false ./bin/build_vimr.sh
# VimR.app will be placed in ./build/Build/Products/Release/
Development
See DEVELOP.md.