Giter VIP home page Giter VIP logo

oni2's People

Contributors

akinsho avatar amiralies avatar benox3 avatar bryphe avatar crossr avatar ericluap avatar et7f3 avatar fanantoxa avatar fiddler avatar glennsl avatar hoop33 avatar hovsater avatar jakeday avatar jakubbaron avatar jesstelford avatar kingedwardi avatar lessp avatar marcagba avatar marcinkoziej avatar mkenigs avatar necabo avatar praveenperera avatar rogererens avatar romgrk avatar sghill avatar sloff avatar tatchi avatar tcoopman avatar tristil avatar zbaylin 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

oni2's Issues

Quickopen crashes if working dir is changed

If you issue a chdir command to somewhere other than oni2 root, and then use <C-P> to launch quickopen, Oni2 crashes.

Both master, and #184 (ripgrep, yay!) merged into master reports:

Fatal error: exception Oni_Neovim__NeovimApi.RequestFailed("Request timed out: nvim_command (XX)")

Maybe some paths are handled as relative in the source, that should be absolute?

Missing dependencies

I'm on fresh Ubuntu Desktop 18.10 and I found that there are few missing dependencies: m4, libbz2-dev, zlib1g-dev, libx11-dev, xrandr-dev

Cannot create configuration dir path on Windows - wrong path is used

Oni2 tries to create the directory for storing configuration file, on opening it first-time from command palette. So far, so good.
Unfortunetly, on Windows it fails to do so, with error
can't create directory 'C:\Users\***\AppData\Local\.config\oni2' because 'No such file or directory

Causes

  1. Creating the oni2 directory doesn't create the parent directories, only the last level. This is reflected in the error msg, so it is the direct cause.
  2. The underlying issue is in src/editor/Core/Filesystem.re :: getOniDirectory implementation.
    It should be also platform specific, as unsafeFindHome - using .config is smelly on Windows, Oni used AppData/Roaming/Oni, instead of Appdata/Local/.config/oni2 by the way.

Bug: Out-of-order nvim_buf_lines_events are not handled

When typing quickly, I notice that sometimes we get nvim_buf_lines_event out of order:

Raw Notification: nvim_buf_lines_event | [(0 "\001"), 1580, 13, 14, [aigjwoiagjowaejgoiojaigfwjoia], false]
Raw Notification: nvim_buf_lines_event | [(0 "\001"), 1579, 13, 14, [aigjwoiagjowaejgoiojaigfwjoi], false]
Raw Notification: nvim_buf_lines_event | [(0 "\001"), 1578, 13, 14, [aigjwoiagjowaejgoiojaigfwjo], false]

We are currently ignoring the changetick and just processing this in order - so we end up missing smoe characters in this case

Edit buffer crashes

Steps:

  • Run esy x Oni2
  • Type :e Oni.install

Result: Oni2 crashes
Expected: buffer is opened

Terminal log:

Raw Notification: redraw | [[wildmenu_show,
  [[Oni2.install, Oni2.opam, OniBench.install, OniBench.opam,
    OniUnitTestRunner.install, OniUnitTestRunner.opam, Oni_Core.install,
    Oni_Core.opam, Oni_Neovim.install, Oni_Neovim.opam, Oni_UI.install,
    Oni_UI.opam]]], [wildmenu_select, [0]],
 [cmdline_show, [[[0, e Oni2.install]], 14, :, , 0, 1]], [flush, []]]
[DEBUG - STATE] Mode: commandline editor font measured width: 8 editor font measured height: 16
[DEBUG - STATE] Mode: commandline editor font measured width: 8 editor font measured height: 16
[DEBUG - STATE] Mode: commandline editor font measured width: 8 editor font measured height: 16
[DEBUG - STATE] Mode: commandline editor font measured width: 8 editor font measured height: 16
[DEBUG - STATE] Mode: commandline editor font measured width: 8 editor font measured height: 16
Protocol Notification: unknown
Raw Notification: redraw | [[wildmenu_hide, []], [flush, []]]
Fatal error: exception Failure("hd")

IME Support

This is tracking IME integration (Japanese input, WinCompose, etc) - currently not supported via GLFW. https://github.com/kovidgoyal/kitty has IME support and is based on GLFW, so it'll be interesting to see how they handle it.

[Enhancement] [Feature] Code Navigation Tool

I know that Oni2 is still pre-alpha but as we will have ripgrep integration soon we can at least discuss it.

I really want to have a cool navigation tool built-in for Oni2, something like atom-narrow (plugin for Atom editor)

image

Basically, it's similar to fzf but way more powerful because we can edit search buffer, change multiple lines and after save real files will be updated accordingly! That makes refactoring so nice and easy. It's also very quick and responsive

