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

Ubuntu nvim format 会在行尾出现^M #20

Closed
sumneko opened this issue Feb 19, 2022 · 6 comments
Closed

Ubuntu nvim format 会在行尾出现^M #20

sumneko opened this issue Feb 19, 2022 · 6 comments

Comments

@sumneko
Copy link

sumneko commented Feb 19, 2022

格式化后每行末尾都会出现^M(windows的换行符)

原issue:LuaLS/vscode-lua#55

@CppCXY
Copy link
Owner

CppCXY commented Feb 19, 2022

不是有选项

end_of_line = lf

@sumneko
Copy link
Author

sumneko commented Feb 19, 2022

非Windows下难道不是强制 lf ?

@CppCXY
Copy link
Owner

CppCXY commented Feb 19, 2022

当然不是,一份代码,在不同平台编辑,结果行尾都不一致并且无法被控制,可能不太合理

@CppCXY
Copy link
Owner

CppCXY commented Feb 19, 2022

我可以认为在非windows平台,在不配置的情况下可以默认lf

@sumneko
Copy link
Author

sumneko commented Feb 19, 2022

换行符一般都是跟本地环境绑定的吧,或者你搞个默认值 auto

@CppCXY
Copy link
Owner

CppCXY commented Feb 19, 2022

暂时是非windows平台默认值 lf,如果配置了就按配置的走。auto配置后面再加

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

No branches or pull requests

2 participants