Skip to content
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

Autocomplete: Add option to disable inside code comments #3049

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

philipp-spiess
Copy link
Contributor

@philipp-spiess philipp-spiess commented Feb 6, 2024

Closes #3038

Adds a new user config option to prevent completions inside code comments.

@valerybugakov I didn't get the test to run since the intent detection is never run because the parser cache is always empty even though I ran initTreeSitterParser(). Do you know how we can get this enabled in unit tests? I would expect a call to provideInlineCompletions to preload the parser cache if we have called initTreeSitterParser before but I don't think this happens right now. Perhaps because we query it before the stuff inside get-inline-completions but we do call into tree sitter before that so I think this should work. 😄

Test plan

Screen.Recording.2024-02-06.at.13.09.59.mov

@philipp-spiess
Copy link
Contributor Author

Ah we do it manually in tests via this I seeeee

@philipp-spiess philipp-spiess requested review from valerybugakov and a team February 6, 2024 12:29
Copy link
Member

@valerybugakov valerybugakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fabulous!

@philipp-spiess philipp-spiess merged commit 01b1877 into main Feb 7, 2024
15 checks passed
@philipp-spiess philipp-spiess deleted the ps/ac-disable-inside-comments branch February 7, 2024 17:07
@sjurgis
Copy link

sjurgis commented Apr 29, 2024

Can we get this for jetbrains IDEs?

Comment completion really grinds my gears as I use it to brainstorm :|

@sjurgis
Copy link

sjurgis commented May 15, 2024

@philipp-spiess any chance you can point me how to use this setting in Jetbrains IDEs?

@philipp-spiess
Copy link
Contributor Author

@sjurgis I'll defer to @pkukielka but chances are we don't have the setting there yet.

@pkukielka
Copy link
Contributor

We do not support it yet but it should be a quick job to add it.
@taylorsperry @kalanchan can prioritise it

@sjurgis
Copy link

sjurgis commented Jun 23, 2024

@taylorsperry @kalanchan that would be a nice differentiator as no other assistant supports this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feedback: Turn off autompletion for comments
4 participants