Code Monkey home page Code Monkey logo

illumination's Introduction

Nvim Illumination : A lightweight GTK live preview for your notes


An illuminated manuscript is a manuscript in which the text is supplemented with such decoration as initials, borders (marginalia) and miniature illustrations. In the strictest definition, the term refers only to manuscripts decorated with either gold or silver; but in both common usage and modern scholarship, the term refers to any decorated or illustrated manuscript from Western traditions.

From Wikipedia, the free encyclopedia


Nvim Illumination is a simple Neovim plugin to render buffers in a WebKit2Gtk window. Since it uses the Neovim rpc-api to send buffer updates, ⚠️ it will not work with vim ⚠️.

Note that unlike many note rendering plugins Illumination does not render files, it renders your buffer directly via nvim rpc api, it means you don't need to save the current buffer to render your notes, it is really live!

Issues and PRs are welcome!

example screenshot

Intallation

Manual installation


git clone  https://github.com/oknozor/illumination/
cd illumination
./install

Using vim-plug

Requirement

  • vim-plug obviously
  • Rust with cargo as a package manager
  • You need to have $HOME/.cargo/bin/ in your $PATH : you can add the following line in your bashrs, zshrc or /etc/profile : export PATH="$HOME/.cargo/bin:$PATH"
Plug 'oknozor/illumination', { 'dir': '~/.illumination', 'do': '.install.sh' }

Usage

Command Description
:Illuminate Start rendering the current buffer
:IlluminateClose Close Illumination
:IlluminateLock Toggle lock (won't change active buffer)
:IlluminateOpen Render a local file or an URL and toogle lock

Debug

To debug Illumination start nvim in RPC mode on port 6666 :

nvim test.md --listen 127.0.0.1:6666

Then run Illumination without cargo --release option.

cd illumination
cargo run 

illumination's People

Contributors

cosmoduff avatar oknozor 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

Watchers

 avatar  avatar  avatar  avatar

illumination's Issues

nvimMd: rpc process is not executable

Deployment via vim-plug seems to work, the path directories are created and the content is inside.
However, with both a new file and a previously saved file, each time I run :Illuminate this error happens:

Error detected while processing function <SNR>9_render:
line    5:
nvimMd: rpc process is not executable

Add Lock mode

Add the ability for the user to lock illumination on the current note. Illumination should then stop listening for buffer change rpc message until unlocked (shall still listen for changes).

Links should opened in external browser

When viewing a markdown file with a link and clicking on that link, the page opens in the illumination window.

Wouldn't it be better to open the page in the default browser ?

Error building illumination

Hello! I'm trying to use this on Fedora 30, and this is the error I get:

➜  .illumination git:(master) ✗ cargo build     
   Compiling illumination v0.2.0 (/home/esilva/.illumination)
error[E0277]: the trait bound `gio::auto::cancellable::Cancellable: glib::object::IsA<gio::auto::cancellable::Cancellable>` is not satisfied
   --> src/ui/app.rs:121:39
    |
121 |     webview.run_javascript(js_scroll, None::<&gio::Cancellable>, move |msg| {
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `glib::object::IsA<gio::auto::cancellable::Cancellable>` is not implemented for `gio::auto::cancellable::Cancellable`

error[E0277]: the trait bound `webkit2gtk::auto::web_view::WebView: glib::object::IsA<gtk::Widget>` is not satisfied
  --> src/ui/content.rs:16:25
   |
16 |         container.pack1(&preview, true, true);
   |                         ^^^^^^^^ the trait `glib::object::IsA<gtk::Widget>` is not implemented for `webkit2gtk::auto::web_view::WebView`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: could not compile `illumination`.

To learn more, run the command again with --verbose.

The rust version is 1.40.0.

Thanks, nice project!

Add a user note directory

  • add a side panel with displaying user defined notes directory (via toml config file).
  • add rpc message to open file in neovim on click.

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.