Skip to content

Conversation

@cppcoffee
Copy link

@cppcoffee cppcoffee commented Mar 13, 2022

supports optional configuration of rustfmt --edition version.

@cppcoffee cppcoffee changed the title feat: add rustfmt_edition_opt feat(rust): add global flag g:rustfmt_edition_opt Mar 13, 2022
function! neoformat#formatters#rust#rustfmt() abort
let opts = get(g:, 'rustfmt_edition_opt', '')
if opts != ''
let opts = '--edition ' . opts
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this require an endif?

Copy link
Author

@cppcoffee cppcoffee Mar 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right, the endif has been added.

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.

2 participants