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

Suggestion: key for closing the suggestions panel #129

Closed
viraptor opened this issue Jan 1, 2024 · 7 comments
Closed

Suggestion: key for closing the suggestions panel #129

viraptor opened this issue Jan 1, 2024 · 7 comments

Comments

@viraptor
Copy link

viraptor commented Jan 1, 2024

If I request more completions and get a panel of them, it seems there's no easy way to dismiss it apart from the "close" button at the top.
I'd like to be able to <esc> out of it / close it.

@TerminalFi
Copy link
Owner

You can already do this by adding your own key binding for the command copilot_close_panel_completion

@Mr-HaleYa
Copy link

Mr-HaleYa commented Jan 8, 2024

image
Go to keybinds and add

	{
		"keys": ["ctrl+shift+`"],  // <----SET YOUR KEYBIND HERE
		"command": "copilot_close_panel_completion"
	},

Also talked about in #88

@viraptor
Copy link
Author

I'm trying something that should probably work, but doesn't:

    { "keys": ["escape"], "command": "copilot_close_panel_completion", "context":
        [
            { "key": "is_visible_panel_completions", "operator": "equal", "operand": true }
        ]
    }

Based on the commit referenced in the issue you mentioned. Any idea what's going wrong here?

@TerminalFi
Copy link
Owner

Key is setting.copilot.completion.is_visible_panel_completion

@viraptor
Copy link
Author

Tried:

    { "keys": ["escape"], "command": "copilot_close_panel_completion", "context":
        [
            { "key": "setting.copilot.completion.is_visible_panel_completion", "operator": "equal", "operand": true }
        ]
    }

and it doesn't work with the panel open.

@TerminalFi
Copy link
Owner

@viraptor I've identified the issue and I am working on it

@TerminalFi
Copy link
Owner

Just to give you an update HTMLSheets don't have a settings object and therefore we can't actually check or set a setting value.

So this is what fails to provide a way to do context keybindings. There is an open issue on Sublime text for a similar issue. Which would also fix this. sublimehq/sublime_text#3826

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

No branches or pull requests

3 participants