I know there are similar plugins for vim, like vim-swoop, but vim-swoop doesn't support searching across the whole project, only the loaded buffers and lacking Update real files feature. atom-narrow gives me the best code navigation experience.

Here's some of the use cases where a tool like atom-narrow can be useful. (cool gifs!)

Thanks! ❤️

Certain keys are ignored

Keys like <, left, right, up, down are ignored. I think this issue might stem from how we are handling key presses on revery as there might not be handler for some special characters yet?

QuickOpen / Menu: Add handling for <c-h> and <c-w>

Repro:

  • Open QuickOpen (<c-p>)
  • Type some characters (abc)
  • Press <c-w>

Expected: Text should be cleared
Actual: Text is not cleared

(Same issue with <c-h>, except I'd expect it to behave like <backspace>).

Performance: Buffer Updates - Investigate & benchmark Piece Table approach

We currently have a sub-optimal strategy for handling buffer updates from Neovim. We do a lot of Array splicing which is slow for large buffers. We should start by benchmarking our existing performance characteristics.

In investigating various data structures that we could use to improve this:

The Piece Table is the most appealing to me - it's an immutable data structure, so it's a very natural fit for our language and architecture. We don't necessarily need the undo faculty of it (as we defer that functionality to Neovim) - but we could periodically consolidate the immutable blocks when the application is idle - this would help offset some of the key downsides of the data structure (that it isn't self optimizing, that retrieving a byte involves iterating sequentially over the 'pieces').

Enhancement: Native textmate service

For our textmate syntax / VSCode theme support, we rely on the vscode-textmate module. This was very helpful because it got us up-and-running and parsing syntaxes very quickly - however, it means we are delegating syntax highlighting to a separate Node process (not desirable for either perf or memory).

vscode-textmate is, in essence, a wrapper around the oniguruma C regex library.

What would be ideal is to have a ReasonML version of vscode-textmate that talks to oniguruma via th OCaml C FFI - we'd be able to host that in-proc (minimizing buffer duplication).

Build Oni2 failed on ubuntu 16.04

 SZX1000428519  baas   master  ~  my  oni2  esy bootstrap
info building revery@github:revery-ui/revery#ccac6fc@d41d8cd9
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: revery@github:revery-ui/revery#ccac6fc
    # esy-build-package: pwd: /home/baas/.esy/source/i/revery__76de015f
    # esy-build-package: running: 'dune' 'build' '--root' '.' '-j4'
             gcc src/Core/file.o
    file.cpp: In function 'value caml_open_sync_raw(value, value, value)':
    file.cpp:26:42: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
                 fread(pData, lSize, 1, pFile);
                                              ^
          ocamlc src/Native/dialog_gtk.o
    dialog_gtk.c: In function 'activate':
    dialog_gtk.c:10:35: warning: format not a string literal and no format arguments [-Wformat-security]
                                       GTK_BUTTONS_CLOSE, user_data);
                                       ^
     js_of_ocaml examples/Examples.bc.runtime.js
    warning: free variables in primitive code "caml_glReadPixels_bytecode" (/home/baas/.esy/3_____________________________________________________________________/i/reason_glfw-3.2.1015-d0427b63/lib/reglfw/gl_stubs.js:264)
    vars: ArrayBuffer, Uint32Array, Uint8Array, console
    warning: free variables in primitive code "caml_createImage" (/home/baas/.esy/3_____________________________________________________________________/i/reason_glfw-3.2.1015-d0427b63/lib/reglfw/image_stubs.js:0)
    vars: Uint16Array, Uint8Array
    warning: free variables in primitive code "caml_saveImage" (/home/baas/.esy/3_____________________________________________________________________/i/reason_glfw-3.2.1015-d0427b63/lib/reglfw/image_stubs.js:48)
    vars: ArrayBuffer, Blob, DataView, URL, Uint16Array, Uint8Array, caml_saveImage_anchor
        ocamlopt examples/Examples.exe (exit 2)
    (cd /home/baas/.esy/3_____________________________________________________________________/b/revery-2323bdc2/default && /home/baas/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/bin/ocamlopt.opt -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o examples/Examples.exe -I /home/baas/.esy/3_____________________________________________________________________/i/brisk__s__brisk_reconciler-a0b1e8c1/lib/brisk-reconciler -I /home/baas/.esy/3_____________________________________________________________________/i/flex-1.2.2-11b95d72/lib/flex -I /home/baas/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/threads -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__color-opam__c__0.2.0-67a32fc9/lib/color -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__gg-opam__c__0.9.3-87d5d3d5/lib/gg -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__js__of__ocaml-499ea313/lib/js_of_ocaml -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/unix -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__ocamlfind-opam__c__1.8.0-eecbed0c/lib/bytes -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result -I /home/baas/.esy/3_____________________________________________________________________/i/opam__s__uchar-opam__c__0.0.2-835f2252/lib/uchar -I /home/baas/.esy/3_____________________________________________________________________/i/reason_fontkit-2.2.1-417c3c85/lib/fontkit -I /home/baas/.esy/3_____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm -I /home/baas/.esy/3_____________________________________________________________________/i/reason_glfw-3.2.1015-d0427b63/lib/reglfw -I /home/baas/.esy/3_____________________________________________________________________/i/rebez-96006174/lib/rebez/lib -I examples/stubs -I src -I src/Core -I src/Geometry -I src/Math -I src/Native -I src/Shaders -I src/UI -I src/UI_Components /home/baas/.esy/3_____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result/result.cmxa /home/baas/.esy/3_____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/lwt.cmxa /home/baas/.esy/3_____________________________________________________________________/i/opam__s__js__of__ocaml-499ea313/lib/js_of_ocaml/js_of_ocaml.cmxa examples/stubs/ExampleStubs.cmxa /home/baas/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/str.cmxa /home/baas/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/unix.cmxa /home/baas/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/bigarray.cmxa /home/baas/.esy/3_____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/threads/threads.cmxa /home/baas/.esy/3_____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/unix/lwt_unix.cmxa /home/baas/.esy/3_____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm/reglm.cmxa /home/baas/.esy/3_____________________________________________________________________/i/reason_glfw-3.2.1015-d0427b63/lib/reglfw/reglfw.cmxa /home/baas/.esy/3_____________________________________________________________________/i/opam__s__gg-opam__c__0.9.3-87d5d3d5/lib/gg/gg.cmxa /home/baas/.esy/3_____________________________________________________________________/i/opam__s__color-opam__c__0.2.0-67a32fc9/lib/color/color.cmxa /home/baas/.esy/3_____________________________________________________________________/i/flex-1.2.2-11b95d72/lib/flex/Flex.cmxa /home/baas/.esy/3_____________________________________________________________________/i/reason_fontkit-2.2.1-417c3c85/lib/fontkit/fontkit.cmxa src/Core/Revery_Core.cmxa src/Math/Revery_Math.cmxa src/Shaders/Revery_Shaders.cmxa src/Geometry/Revery_Geometry.cmxa /home/baas/.esy/3_____________________________________________________________________/i/brisk__s__brisk_reconciler-a0b1e8c1/lib/brisk-reconciler/brisk_reconciler.cmxa /home/baas/.esy/3_____________________________________________________________________/i/rebez-96006174/lib/rebez/lib/Rebez.cmxa src/UI/Revery_UI.cmxa src/UI_Components/Revery_UI_Components.cmxa src/Native/Revery_Native.cmxa src/Revery.cmxa examples/.Examples.eobjs/native/AnalogClock.cmx examples/.Examples.eobjs/native/Border.cmx examples/.Examples.eobjs/native/Boxshadow.cmx examples/.Examples.eobjs/native/Calculator.cmx examples/.Examples.eobjs/native/CheckboxExample.cmx examples/.Examples.eobjs/native/DefaultButton.cmx examples/.Examples.eobjs/native/DropdownExample.cmx examples/.Examples.eobjs/native/Flexbox.cmx examples/.Examples.eobjs/native/Focus.cmx examples/.Examples.eobjs/native/GameOfLife.cmx examples/.Examples.eobjs/native/Hello.cmx examples/.Examples.eobjs/native/InputExample.cmx examples/.Examples.eobjs/native/Native.cmx examples/.Examples.eobjs/native/RadioButtonExample.cmx examples/.Examples.eobjs/native/ScreenCapture.cmx examples/.Examples.eobjs/native/ScrollView.cmx examples/.Examples.eobjs/native/Slider.cmx examples/.Examples.eobjs/native/Stopwatch.cmx examples/.Examples.eobjs/native/TodoExample.cmx examples/.Examples.eobjs/native/TreeView.cmx examples/.Examples.eobjs/native/Examples.cmx)
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_script_from_script'
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_ft_face_create'
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_get_unicode_funcs'
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_script_to_script'
    //usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_ft_face_create_cached'
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
    error: command failed: 'dune' 'build' '--root' '.' '-j4' (exited with 1)
    esy-build-package: exiting with errors above...
    
  building revery@github:revery-ui/revery#ccac6fc
esy: exiting due to errors above
  SZX1000428519  baas   master  ~  my  oni2  

