Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
fastchaser opened this issue Feb 18, 2022 · 6 comments
Closed

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

fastchaser opened this issue Feb 18, 2022 · 6 comments

Comments

@fastchaser
Copy link

感谢大佬的工作
我在Ubuntu1804上nvim0.61使用nvim-lsp-installer更新最新版sumneko_lua后,可以格式化lua代码了,耶✌️
但是在每行末尾都会出现^M(windows的换行符),哈哈🙈

@sumneko
Copy link
Collaborator

sumneko commented Feb 19, 2022

是 WSL 吗?

@fastchaser
Copy link
Author

不是,ubuntu1804系统,默认终端 nvim

@sumneko
Copy link
Collaborator

sumneko commented Feb 21, 2022

看看2.6.6修复没

@fastchaser
Copy link
Author

更新后默认没开格式化功能,我刚看了Formatter preview #960,不知道怎么添加preview参数
我在配置文件里加了最下面的misc不行,想在“Lua.misc.parameters”加—preview
return {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
},
diagnostics = {
-- Get the language server to recognize the vim global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false
},
misc = {
parameters = 'preview',
},
},
},
}

@sumneko
Copy link
Collaborator

sumneko commented Feb 21, 2022

应该有个类似于 cmd = {'lua-language-server'} 的地方,改成 cmd = {'lua-language-server', '--preview'}

@fastchaser
Copy link
Author

可以了,感谢大佬👍 👍 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants