Code Monkey home page Code Monkey logo

Comments (17)

partounian avatar partounian commented on July 28, 2024 1

@Allaman it was a recommendation by one of the copilot plugins, I recall doing the same.

from nvim.

Allaman avatar Allaman commented on July 28, 2024

You should use tab to select the suggestion from Copilot and then hit enter to insert it

from nvim.

aphsa avatar aphsa commented on July 28, 2024

Tab under the Python "for" statement , inserts a tab. It does not select the suggestion. When i press enter , it creates a newline.

from nvim.

Allaman avatar Allaman commented on July 28, 2024

This is how it should look. I need to enable Copilot first, as it is off in my config (I have overwritten autostart in my user-specific config file).

After the copilot suggestion pops up, I hit tab to select it and enter to insert it

copilot

from nvim.

aphsa avatar aphsa commented on July 28, 2024

What you showed me up there works for me too until line 13 (in this example) where tab doesn't highlight the copilot recommendation anymore and only keeps on moving the cursor forward on line 13.

   4 def Summary():
    3 │   """dfsdfsd"""
    2 │   for line in run_command("journalctl --disk-usage"):
    1 │   │   if line.startswith("Archived and active journals take up"):
  13  │   │   │   │   │
    1 │   │   │   liner= line.replace("...1ls take up", "")  Copilot
    2 │   │
    3 │

from nvim.

Allaman avatar Allaman commented on July 28, 2024

You config include my latest commits, including the configuration for cmp?
Can you provide a minimal not working example of Python code, or does Copilot auto-completion in general not work?

from nvim.

aphsa avatar aphsa commented on July 28, 2024

Yes i have the latest commit. Does this python screenshot help.

2023-10-09-163451_3840x2160_scrot

I am not able to tab into that copilot suggestion. See that in the screenshot?

from nvim.

partounian avatar partounian commented on July 28, 2024

I haven't had an issue with Copilot on my side either.

I can test on my machine as well, if you wanna share your python script & config for this repo. Have you made any changes to this repo?

from nvim.

aphsa avatar aphsa commented on July 28, 2024

I didn't make any changes to this repo. In fact I deleted my existing config and git cloned a the latest version.

I should have given the code before. But look for the python script here -> https://github.com/aphsa/copilottest.git
Go to line 81 and try to add the copilot suggestion and let me know if you have the same issue.

from nvim.

Allaman avatar Allaman commented on July 28, 2024

sry, I can't reproduce it with your code either :(

copilot

@partounian Could you take a look at the provided code as well please?

from nvim.

aphsa avatar aphsa commented on July 28, 2024

Try not typing "if" and wait for the copilot recommendation

from nvim.

partounian avatar partounian commented on July 28, 2024

If there is nothing typed, I do see the behavior of just the cursor moving forward rather than accepting the autocomplete.

from nvim.

partounian avatar partounian commented on July 28, 2024

@aphsa is there any issue for you, if you type if then accept that recommendation?

from nvim.

aphsa avatar aphsa commented on July 28, 2024

If I type the "if" the recommendation applies after tabbing. Like you said above, if I don't type "if", the cursor spaces forward after tabbing instead of applying the copilot recommendation. I want to know if that is normal?

from nvim.

partounian avatar partounian commented on July 28, 2024

I believe it is normal behavior. If you remove the has_words_before here it might change that behavior

from nvim.

aphsa avatar aphsa commented on July 28, 2024

I believe it is normal behavior. If you remove the has_words_before here it might change that behavior

That worked. Thank you

from nvim.

Allaman avatar Allaman commented on July 28, 2024

thanks @partounian

I can't figure it out why I added the has_words_before :/ I guess it was an issue with snippets and cmp, but I am not sure.

from nvim.

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.