Skip to content

start work on menus#43

Open
Andriamanitra wants to merge 11 commits into
mainfrom
add-menus
Open

start work on menus#43
Andriamanitra wants to merge 11 commits into
mainfrom
add-menus

Conversation

@Andriamanitra
Copy link
Copy Markdown
Owner

@Andriamanitra Andriamanitra commented Feb 25, 2025

TODO:

  • Use menus for window/showMessageRequest
  • Use menus for showReferenceLocations
  • Use menus for showSymbolLocations
  • Use menus for textDocument/codeAction
  • namespace for menu.lua
  • try to make the code less ugly (especially the event handlers)

@Andriamanitra
Copy link
Copy Markdown
Owner Author

Not sure if the current API is what I want to go with – I really liked the simplicity of Menu{ ["label"] = function () ... end } that I had initially. I had to make it more complicated to make the following possible:

  • a header that explains what the menu is about
  • multiple different actions on the same line (jump to reference with Enter or just show it with Tab)
  • empty lines as separators

Maybe there's a simpler design that still allows these?

@Andriamanitra
Copy link
Copy Markdown
Owner Author

recording of the code actions in action: https://asciinema.org/a/706619

@Andriamanitra
Copy link
Copy Markdown
Owner Author

With the latest commit Rust-analyzer's code actions work too, so we can finally fill in missing trait members https://asciinema.org/a/706639 🎉

@Andriamanitra Andriamanitra marked this pull request as ready for review March 5, 2025 18:26
@Andriamanitra Andriamanitra added the experimental Experimental feature, good for testing but not to be merged label May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental Experimental feature, good for testing but not to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant