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

feat(rust): add global flag g:rustfmt_edition_opt #405

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
@@ -3,8 +3,12 @@ function! neoformat#formatters#rust#enabled() abort
endfunction

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