Closed fastchaser closed 2 years ago
是 WSL 吗?
不是,ubuntu1804系统,默认终端 nvim
看看2.6.6修复没
更新后默认没开格式化功能,我刚看了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',
},
},
},
}
应该有个类似于 cmd = {'lua-language-server'}
的地方,改成 cmd = {'lua-language-server', '--preview'}
可以了,感谢大佬👍 👍 👍
感谢大佬的工作 我在Ubuntu1804上nvim0.61使用nvim-lsp-installer更新最新版sumneko_lua后,可以格式化lua代码了,耶✌️ 但是在每行末尾都会出现^M(windows的换行符),哈哈🙈