clearloop/leetcode-cli

A config to allow a custom file name

Opened this issue · 1 comments

When I type leetcode edit --daily, it saves the code into a file named 2845.count-of-interesting-subarrays.rs.

However, it seems like rust-analyzer refuses to provide in-depth IDE features such as type and ownership checking with files having 2 dots or more in their name. Only autocomplete works.

My current workaround is to symlink the file to 2845.rs to have complete IDE features, while being able to test and submit the edited code. It would be nice to have a config to allow a custom file name.

You should be able to change the file name by using the code.pick config option.

ie.

[code]
editor = "..."
lang = "rust"
pick = "${fid}_${slug}"