Skip to content

Conversation

@KonerDev
Copy link
Member

@KonerDev KonerDev commented Oct 25, 2025

This PR improves the command palette in Xed-Editor.
It is intended to close #891 and #661 in the future.

Features

  • Improve command palette design
  • Add search bar
  • Add recently used
  • Add commands
  • Allow you to open the command palette even if no tabs are open

I also made two small LSP corrections here, one for the theming and one for a language inconsistency.

Missing features

  • Universal command storage (see note below)
  • More actions
    • LSP actions
    • Actions from KEYBINDS.md
  • Gestures as described in Command Bar #661: Swipe down from the top to open
  • Allow the user to customize the command actions displayed in the top bar (currently predefined).
  • Additionally, allow customization of input view symbols and navigation symbols such as the command palette one

Todos for another PR

Screenshots

Screenshot_20251026_181425_Xed-Debug
Screenshot_20251101_110154_Xed-Debug

Note

@RohitKushvaha01
The current problem, however, and also the reason why this is only a draft, is that I don't know where to store the commands. We need a universal solution, as there is currently duplicate code, as the commands are registered in CommandProvider.kt and, for example, EditorActions.kt.

I would suggest simply storing all actions in the CommandProvider and accessing them from the EditorActions.

github-actions[bot]

This comment was marked as resolved.

@Xed-Editor Xed-Editor deleted a comment from github-actions bot Oct 25, 2025
@RohitKushvaha01
Copy link
Member

RohitKushvaha01 commented Oct 25, 2025

[!NOTE]
@RohitKushvaha01
The current problem, however, and also the reason why this is only a draft, is that I don't know where to store the commands. We need a universal solution, as there is currently duplicate code, as the commands are registered in CommandProvider.kt and, for example, EditorActions.kt.

I would suggest simply storing all actions in the CommandProvider and accessing them from the EditorActions.

You are right, Acode has implementation similar to this

@RohitKushvaha01 RohitKushvaha01 added the enhancement New feature or request label Oct 25, 2025
@RohitKushvaha01 RohitKushvaha01 force-pushed the feat/better-command-palette branch from 6d37736 to f5571b5 Compare October 26, 2025 08:52
@Volt83
Copy link
Contributor

Volt83 commented Oct 26, 2025

I was waiting for this feature for a long time

@KonerDev
Copy link
Member Author

@RohitKushvaha01 Do you have any idea how to fix the keyboard flickering?

Steps to reproduce the issue

  1. Focus the editor so that the keyboard is visible.
  2. Open the command palette using the button in the symbol input view.
  3. Observe how the keyboard briefly disappears and reappears.

@RohitKushvaha01
Copy link
Member

@RohitKushvaha01 Do you have any idea how to fix the keyboard flickering?

Steps to reproduce the issue

  1. Focus the editor so that the keyboard is visible.
  2. Open the command palette using the button in the symbol input view.
  3. Observe how the keyboard briefly disappears and reappears.

This happens because Editor is a AndroidView and the InputFeild in command palatte is a composable, to fix this you have to use EditText view using AndroidView in place of inputfield

@KonerDev
Copy link
Member Author

@RohitKushvaha01 Do you have any idea how to fix the keyboard flickering?

Steps to reproduce the issue

  1. Focus the editor so that the keyboard is visible.
  2. Open the command palette using the button in the symbol input view.
  3. Observe how the keyboard briefly disappears and reappears.

This happens because Editor is a AndroidView and the InputFeild in command palatte is a composable, to fix this you have to use EditText view using AndroidView in place of inputfield

Then I have no Material Design input, I'll just leave it as is, it's not that big of a problem.

@KonerDev KonerDev marked this pull request as ready for review November 1, 2025 10:17
@KonerDev
Copy link
Member Author

KonerDev commented Nov 1, 2025

@RohitKushvaha01
You can merge it now. There's only one remaining issue; see if you can resolve it. Due to the imePadding in the Command Palette, it's impossible to close the Command Palette if you type something in the search bar with the keyboard open and then press below the Command Palette. It only closes if you press, for example, to the right of the Command Palette.

@RohitKushvaha01 RohitKushvaha01 merged commit 475b6d1 into Xed-Editor:main Nov 1, 2025
@KonerDev KonerDev deleted the feat/better-command-palette branch November 1, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add paste to menu

3 participants