I try build Oni2 on ubuntu 16.04, it is failed, but build it on ubuntu 18.10 is ok.

Error on exit: 'An extension called process.exit() and this was prevented'

We're hitting an error on exit due to the extension host:

Error: An extension called process.exit() and this was prevented.
        at process.exit (D:\oni2\src\textmate_service\node_modules\vscode-exthost\out\vs\workbench\services\extensions\node\extensionHostMain.js:18:29)
        at Timeout._onTimeout (D:\oni2\src\textmate_service\node_modules\vscode-exthost\out\bootstrap-fork.js:180:13)
        at ontimeout (timers.js:436:11)
        at tryOnTimeout (timers.js:300:5)
        at listOnTimeout (timers.js:263:5)
        at Timer.processTimers (timers.js:223:10)

We need to make sure we properly close down the extension host on close.

Change: Minimap max width

The minimap is currently pretty wide:

image

This is on a 4K monitor with 150% scaling, Windows 10.

I think it probably makes most sense to default to 80 cols, and have a configuration option for more ("editor.minimap.maxColumn" in VSCode.) I can't quite tell from the code if this is what is already attempted to be done, so maybe this is only a small change.

Scrolling is laggy on Windows

As discussed on the discord, I'm noticing some lag while scrolling down in Oni2. Here's a video showing neovim-qt (left) and oni2 (right) scrolling on the same file side by side: https://youtu.be/b8Eml4qTIHI

Here's the log with the minimap activated: minimap_log.txt
And here it is without the minimap: no_minimap_log.txt
In both cases the scrolling part is the the first indented stuff starting from the bottom.
The indented lines at the top happened when I cd-ed and opened the file.

The issue seemed less present without the minimap but It still felt a bit laggy.

For reference, I have a GTX 1080 w/ 8Gigs of vram, a ryzen 2500 and 16Gigs of ram and this was tested on Windows 10 launching everything from cmd.exe as admin.

If you need any more info/data/testing from me just ask!

Edit: I just built Oni2 on my Linux partition, same machine and I don't have any stuttering while scrolling

Build Oni2 failed on ubuntu 18.10

The build error message as follow:

 bingo   master  ~  my  oni2  1  esy boostrap
info building [email protected]@d41d8cd9
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: [email protected]
    # esy-build-package: pwd: /home/bingo/.esy/3____________________________________________________________________/b/reason_glfw-3.2.1015-d0427b63
    # esy-build-package: running: 'dune' 'build' '--root' '.'
     js_of_ocaml bin_js/test_glfw.bc.runtime.js
    warning: free variables in primitive code "caml_glReadPixels_bytecode" (/home/bingo/.esy/3____________________________________________________________________/b/reason_glfw-3.2.1015-d0427b63/_build/default/bin_js/../src/gl_stubs.js:264)
    vars: ArrayBuffer, Uint32Array, Uint8Array, console
    warning: free variables in primitive code "caml_createImage" (/home/bingo/.esy/3____________________________________________________________________/b/reason_glfw-3.2.1015-d0427b63/_build/default/bin_js/../src/image_stubs.js:0)
    vars: Uint16Array, Uint8Array
    warning: free variables in primitive code "caml_saveImage" (/home/bingo/.esy/3____________________________________________________________________/b/reason_glfw-3.2.1015-d0427b63/_build/default/bin_js/../src/image_stubs.js:48)
    vars: ArrayBuffer, Blob, DataView, URL, Uint16Array, Uint8Array, caml_saveImage_anchor
        ocamlopt src/reglfw.cmxs (exit 2)
    (cd _build/default && /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/bin/ocamlopt.opt -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -shared -linkall -I src -o src/reglfw.cmxs src/reglfw.cmxa)
    /usr/bin/ld: cannot find -lGLU
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
        ocamlopt bin_js/test_glfw.exe (exit 2)
    (cd _build/default && /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/bin/ocamlopt.opt -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o bin_js/test_glfw.exe -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__js__of__ocaml-499ea313/lib/js_of_ocaml -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__ocamlfind-opam__c__1.8.0-eecbed0c/lib/bytes -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__uchar-opam__c__0.0.2-835f2252/lib/uchar -I /home/bingo/.esy/3____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm -I examples -I src /home/bingo/.esy/3____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result/result.cmxa /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/lwt.cmxa /home/bingo/.esy/3____________________________________________________________________/i/opam__s__js__of__ocaml-499ea313/lib/js_of_ocaml/js_of_ocaml.cmxa /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/unix.cmxa /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/bigarray.cmxa /home/bingo/.esy/3____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm/reglm.cmxa src/reglfw.cmxa examples/EsyGlfwExamples.cmxa bin_js/.test_glfw.eobjs/native/test_glfw.cmx)
    /usr/bin/ld: cannot find -lGLU
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
        ocamlopt bin_native/test_glfw.exe (exit 2)
    (cd _build/default && /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/bin/ocamlopt.opt -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o bin_native/test_glfw.exe -I /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/threads -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/unix -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__ocamlfind-opam__c__1.8.0-eecbed0c/lib/bytes -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result -I /home/bingo/.esy/3____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm -I examples -I src /home/bingo/.esy/3____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result/result.cmxa /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/lwt.cmxa /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/unix.cmxa /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/bigarray.cmxa /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/lib/ocaml/threads/threads.cmxa /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/unix/lwt_unix.cmxa /home/bingo/.esy/3____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm/reglm.cmxa src/reglfw.cmxa examples/EsyGlfwExamples.cmxa bin_native/.test_glfw.eobjs/native/test_glfw.cmx)
    /usr/bin/ld: cannot find -lGLU
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
        ocamlopt test/test.exe (exit 2)
    (cd _build/default && /home/bingo/.esy/3____________________________________________________________________/i/ocaml-4.7.1004-a6ae015e/bin/ocamlopt.opt -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o test/test.exe -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__ocamlfind-opam__c__1.8.0-eecbed0c/lib/bytes -I /home/bingo/.esy/3____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result -I /home/bingo/.esy/3____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm -I src /home/bingo/.esy/3____________________________________________________________________/i/opam__s__result-opam__c__1.3-5fad2388/lib/result/result.cmxa /home/bingo/.esy/3____________________________________________________________________/i/opam__s__lwt-opam__c__4.1.0-e4c451c0/lib/lwt/lwt.cmxa /home/bingo/.esy/3____________________________________________________________________/i/reason_gl_matrix-0.9.9302-ff36c75d/lib/reglm/reglm.cmxa src/reglfw.cmxa test/.test.eobjs/native/test.cmx)
    /usr/bin/ld: cannot find -lGLU
    collect2: error: ld returned 1 exit status
    File "caml_startup", line 1:
    Error: Error during linking
    error: command failed: 'dune' 'build' '--root' '.' (exited with 1)
    esy-build-package: exiting with errors above...
    
  building [email protected]

