Giter Site home page Giter Site logo

onivim / oni Goto Github PK

View Code? Open in Web Editor NEW
11.4K 215.0 301.0 39.38 MB

Oni: Modern Modal Editing - powered by Neovim

Home Page: https://www.onivim.io

License: MIT License

Shell 0.12% TypeScript 86.23% HTML 0.07% CSS 0.27% JavaScript 1.54% Vim Script 11.58% Inno Setup 0.14% PowerShell 0.03% Batchfile 0.01%
vim neovim editor ide typescript javascript ui gui text-editor react

oni's People

Contributors

ackey avatar akinsho avatar badosu avatar borjarus avatar bryphe avatar crossr avatar cyansprite avatar deltaevo avatar feltech avatar freebroccolo avatar frigoeu avatar jakubjecminek avatar jasonszhao avatar jordan-arenstein avatar justjoeyuk avatar keforbes avatar kforbes-arkin avatar mhornung avatar muream avatar nwneisen avatar psxpaul avatar rafi993 avatar rgehan avatar rhendric avatar samvv avatar someguynamedmatt avatar speculative avatar talamuyal avatar texhnolyze avatar wheyerstrass avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oni's Issues

Microsoft Language Server Protocol

Hi!

This project is awesome! I'm really excited about it.

I have been working on this project: https://github.com/tjdevries/nvim-langserver-shim

It is a working shim for at least some of the features for communicating to language servers that run the MS Language server protocol. Even if you don't use my shim, I think you should really consider using the protocol. It will be very helpful when more and more language servers adopt the protocol.

