-
Notifications
You must be signed in to change notification settings - Fork 925
Expose methods to locate and load config #1613
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
Conversation
* Make method for searching parents for toml file public * Make method for loading config from path directly public, tweak the API since it was never returning None
src/config.rs
Outdated
/// Construct a `Config` from the toml file specified at `file_path`. | ||
/// | ||
/// This method only looks at the provided path, for a method that | ||
/// searches parents for an `rls.toml` see `resolve_config`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line a typo, or only relevant when using from rls? If so, I would like to have it explained here since it may confusing afterward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, just a typo. Pushed a fix.
LGTM, thank you for cleaning up! Left a small nit inline, please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a minor error in the docs to fix
src/config.rs
Outdated
/// Construct a `Config` from the toml file specified at `file_path`. | ||
/// | ||
/// This method only looks at the provided path, for a method that | ||
/// searches parents for an `rls.toml` see `resolve_config`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see resolve_config
, I think the name is changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy, two typos in the same line. Pushed a fix, thanks.
Thank you! |
API since it was never returning None
Would allow RLS to reuse the rustfmt.toml searching/loading code (rust-lang/rls#331)