Add 'pre-flight' checks for Onivim 2

This is tracking a follow-up for discussion on #189 - we want to have infrastructure to make a few checks when the app starts to establish some invariants (like a home directory is available).

For now, if these pre-flight checks fail - we'll quit the app with an actionable error message. Later, once we've addressed #81 , we might be able to have a nicer experience.

Remove need for ONI2_NEOVIM_PATH environment variable

We require setting an ONI2_NEOVIM_PATH variable as described in #35 , just so the binary can figure out where the vendored binaries are. Not ideal and always a pain to set up.

I'd like to add an esy bootstrap command that is run after esy build - this would generate a JSON or TXT file with the paths to the vendored binaries for development. Then, the executable would pick these up on initial run (our installers would also generate this, or a release build could simply figure out the relative path to the vendored binaries based on our install layout).

Note that we'll need to vendor a couple more binaries:

  • node
  • ripgrep?

So whatever solution we come up with will need to be extensible to those binaries too.

Feature Request: Native multiple cursors

I really love the multiple cursor feature of any modern editor (sublime, vscode, intellij).
You do not need this feature that often, but when you need it, it feels very productive to have it.

There are (n)vim plugins that bring this feature but I would love to have this native and well thought through for oni2.

Thank you for all your work. It already looks very promising what you have right now.

Standard keyboard shortcuts are missing (Ctrl-O etc)

The normal text editor keyboard shortcuts don't do anything. cmd-O should let me browse for a project I want to open. cmd-S should attempt to save, and in an unnamed document it should let me pick a name and a location.

Different Menu Commands Overlap

When switching between quickopen and commandPalette the commands for both can occasionally render together. This appears to be a regression as we are no longer populating the content of each menu based on type I think.
image

Handling initial [No Name] Buffer

This issue is more of a brain dump regarding what I've found about this buffer since it has proven to be non-trivial to handle. This issue relating to it first came up in #72. Currently once #76 is merged, it will show its modified status correctly and close when the cross is clicked.

If it is navigated away from on start, it is discarded. If it is modified then a user tries to return to it, currently it silently fails in Oni2.

I've found that actually this is the same behavior as terminal neovim which is actually errorring with E499: Empty file name for '%' or '#', only works with ":p:h". Essentially we're not allowed to navigate to a file without a name, which this file does not have nor does using its id work.

It can still be closed though. I think as what it does is default vim behavior this is fine for now, It makes me think though that even at this early stage it might be worth considering a splash screen and only opening buffers a user has chosen to open.

Either way we aren't doing anything that differs from neovim, but it highlights the fact that we aren't rendering errors which is confusing but should be fixed once we pick up the ext_messages change in nvim 0.4.0

Menu item filtering

Currently we use simplistic filtering strategy in the quick open that isn't very good at matching results or very quick, Ideally we would implement something that handles fuzzy matching a potentially huge list of results very quickly. @CrossR has been working on something like this for reason.

The strategy can be placed in Filter.re. If there are performance issues running this on every keystroke an alternative could be debouncing the filtering to occur only after x milliseconds (which I believe we did in Oni 1)

Does not compile

Due to many missing (I presume implicit system) dependencies the project does
not compile when one tries to follow steps outlined in the README.
I tried to install them, but finally got stuck on the harfbuzz error. That was on a Linux Mint system.
On a different Fedora machine I managed to compile it, but it crashes due to hardcoded dependency on the harfbuzz library expected on the specified path.

Please provide, if possible, working Dockerfile that describes minimal system necessary to compile and run the project.

Clean up outstanding processes when QuickOpen is closed

Currently when the quickopen is closed MenuUpdates are still sent for the rest of the ripgrep command processing. Dispatching a MenuClose should trigger cleanup for menu actions. This will need to be an effect called due to the action, but the reference to the unsubscribe will need to be passed in via quick open.

Potential solution: The menu update ?passes a reference to the unsubscribe handler inside the action so MenuClose we call its unsubscribe method

UTF8 parsing of NeovimExtType

Neovim returns a custom ExtType from MsgPck when we receive or request window,buffer or tab information, currently we convert this using Camomile in Utility.re however the parsing atm only works for single digits, so will need to be revisited so it can parse larger digits

Options I've found

  • Camomile's UTF8 Module interface file - aka figure it out
  • Batteries - has a method which seems like it would do the trick but is a ?big? library but comes up a lot as the solution to a lot of problems in ocaml so might be a good investment

:e filename autocomplete UX improvements

I noticed a few things that don't work es expected:

  1. When typing "~" the tilde only appears after typing another character and when typing "~/" what I get is "/~"

  2. When hitting the tab key the list of files inside the current folder get listed with the full path, instead of just showing the top level contents of the current folder. When looking for a file in a deep folder structure I'm not able to read the filenames because all I can see are the first path segments.

  3. the tab autocomple is case sensitive which it shouldn't be.

  4. when hitting tab on a folder the contents get listed and the first element is inserted into the path. It should list the contents without inserting so I can type letters to autocomplete on the folder content.

  5. If all files in a folder start with the same prefix the prefix should autocomplete when hitting tab on a folder and when I typed letters with multiple matches but the matches all have the same prefix which I didn't type out completely at least the prefix should be completed.

Thanks for your effort so far, I'm really looking forward to Oni 2 :)

Reason for license change

I just noticed that oni2 is licensed under a non-commercial license while oni is licensed under MIT. Out of curiosity, is there an official reason for the license change?

H, M, L Commands - strange behaviour

Given the new strategy for v2 its a given(:laughing:) that some things don't work and some won't, some though similar to zb, zt, c-d etc. are important ways to navigate a buffer without your keyboard.

I think when we encounter cases which mean that a user will have to resort to the mouse, which I think breaks the spirit of *real* vim bindings or the goal of avoiding subpar vim bindings then we should look into fixes.

Now that the super long intro is over, the issue I believe is that the High, Middle and Low commands as I call them don't move a user to the right place in a buffer, it could be that theres some init.vim settings missing but I think in this case its more likely that somehow our control of the view layer means that somehow vim isn't aware of what is currently in view so the command doesn't know where to correctly place the cursor.

I think these are good candidates to replace with Oni commands, which equate to H - position at the top of the view port, M - position in the Middle of viewport and L position at the bottom

Using the tab key is unreliable

When using the tab key, the cursor moves where it seems it should, but the text entered is far less indented than it should be. You can see the behavior in the attached gif

bad tabbing

Difficulty compiling and running oni2

