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

Add rust-analyzer.toml file #2107

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Conversation

alibektas
Copy link
Member

Fixes #2104.

@alibektas
Copy link
Member Author

Just my amateur solution to this problem. Let me know if you have any stylistic changes you want me to make 👋

@mo8it
Copy link
Contributor

mo8it commented Sep 12, 2024

Thanks!

We don't need the small file in the repo. We can define the content in a &[u8] constant and use it like GITIGNORE:

const GITIGNORE: &[u8] = b"Cargo.lock

I wonder if extraArgs will stay as is or get renamed to extra_args since camel case is common in TOML files.

@mo8it mo8it merged commit 45abd7d into rust-lang:main Sep 12, 2024
7 checks passed
@alibektas
Copy link
Member Author

Thanks!

We don't need the small file in the repo. We can define the content in a &[u8] constant and use it like GITIGNORE:

const GITIGNORE: &[u8] = b"Cargo.lock

I wonder if extraArgs will stay as is or get renamed to extra_args since camel case is common in TOML files.

I don't think a renaming is among our plans. In either case we never remove old config names and check for them too.

@alibektas alibektas deleted the ratoml_for_rustlings branch September 12, 2024 13:50
@mo8it
Copy link
Contributor

mo8it commented Sep 13, 2024

I just tested the config in a rust-analyzer.toml file with the Rust-Analyzer extention (pre-release from 09.12.) in VS-Code. It doesn't seem to work (yet?). See the screenshot where the function bigger is underlined. The warning is that this function isn't used. I restarted Rust-Analyzer after creating the config file and even restarted the whole editor. It doesn't seems to use that config.

Screenshot from 2024-09-13 13-48-54

@alibektas
Copy link
Member Author

That's odd. I made the warning go away when I tried it in my local. I will have another look at it in a few hours.

@mo8it
Copy link
Contributor

mo8it commented Sep 13, 2024

@alibektas Is .rust-analyzer.toml (with dot) also supported? It would be nice to be able to hide it from beginners.

@alibektas
Copy link
Member Author

not yet and we didn't really plan such thing but I can see people asking for it so I will implement it in a few days. I am making an issue of it an pinging you.

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

Successfully merging this pull request may close these issues.

#[warn(dead_code)] showing unnecessary x is never used warnings
2 participants