Giter Site home page Giter Site logo

Running inside Oni about semshi HOT 8 OPEN

numirias avatar numirias commented on September 21, 2024
Running inside Oni

from semshi.

Comments (8)

numirias avatar numirias commented on September 21, 2024

@CrossR Do you know if Oni implements buffer highlighting? After some quick tests, it seems calls like nvim_buf_add_highlight() don't have any effect.

Semshi relies on that API for its highlighting, so without it the plugin wouldn't be of much use inside Oni anyway.

Edit: Sorry, my bad. There seems to be another unrelated issue with Oni not recognizing Semshi's highlight groups, therefore not displaying the highlights.

from semshi.

CrossR avatar CrossR commented on September 21, 2024

It could be the Oni is overriding some of the events Semshi is using somehow.

There is a tonne of autocmds setup over here : https://github.com/onivim/oni/blob/master/vim/core/oni-core-interop/plugin/init.vim

I'm going to try and remove them and see if that changes the behaviour of Semshi.
And it should work for highlights, or at least Oni uses them in a few places for LSP related bits.

from semshi.

numirias avatar numirias commented on September 21, 2024

And it should work for highlights, or at least Oni uses them in a few places for LSP related bits.

Yep, I could make highlighting work after re-applying the highlight groups in my init.vim. However, I noted refreshing highlights in large files seems a bit slower than in neovim directly and some highlights are still missing -- I'll see what I can do to improve that (or whether its a bug in Oni).

from semshi.

CrossR avatar CrossR commented on September 21, 2024

Yep, I could make highlighting work after re-applying the highlight groups in my init.vim.

There is certainly a known issue where highlights from a users init.vim are being clobbered by Oni settings, wouldn't surprise me if that is popping up here again. Its something I'm hoping to look into from this next week, so I'll see if fixing that helps as well.

from semshi.

numirias avatar numirias commented on September 21, 2024

It looks like none of VimEnter, BufEnter and GUIEnter is triggered (or gets through to Semshi) when starting up Oni with a Python file. Want me to file an issue over there?

from semshi.

CrossR avatar CrossR commented on September 21, 2024

Sure! Would be good to have an issue tracking that. I'm intending to mess with the Python API so I'll hopefully clean up these bugs first.

from semshi.

numirias avatar numirias commented on September 21, 2024

Just to let you know, I made a change so that Semshi ensures initialization irrespective of the event order (83f56bf) as this has also caused problems elsewhere (#11) - just in case you're still investigating and seeing changed behavior.

Now, the only major difference when running inside Oni seems to be that it doesn't apply (or clears) Semshi's highlight group declarations which therefore need to be re-applied manually.

from semshi.

132ikl avatar 132ikl commented on September 21, 2024

As an addendum, the selected word higlight only works if you reload the colorscheme, or run :hilight, strangely enough. :redraw does not do anything.

from semshi.

Related Issues (20)

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.