-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor restructure for pynvim 0.4.3 backwards compatibility #34
Conversation
Thanks @errnoh for your work.
I tried the manual install on the 1st version from @gptlang and it works for me.
Could you elaborate on this point? What is your neovim setup, python version? |
@jellydn hmm, interestingly enough I think the main issue seems to be that I had two pynvim versions installed and CopilotChat used one for it's heatlhcheck and vim actually used the other one for executing commands. What this PR actually seems to do is at least provide backwards compatibility with pynvim 0.4.3. (modified PR title to mirror this) With the repo cloned to
(mymodule is not related)
With the 0.4.3 removed and only using 0.5.0:
Both |
Though the health check not working in this setup should probably be fixed as well. Is it using python found from |
Great. Thanks @errnoh. I've just changed this PR to Let's see if @gptlang and @ziontee113 have any comments/thoughts on this PR. IMO, I could merge this to canary and test on my side as well. |
Added one more commit to ensure that the correct python binary is being used and that it reports >=0.4.3 as valid versions. |
In what versions does relative imports not work? I really don't like Could adding |
Took a look at this with fresh pair of eyes and figured out a simple way to get best of both worlds. Imports are now fixed in the latest commit and are 1:1 with the original code but just added package declaration at the start of the import. |
Thanks @errnoh Could you fix the conflict? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
* Intergrate ziontee113/CopilotAgent.nvim (CopilotC-Nvim#27) * feat: add libraries from ziontee113/CopilotAgent * feat: add chat handlers from CopilotAgent * feat: add "mycopilot" module from CopilotAgent * feat: add "tools" module from CopilotAgent * feat: add copilot-agent.py * feat: conditionally check for tiktoken module * Add renamed CopilotAgent commands to README.md (CopilotC-Nvim#29) * ref: rename commands to prefixed with CopilotChat * docs: add renamed CopilotAgent commmands * docs: add default key mapping --------- Co-authored-by: Dung Duc Huynh (Kaka) <[email protected]> * docs: add note about the canary branch docs: fix keymap for in-place command * chore: update dict * docs: add demo videos for Fold & Inplace (CopilotC-Nvim#31) * chore: remove testing commands and layout component fix: remove matrix testing code * docs: remove copilot chat vspilt command * feat: add toggle layout and new split preset commands * revert: add internal comands back for inplace chat * chore: add a note about chat handler * feat: show spinner on processing * feat: show key binding on help section * docs: fix usage for InPlace command * docs: add demo for token count and demo * feat: add C-h to toggle help section * docs: add usage for InPlace command * chore: sync fork * refactor: create dedicated function for help text with layout * feat: add option for hide or show the help text on InPlace * Fix module import error by using typing.List (CopilotC-Nvim#33) Co-authored-by: Cassius0924 <[email protected]> * docs: add Cassius0924 as a contributor for code (CopilotC-Nvim#34) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * feat: add user prompt and clear history on InPlace command * docs: fix usage for install manually * feat: add new keymap for change system prompt * feat: add debug flag * docs: add debug file path when enable debug mode * docs: notify end user to run UpdateRemotePlugins command after install plugin * chore: sync fork Add system prompt to ask Handle bad error code after calling post * chore: sync fork and remove unused * docs: add Discord link * chore: sync fork * refactor!: drop CC commands * docs: remove branch on usage --------- Co-authored-by: Trí Thiện Nguyễn <[email protected]> Co-authored-by: He Zhizhou <[email protected]> Co-authored-by: Cassius0924 <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
I was wondering why just cloning the repo to
rplugin/python3
and running:UpdateRemotePlugins
didn't work and spent some time looking into it. Turns out that it should, but some issues in the structure prevent that. To fix that I modified the rplugin and related imports to work similarly to the example pynvim module.pros:
cons:
from .XXX import *
works butfrom .XXX import Y, Z
doesn't.