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

Select features #593

Open
Adrien-Bodineau opened this issue Nov 26, 2024 · 5 comments
Open

Select features #593

Adrien-Bodineau opened this issue Nov 26, 2024 · 5 comments
Labels
enhancement New feature or request needs triage

Comments

@Adrien-Bodineau
Copy link

Feature description

Would be nice to have a :RustAnalyzer features x,y,z command to select a set of features to activate.
and :RustAnalyzer all-features to enable all-features of a crate as it is currently done by :RustAnalyzer target xxx

@Adrien-Bodineau Adrien-Bodineau added the enhancement New feature or request label Nov 26, 2024
@mrcjkb
Copy link
Owner

mrcjkb commented Nov 26, 2024

Hey 👋

thanks for the suggestion. I fear that adding too many commands to change various rust-analyzer options at runtime could add more complexity/bloat than I'm comfortable with.

I don't think this is possible in VSCode, is it?
What are some alternative options to this (e.g. using :h .exrc, ...)?

Perhaps a more general way to change config options would be a more flexible solution?
Something like :RustAnalyzer config {path} {value} , for example, :RustAnalyzer config cargo.features = { "list", "of", "features" }

(folke/trouble.nvim has a nice parser that uses tree-sitter to parse Lua from command arguments using tree-sitter).

I'm going to add a triage label and keep this open.
PRs are welcome, but depending on the complexity, I might end up choosing not to merge.

@Adrien-Bodineau

This comment was marked as off-topic.

@mrcjkb

This comment was marked as off-topic.

@Adrien-Bodineau

This comment was marked as off-topic.

@mrcjkb

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

2 participants