So i have tried numerous times installing and running oni2 with no success. This time i got closer
everything run successfully even the esy test 0 fails but when doing esy run, I get this error
Oni2: /home/manos/.esy/3____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/src/window.c:1049: glfwSetFramebufferSizeCallback: Assertion `window != NULL' failed

Syntax Highlighting

This is a collection of some thoughts around syntax highlighting - since Oni2 controls the render/view layer, it's important for it to be able to get handle syntax highlighting!

Since Oni2 will be compatible with VSCode plugins - having compatible highlighting with VSCode is important. In other words, if you install a VSCode language plugin for Python, Go, etc, we should have the same syntax highlighting experience as VSCode for those languages.

At this time - this necessitates using textmate highlighting. (Thanks @CrossR for pointing out though that tree-sitter is on VSCode's roadmap: microsoft/vscode#585 microsoft/vscode#50140)

We implemented an initial approach to this in Oni1, based on vscode-textmate - so a near-term strategy is to leverage that syntax highlighting piece. The downside is that it is node-based, so would have to run asynchronously as a separate node process. I think this is a reasonable tradeoff at the moment to get syntax highlighting, but down the road, we should pursue a native strategy (tree-sitter would be perfect for that - or a native version of vscode-textmate, as it is a wrapper around a native regex library).

Part 1: Client interface for Syntax Highlighting

We should design an initial API for our syntax highlighting that can support either an in-proc or out-of-proc model, and both synchronous and asynchronous modes.

A potential interface for this could be:

module type SyntaxHighlighter {
     notifyBufferActive(bufferInfo);
     notifyBufferUpdate(bufferUpdate);
  
     onHighlightTokens: Event.t(SyntaxHighlightInfo.t);

     getHighlightAt(bufferInfo, bufferLine, bufferColumn);
}

As we get buffer updates - we'd broadcast them to the SyntaxHighlighter via notifyBufferUpdate. As the tokens are parsed and colorized (asynchronously), we'd get onHighlightTokens events that we could use to notify the UI to re-render.

The interface could also provide a way to query the latest highlight information, which we could use for rendering to pick the right tokens.

Part 2: Integrate TextMate highlighting service

We could extract out the Oni service responsible for parsing buffers based on textmate grammars and bring it over as a project like src/textmate-service. We'd also need to vendor a node binary like we do for nvim today.

We could actually simplify what we did in Oni - since we didn't use a webworker at the time, we try to spread the syntax highlighting work over multiple frames via a complex job concept. We could streamline and remove that - the perk of it being its own process is that it won't block rendering or the front-end.

Part 3: Native TextMate highlighting / tree-sitter?

Scrolling Up: Dropped frames + flicker + rendering artifacts

@jordwalke noticed that there is some weirdness when scrolling up:
flicker-scroll-up-1

This isn't just with fast scrolling - it reproduces deterministically if you just scroll up at the boundary:
flicker-scroll-up-2

If you scroll down when the line number doesn't update - there are some rendering artifacts and the cursor position is off by a bit.

Bug: Edit an existing file doesn't work

Repro: Try and open a file with :e, like :e some-existing-file<CR>.

Expected: File should be loaded and shown
Actual: No content is rendered

The issue is that we rely on listening to Neovim for buffer updates to get the buffer information via the nvim_buf_attach method. When we open a new buffer, we need to call that nvim_buf_attach method.

Right now, we only call it once on load for the initial buffer:

let _ =

We should move this logic so that we don't ever have to manually attach - we could add a listener in the NeovimProtocol here:

If we've received a buffer enter event - we should call nvim_buf_attach for the new buffer (and detach from existing buffers?)

We'd also need to add that BufferEnter notification - which we don't have today:

| CursorMoved(AutoCommandContext.t)

and handled parsing it here:

switch (autocmd) {

We'd need to make sure we get the context we need from it (perhaps just the buffer id)?

Build prerequisites are missing some components

Some prerequisites are not mentioned in the Readme.md

  • Python 2
    As I found out, node-gyp needs Python 2.x (don't know which is the oldest it can use). Easiest way to fix Python 3 rooted error to PREpend Python 2's path to PATH variable, when building Textmate.
  • Node.js
    Maybe it sounds silly to mention it, but: even though I work in place with more than 50 programmers, I doubt there is even 5 who has it installed - we work in the medical field, so mostly C++ is the used language.
    Yeah, it was silly, Esy's prerequisite is node.js 😳

I don't know what else is missing though, I have quite the stuff installed.

Bug: undefined symbol: hb_blob_create_from_file

Hi, I stumble upon this problem in the recent build of Oni2. It works some commits after revery update, but then it just broke and yields symbol lookup error.

I believe the problem resides to esy-harfbuzz from reason-fontkit as the symbol missing is hb_blob_create_from_file.

esy x Oni2 log

Starting oni from binary path: /home/luibo/APP/oni2/vendor/neovim-0.3.3/nvim-linux64/bin/nvim
starting request: 1550432417.65
ending request: 1550432417.66|0.0130469799042
/home/luibo/APP/oni2/_esy/default/store/i/oni2-609ac505/bin/Oni2: symbol lookup error: /home/luibo/APP/oni2/_esy/default/store/i/oni2-609ac505/bin/Oni2: undefined symbol: hb_blob_create_from_file

esy x OniUnitTestRunner
OniUnitTestRunner.log

$ esy --version
0.5.6
$ esy ls-build
info ls-builds 0.5.6 (using package.json)
[email protected] [build pending]
├── @esy-ocaml/[email protected] [built]
├── @opam/camomile@opam:1.0.1 [built]
├── @opam/dune@opam:1.7.1 [built]
├── @opam/lwt@opam:4.1.0 [built]
├── @opam/merlin@opam:3.2.2 [built]
├── @opam/msgpck@opam:1.4 [built]
├── @opam/ocamlbuild@opam:0.12.0 [built]
├── @opam/ppx_deriving@opam:4.2.1 [built]
├── @opam/ppx_deriving_yojson@opam:3.3 [built]
├── @opam/yojson@opam:1.5.0 [built]
├── @opam/zed@opam:1.6 [built]
├── @reason-native/[email protected] [built]
├── [email protected] [built]
├── [email protected] [built]
└── [email protected] [built]

Performance: Long Lines

There's a bug right now where we are drawing every token of a line - you can imagine when a file has very long lines - or a single long line - this would be a performance killer!

We need to optimize both the minimap and surface to pick out only the renderable tokens, and skip other ones.

In addition, we should disable syntax highlighting for very long lines (as VSCode does)

Native Syntax Highlighting

We currently use the vscode-textmate library to facilitate syntax highlighting and theming. However, because it's node, that necessitates we run a separate node process for this, and we have to maintain duplicate state for the buffers, which is an expensive use of memory.

Ideally, we could run this in-proc in our ReasonML front-end. If we had a version of this library that was in reasonml or ocaml instead of node, we could facilitate this easily.

The work required is to create a reasonml version of the library, like reason-textmate that has a similar API. The library itself is a wrapper around the oniguruma regex library, so we'd probably want to preserve that and use the C FFI to talk to it.

QuickOpen: Add scrollbar to menu

In Oni1, we had a scrollbar for our Menu / quickopen:
oni1-scroll-bar

Our current QuickOpen experience doesn't have this in Oni2 - would be nice to bring this back!

Configuration.json file path if wrong on Windows

Hi!

After successfully building Oni on Win (10), it cannot be started:
Error message:
Fatal error: exception Sys_error("/mnt/g/Works/WorkForVS2017/oni2/assets/configuration/configuration.json: No such file or directory")

No surprise that /mnt does not exists here.
By the way, earlier build (Feb.21) was able to start.

Keep up the good work please, I am thrilled by this project, and love the Oni(1)! 👍

Build oni2 failed behind network proxy

I build Oni2 behind a network proxy failed.

 SZX1000428519  baas   master  ~  my  oni2  esy build
info esy build 0.5.6 (using package.json)
info building [email protected]@d41d8cd9
error: build failed with exit code: 1
  build log:
    # esy-build-package: building: [email protected]
    # esy-build-package: pwd: /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9
    # esy-build-package: running: 'make' 'build-glfw' 'ROOTDIR=/home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9' 'WIN32=0'
    echo Library: /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/src
    Library: /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/src
    echo Include: /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/include
    Include: /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/include
    mkdir -p /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build
    git clone https://github.com/glfw/glfw /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw
    Cloning into '/home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw'...
    fatal: unable to access 'https://github.com/glfw/glfw/': Failed to connect to github.com port 443: Connection timed out
    Makefile:14: recipe for target '/home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/include/GLFW/glfw3.h' failed
    make: *** [/home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw/include/GLFW/glfw3.h] Error 128
    error: command failed: 'make' 'build-glfw' 'ROOTDIR=/home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9' 'WIN32=0' (exited with 2)
    esy-build-package: exiting with errors above...
    
  building [email protected]
esy: exiting due to errors above

but I git clone glfw directly on bash, it's ok!

  SZX1000428519  baas   master  ~  my  oni2  git clone https://github.com/glfw/glfw /home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw
Cloning into '/home/baas/.esy/3_____________________________________________________________________/b/esy_glfw-3.2.1009-65d18ba9/_build/glfw'...
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 23233 (delta 15), reused 19 (delta 9), pack-reused 23202
Receiving objects: 100% (23233/23233), 11.48 MiB | 777.00 KiB/s, done.
Resolving deltas: 100% (16279/16279), done.
  SZX1000428519  baas   master  ~  my  oni2 
``` 

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.