onivim / oni2 Goto Github PK
View Code? Open in Web Editor NEWNative, lightweight modal code editor
Home Page: https://v2.onivim.io
License: MIT License
Native, lightweight modal code editor
Home Page: https://v2.onivim.io
License: MIT License
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?
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
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
src/editor/Core/Filesystem.re :: getOniDirectory
implementation.unsafeFindHome
- using .config is smelly on Windows, Oni used AppData/Roaming/Oni
, instead of Appdata/Local/.config/oni2
by the way.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
Steps:
esy x Oni2
: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")
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.
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)
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! ❤️
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?
Repro:
<c-p>
)abc
)<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>
).
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').
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).
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.
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.
I guess there is no need to calculate relative line number here src/editor/UI/EditorSurface.re#L107 and use just bufferLine
The minimap is currently pretty wide:
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.
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
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]
This is tracking adding mouse support for the minimap scrollbar:
We might be able to re-use some of the implementation in the slider: https://github.com/revery-ui/revery/blob/99d3a7a9ebed3ef7813b5646cbaabd1b5d4a82fa/src/UI_Components/Slider.re#L121
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.
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.
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.
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.
Repro:
esy run
Expected: Should be a no-op since the app is already app
Actual: Crashes with:
Fatal error: exception Out of memory
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
https://gfycat.com/HarmfulHatefulBeauceron
In the video above, I press 'é' 3 times for a single one to show up. Each one has the width of 2 characters. (I think it does that on accented characters.)
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)
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.
Currently when the quickopen
is closed MenuUpdate
s 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
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
I noticed a few things that don't work es expected:
When typing "~" the tilde only appears after typing another character and when typing "~/" what I get is "/~"
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.
the tab autocomple is case sensitive which it shouldn't be.
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.
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 :)
Meaning, can you reuse the plugins that work for Vim8/NeoVim in Oni2?
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?
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
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
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).
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.
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.
@jordwalke noticed that there is some weirdness when scrolling up:
This isn't just with fast scrolling - it reproduces deterministically if you just scroll up at the boundary:
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.
It'd be ideal to have an 'in-proc' version of vscode-snipper-parser
that we can call within our front-end.
Alternatively, we could implement this 'wrapper' API: https://github.com/onivim/oni/blob/master/browser/src/Services/Snippets/OniSnippet.ts
But it'd be preferable for performance / user experience to handle this in our 'front-end' process vs having to handle it asynchronously in one of the node helper processes.
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:
Line 124 in 919cc8f
We should move this logic so that we don't ever have to manually attach - we could add a listener in the NeovimProtocol
here:
oni2/src/editor/Neovim/NeovimProtocol.re
Line 59 in 919cc8f
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:
oni2/src/editor/Neovim/Notification.re
Line 39 in 919cc8f
and handled parsing it here:
oni2/src/editor/Neovim/Notification.re
Line 177 in 919cc8f
We'd need to make sure we get the context we need from it (perhaps just the buffer id)?
Some prerequisites are not mentioned in the Readme.md
I don't know what else is missing though, I have quite the stuff installed.
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]
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)
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.
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)! 👍
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
```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.