I'm wondering if you'd like to use it to extend some of the features that are there (or I'd do that as well obviously 😄 ).

Anyways, let me know what you think.

Again, really cool project!

Error when in a different workspace/desktop

On mac, you have multiple "desktops" to work on, think like workspaces in linux. Basically, if I'm one that does not have oni open and I click on it in the dock, I get this.

screen shot 2016-12-10 at 2 34 40 pm

Feature - Snippets

Snippet support is huge in saving people typing. It's a prominent feature in every major text editor, for good reason.

UltiSnips is the de-facto standard in the VIM community, and ideally we would reuse that. The problem is that it requires Python support and at least Neovim binaries aren't built with Python on Windows.

Python interpolation is a really cool feature UltiSnips has - in the spirit of this project, with a JavaScript-driven plugin API, it would make sense to introduce javascript interpolation. There are some potentially really neat integrations there - like showing the current date in specific formats, showing the lines in a buffer, expanding github issues by ID in a TODO comment, etc

So for those reasons, I believe it might make sense to create a UI-driven shell approach to snippets.

We would need to recognize multiple snippets formats:

  • Existing Ultisnips formats
  • TextMate snippet syntax (which would give us (VSCode Snippet support)[https://github.com/neovim/neovim/pull/5686]

Document configuration options

  • Need to document the configuration options. Ideally, this could be auto-generated from the Config.ts file
  • In the FAQ, should add entries around the following:
    • How do I change oni settings?
    • How do I use my own init.vim?
    • How do I change the background?
    • How do I change the font?

Synchronizing colors:

I commented about synchronizing keyboard shortcuts and the various options for doing so.

TL;DR:

  • No one wants to write VimScript (how can I blame them).
  • Everyone knows JS/JSON so it is preferable.
  • But we don't want a ton of startup time overhead to wait for a JS engine to warm up or wait for latency to cross the language bridge several times (if we can avoid it).
  • We also don't want half our editor config in VimScript and half in JS/JSON long term so if there are two ways to do something it would be nice if there was a migration path to have everything in one language, without paying any performance costs (a suggested approach is ahead of time compiling JS/JSON to VimScript - which also lets you use that same config in any build of Vim).

Now, I'd like to make an Issue to track the same kind of configuration experience for color schemes and fonts including colors of objects that don't have a corresponding element inside of stock Vim. (popup menus etc). It would be nice to configure everything in one place, just like keyboard mappings. It would also be great if every color scheme could work out of the box with UI extensions with a nice default color that synced to the color scheme bgcolor etc - but then also allow colorschemes to add customizations for these UI extensions. It would even be preferable if color schemes could be defined in JS, and then executed ahead of time to spit out regular vimscript config. Imagine if all the color blending logic was done in JS, and the output is raw vim highlight commands (this is much like our shift to css in JS).

npm run install:oni-plugin-typescript fails

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli 'install:oni-plugin-typescript' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /home/olle/.npmrc. (matches userconfig)
5 verbose stack Error: ENOENT: no such file or directory, open '/home/olle/package.json'
5 verbose stack at Error (native)
6 verbose cwd /home/olle
7 error Linux 4.4.0-47-generic
8 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "install:oni-plugin-typescript"
9 error node v4.2.6
10 error npm v3.5.2
11 error path /home/olle/package.json
12 error code ENOENT
13 error errno -2
14 error syscall open
15 error enoent ENOENT: no such file or directory, open '/home/olle/package.json'
16 error enoent ENOENT: no such file or directory, open '/home/olle/package.json'
16 error enoent This is most likely not a problem with npm itself
16 error enoent and is related to npm not being able to find a file.
17 verbose exit [ -2, true ]

Hook up react-hot-loader for development

Right now, npm run start sets up a webpack live-reload server. react-hot-loader isn't fully integrated though.... This would have some really nice development scenarios.

For example, imagine working on the Cursor component (which will be in React after #46) and seeing your changes live as you work on that code :) Would be really cool, and helpful for all the UI functionality we're adding to have that instant feedback.

In theory everything should be hooked up - but I think there are some quirks with the way I'm bringing in the hot-reload webpack bundle.

Input - Mouse: Add support for scroll wheel

From the docs:

For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key
presses , , and
. For example, if you push the scroll wheel upwards a
key press is generated causing the window to scroll upwards
(while the text is actually moving downwards). The default action for these
keys are:

<ScrollWheelUp>	    scroll three lines up	*<ScrollWheelUp>*

<S-ScrollWheelUp>	    scroll one page up		*<S-ScrollWheelUp>*

<C-ScrollWheelUp>	    scroll one page up		*<C-ScrollWheelUp>*

<ScrollWheelDown>	    scroll three lines down	*<ScrollWheelDown>*

<S-ScrollWheelDown>	    scroll one page down	*<S-ScrollWheelDown>*

<C-ScrollWheelDown>	    scroll one page down	*<C-ScrollWheelDown>*

<ScrollWheelLeft>	    scroll six columns left	*<ScrollWheelLeft>*

<S-ScrollWheelLeft>	    scroll one page left	*<S-ScrollWheelLeft>*

<C-ScrollWheelLeft>	    scroll one page left	*<C-ScrollWheelLeft>*

<ScrollWheelRight>	    scroll six columns right	*<ScrollWheelRight>*

<S-ScrollWheelRight>    scroll one page right	*<S-ScrollWheelRight>*

<C-ScrollWheelRight>    scroll one page right	*<C-ScrollWheelRight>*

This should work in all modes, except when editing the command line.

Looks like it would be easy to add listening to mouse events - just need to coerce the mouse events into the appropriate scroll command

Wildmenu option for vim not displaying

Wildmenu option for vim does not display the options. It does, however, remove the airline information (as it would in the terminal) but the text simply isn't there.

Direction of Oni?

Just a few questions with regards to Oni, as it is a popular repo and has a lot of potential.

Plugins and Extensibility

Are you trying to have Oni be the framework for plugins? Will Neovim plugins work out of the box to provide an easy transition, or will Oni be the only configurable variable.

In my opinion, if you want to get people to switch, Vim configurations and plugins have to work, and then people will be willing to configure Oni on top of their already decked out vim. I don't know if the UI decoupling will make it easier for you to handle autocompletion type functions from plugins. You're not going to get all of the plugin writers to switch to Oni, and fragmenting the community is not a good idea. I know for a fact that I personally won't be switching over if my config doesn't port over well. Reconfiguring for many is not an option, unless Oni will come with comparable plugins.

Js, Viml, Lua

I've seen in several of the comments and issues the pull between JS and VimL, but what's going to happen with Lua? Much of neovim is being changed, or at least transpiled to Lua for speed improvements. Will this have any bearing on the development of Oni? We don't want to work on a hardcore Viml/JS project just to have to restart with Lua. I've seen some talk of avoiding VimL because of speed, but that might be less of an issue as Neovim continues.

Thanks for your time, and if these questions sound stupid it's because I am by no means a developer, just an interested highschooler.

What is a neovim front end?

Could somebody please help me get an understanding of the advantages a front end has versus something like the terminal I am trying to wrap my head around it.

I noticed that oni plugins can be written in JS which is pretty cool but does that mean my usual plugins (deoplete, fzf, etc...) won't work?

Also are all neovim front ends the same (except for the language they are implemented in)?

QuickOpen: Ctrl-P / QuickOpen menu only works with git

Right now, the QuickOpen menu only works with git. The code for finding files looks like this:

oni/browser/src/Services/QuickOpen.ts

    const trackedFiles = execSync("git ls-files").toString("utf8").split("\n")
    const untrackedFiles = execSync("git ls-files --others --exclude-standard").toString("utf8").split("\n")

It would be helpful to have, at the very least, a fallback strategy to use a node module for recursively traversing the file structure. In addition, having the command line be a user-configurable option would be really helpful - so people can use the preferred search tool of their choice (ag, grep, etc).

possibility of visual debugger like vscode

One of the killer features that I have seen many developers talk about vscode is its debugger. Is there any plans to implement such debugger in oni. and may be possible integration with react dev tools.

Rendering of Airline/Powerline fonts

I use Airline, and also usually have a zsh terminal hidden somewhere in my buffers.

Airline looks like this:
screen shot 2016-12-04 at 2 21 33 pm

The terminal similarly does not render the patched fonts correctly, and I set and resourced guifonts to a powerline font in my init.vim.

If this is something stupid that I'm forgetting, it probably should go into a "getting started" somewhere.

I really want to see this project take off!

Feature - Preview: Markdown preview

A feature that would be really helpful for me (in other words, a feature that makes me jump to VSCode...) is live markdown preview.

A few things need to be considered for this:

  1. What is the entry point?
  2. How do we implement it?

In terms of implementation, it should be relatively straightforward to expose the UI to a plugin as a 'layer'. We could potentially render this 'layer' over a buffer. This way, we could open a separate buffer of filetype=preview, and just render an electron window of the rendered markdown. This allows us to use the window navigation present in VIM.

Another option would be to just manage the window outside of VIM. The challenge with this is that the window navigation needs to be coordinated with Neovim.

QuickInfo: QuickInfo UI follows the cursor down to command line

The QuickInfo UI follows the cursor to the command line.
quickinfo-bug

Seems like, if we go to command mode, we should just clear the quick info UI. The challenge here is to figure out how we detect that case to remove it. We have similar logic in browser\src\index.tsx to close it when the mode changes.

Project Structure: Bring in built-in vim plugins as submodules

There are a few vim plugins brought in by default by ONI. These include:
targets.vim
typescript-vim
vim-commentary

(There are also some that would be nice to include - like vim-surround).

These should be brought in as submodules, as opposed to just being baked into the repo.

Need better application icons

Need some better icons for the application:

  1. Title bar
  2. Dock bar in OSX

Right now, there is just a placeholder green dot, and the default electron logo comes through in a few places on OS X.

Also, a logo would be awesome for the README

Multi-monitor support

A scenario that frequently occurs in a multiple-monitor setup at work is that I'd like to expand VIM to encompass multiple displays, and use the goodness of the easy window splitting / window navigation across monitors. Gvim on windows, at least, doesn't seem to handle this very well - I imagine the terminal clients might be better if the terminal emulator handles resize/multiple monitors, but in my case, it doesn't fit my workflow.

With Electron, it's relatively easy to change the BrowserWindow dimensions to encompass multiple screens (or alternatively, create multiple BrowserWindows that can communicate with other).

It's easy to get the information about all displays:

    require("electron').screen.getAllDisplays()

And it's also pretty easy to size the browser window:

        require('electron').remote.getCurrentWindow().setPosition(x, y)
        require("electron").remote.getCurrentWindow().setSize(.., ..)

What would be helpful in terms of workflow would be a command that is like "MonitorExpandLeft, MonitorExpandRight, MonitorExpandDown, MonitorExpandUp". This would size the window to expand to the boundary of the window if it hasn't already, or expand it out to the next window. This could be bound to something like plus arrow keys by default.

This would be somewhat gated by #20 since we need a nice way to express those commands, but we could have another hacky input added until we get that fixed..

Linux support

Looks like ONI only supports Windows and macOS right now? Judging by some of the source files it checks whether the OS is "Darwin", and assumes Windows otherwise.

What needs to be done for this to run on Linux?

Override Electron menu with new menu

Would be nice to have a custom menu, with some options like:

  • Edit config.json
  • Edit keybindings.json

As well as expose some of the IDE-level functionalities:

  • Go-to definition
  • etc..

In developer mode, we'd of course want to preserve the developer toolbar

init.vim not sourced

Currently, the default init.vim is overwritten, to set the runtimepaths to pick up the plugins that are needed for Oni to function correctly.

However, this means settings aren't pulled in for custom init.vim

Need to source the user's init.vim, if it exists, once the app has started. Seems like we might want to add this in (NeovimInstance.ts)[https://github.com/extr0py/oni/blob/master/browser/src/NeovimInstance.ts] once the process has been spawned, we can source the init.vim if it exists.

Plugin - TSLint

Now that we have TSLint integrated in the project, it'd be really nice to have a TSLint plugin to show the 'error markers' for lint errors.

We'd want to add another plugin:

  1. oni-plugin-tslint
  2. Enable it for .ts files
  3. Listen to the 'save' event
  4. Run tslint in a separate process
  5. Report the results back via error markers (we should use a color besides red - yellow might be a good one). It would also be nice to customize the gutter error icon

Nothing happens on windows7

Hi,

After npm install -g oni I used oni -> nothing happens, after a second or so the focus is back on the terminal (the cursor blinks - don't know the technical term).
So I did a npm install -g oni-vim and oni-vim -> same result.

oni -> 0.0.1
oni-vim -> 0.1.2
npm -> v 4.0.3 (just upgraded from 3.10.2)
electron -> 1.4.11 (only under oni-vim)

Thanks in advance,
dequisitor

P.S.: thanks for this awesome GUI

Blank white screen on load

I'm getting a blank screen when running oni after installation.

My current OS is 10.12.2 Beta (16C53a)
I'm running node version 7.2

Is there a specific version this is supported for node wise?

Scroll improvements.

First, the scroll bar jitters from left to right

https://gyazo.com/e886941e230b901f7bb06fd8209d0651

Second, I've tried implementing some math to determine if the scroll is in a different buffer, but it gets laggy. Basically in Mouse.ts I just created variables for the last cell that the mouse event registered to, and then I compared them. Is there a better way to implement this? I like being able to scroll without clicking, but it's not going to be a dealbreaker

Cannot figure out how to install on OSX

Need a bit of help installing it on macOS. I installed the npm package but it won't start.
What do you mean by ensure the 'nvim.exe' is available? I do have neovim installed via homebrew.

Document extensibility interface

Need more detailed documentation around the extensibility interface. A few assets would be helpful:

  • Link to the Oni.d.ts file
  • Simple extensibility provider (maybe autocomplete months in the same vein as VIM)
  • Sample extensibility provider walkthrough - all the moving parts that are needed:
    • Package.json metadata
    • index.js to handle the requests / responses

Input - Keyboard: Clean up & generalize key handling

In keyboard.ts, there is a giant switch for handling various keycodes. This isn't maintainable to handle new scenarios, and there are several keys that are currently not supported.

Some keys that should be supported:

  • VolumeUp/VolumeDown
  • ScrollLock
  • Delete

Missing parenthesis

Hi all,

I'm trying to run :CheckHealth, but I do get this error:

C:\Users\x\AppData\Roaming\npm\node_modules\oni-vim\vim\vimfiles\jedi-vim\autoload\health\jedi#check
================================================================================
  - ERROR: Failed to run healthcheck for "C:\Users\x\AppData\Roaming\npm\node_modules\oni-vim\vim\vimfiles\jedi-vim\autoload\health\jedi#check" plugin. Exception:
    Vim(call):E107: Missing parentheses: C:\Users\x\AppData\Roaming\npm\node_modules\oni-vim\vim\vimfiles\jedi-vim\autoload\health\jedi#check()

I'm using Windows 10, installed oni via npm

Get rid of "Hit Enter To Continue"

This is one of those things that are terrible terrible user experiences that the Vim community seems to not think is a big deal. It is a big deal to people who are expecting a modern editor experience. The goodness of vim should not come with terrible user experiences that are only present because terminals 30 years ago didn't offer better solutions. Does it sound like Oni is the right project to try to correct this? Based on your description, it sounds like it might be. One approach is to create a special plugin that always ensures the cmdheight is 5, even if someone's vim config sets it to something smaller. This prevents that annoying message, but makes the command area far too large. Then, at render time you artificially render the command area as smaller, and detect any command output larger than one line. Then you have another solution for scanning the :messages log and deciding which messages warrant some kind of a modal dialog for errors, or perhaps something even better. Does NeoVim provide a better way for detecting errors (perhaps the new external UI protocol?)

Refactor 'Cursor' to React component

Right now, the Cursor is implemented using pure DOM manipulation. It would be much better to implement this in the React layer - that would give us the flexibility to more easily add some interesting capabilities like animation to the cursor.

This should be a relatively straightforward refactor, although the following will be needed:

  • Mode will need to be included in the redux store
  • Cursor x,y is already present

It'd be nice to have some (optional through config) animations for the cursor. An example is sometimes when I have co-workers watching me in the UI, it's hard for their eyes to follow where the cursor is moving.

Project-specific settings

Often when switching between projects, there are some project-specific settings that are useful to preserver in that project's context. For example, I might want to use tabs for indentation in one project, but spaces in for indendation in another.

This has always been somewhat tricky in VIM - there are some plugins like this:
https://github.com/embear/vim-localvimrc
https://github.com/tpope/vim-projectionist

But it's still not perfect.

In addition, with Oni, there are some additional IDE-capabilities that I'd like to eventually expose per-project:

  • Launching the project (ie, F5 in Visual Studio / VSCode)
  • Debugging the project (much later...)
  • Project-specific settings
    • Whitespace
    • Find / Ctrl-P strategies
    • Test-file lookup (to easily switch back and forth from source to test, a la projectionist

The Launch Project is actually the most important one at the moment - the scenario I have in mind is that I can toss up some language extension examples on github, and then someone can clone them, open in Oni, press F5, and be ready to test it out in a sandbox instance. That will make it really easy for people to get started and understand the API.

My proposal is to follow VSCode's format:

  • .oni folder at root of project
    • settings.json - settings overrides (whitespace, configuration settings)
    • launch.json - instructions on 'launch' tasks

There are a few other things VSCode has, like tasks.json, but I believe those could be deferred for now

Synchronizing VimScript keybindings.

For UI interactions such as the popup (command-p) window (and canceling source editor popup menus), how should people configure keyboard mappings? How do they configure these, while also configuring Vim keyboard mapping (for insert/command mode). For example, it might make sense to apply all the cmap mappings while the "command P" window is open.
If cmap doesn't make sense to integrate with, then perhaps a new "mode" for mappings makes sense. But in that case, would users configure 90% of their mappings in Vim, and then 10% of them in ~/.oni/config.json? It would be nice if keyboard mappings could be specified entirely in one place.

Edit: Summarizing thoughts, tradeoffs, observations:

  • No one wants to write VimScript (how can I blame them).
  • Everyone knows JS/JSON so it is preferable.
  • But we don't want a ton of startup time overhead to wait for a JS engine to warm up or wait for latency to cross the language bridge several times (if we can avoid it).
  • We also don't want half our editor config in VimScript and half in JS/JSON long term so if there are two ways to do something it would be nice if there was a migration path to have everything in one language, without paying any performance costs (a suggested approach is ahead of time compiling JS/JSON to VimScript - which also lets you use that same config in any build of Vim).

Synchronize title bar color with tabbar background color

This is probably low priority because there's a lot more important things that need to be done to make the UI smooth, but I'm just making this task because someone might already know how to do this, and might thing it's fun.

screen shot 2016-12-08 at 2 36 06 pm

I think a good default would be to synchronize the color of the title with the vim colorscheme's tabbar background color. Then of course, as we've discussed elsewhere, colorschemes/themes could specify special support for coloring the title bar.

Background suggestions?

I just tossed in this background:

    "prototype.editor.backgroundImageUrl": "http://cdn.wonderfulengineering.com/wp-content/uploads/2014/04/code-wallpaper-2.jpg",

in Config.ts.

Anyone have suggestions for a better background to use?

Long-term, I'd like to have some extensibility here - maybe there is some interesting code visualization we could put in the background - even stuff like this (JSCity)[https://github.com/aserg-ufmg/JSCity] might be cool, if it isn't too intrusive. Or some sort of animated document map... Or just sets of backgrounds that fade-in/fade-out periodically. Or no background at all :)

Better :messages log

Here's a proof of concept for Atom's notifications that get rid of the spammy user experience of Atom's notifications. It would be cool to render Vim's :messages log in this manner:

atom/notifications#29

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.