Code Monkey home page Code Monkey logo

Comments (7)

jfcherng avatar jfcherng commented on August 11, 2024

We (me, and @TerminalFi) discussed this before in a private chat. We didn't think this is solvable due to ST's API limitation.


This was the conclusion made by me:

They actually have different view ids. I try to add

    @classmethod
    def applies_to_primary_view_only(cls) -> bool:
        return False

but now both views sent a payload
I didn't find something like "active_buffer()" from API docs.
it's either

  • both views' on_modified_async get triggered
  • or only primary (original) view's on_modified_async get triggered

but both have their own issues

from lsp-copilot.

gregsadetsky avatar gregsadetsky commented on August 11, 2024

Super interesting! I wonder if a warning could be displayed..? That might be less confusing than not seeing Copilot (it took me a second to understand what was going on - since I had traced the issue before, I got it, but it could be confusing to someone who doesn't know?)

from lsp-copilot.

TerminalFi avatar TerminalFi commented on August 11, 2024

It's something we are still considering. We might need to open a FR with Sublime.

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024

Hmmm... seems get a working fix but I am not sure whether it causes other issues.

from lsp-copilot.

rchl avatar rchl commented on August 11, 2024

I haven't looked into the code of this package but I guess LSP must be handling such cases already? Maybe should get inspiration from there?

Not sure if relevant but LSP checks view.is_primary() in some places.

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024

I haven't looked into the code of this package but I guess LSP must be handling such cases already? Maybe should get inspiration from there?

Yeah. LSP seems working fine. Will check later.

from lsp-copilot.

gregsadetsky avatar gregsadetsky commented on August 11, 2024

Just confirmed, it works! Thank you so much for fixing this!!

from lsp-copilot.

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.