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

Dioxus LSP to auto suggest available properties of rsx #2187

Closed
gusinacio opened this issue Mar 29, 2024 · 3 comments
Closed

Dioxus LSP to auto suggest available properties of rsx #2187

gusinacio opened this issue Mar 29, 2024 · 3 comments
Labels
enhancement New feature or request rsx Related to rsx or the dioxus-rsx crate

Comments

@gusinacio
Copy link

Feature Request

Create an LSP implementation of rsx to auto-suggest all the properties available for rsx. Right now, rust-analyzer doesn't suggest any properties of rsx components. It's good to work with because the compiler gives good hints, but an LSP would be an awesome developer experience.

Implement Suggestion

Not really a suggestion, but maybe rust-analyzer exposes APIs that helps to get the correct suggestions for auto complete lsp.

@jkelleyrtp
Copy link
Member

Gonna try taking a stab at this in the next devtools-focused release!

@jkelleyrtp jkelleyrtp modified the milestone: 0.6.0: Devtools Mar 30, 2024
@SkiFire13
Copy link

FYI this discussion might be helpful rust-lang/rust-analyzer#15452

In particular this part:

That is, if your macro only gets partial input (let's say, a certain identifier is missing that you expect), then your macro should generate output that mostly resembles what it should be if the input was complete (instead of turning the entire output into a single compile_error!(...) invocation, as that will erase basically all the information the IDE could make use of.

The rsx macro seems to return just a compile_error!(...) when the parsing fails, which doesn't give IDEs enough informations for completition hints.

@ealmloff
Copy link
Member

#2421 Fixes autocomplete in rsx. We now autocomplete attributes, elements, and braces in rsx

@ealmloff ealmloff added enhancement New feature or request rsx Related to rsx or the dioxus-rsx crate labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rsx Related to rsx or the dioxus-rsx crate
Projects
None yet
Development

No branches or pull requests

4 participants