mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 11:05:08 +02:00
de7ec62f5f
* added default formatters for a couple of langs * fix: sugesstions from tastyep * allow users to change default formatters * suggestion: mellow pointed out the telescope issue * we don't need to use formatter.setup
29 lines
712 B
Lua
29 lines
712 B
Lua
O.formatters.filetype["dart"] = {
|
|
function()
|
|
return {
|
|
exe = O.lang.dart.formatter.exe,
|
|
args = O.lang.dart.formatter.args,
|
|
stdin = not (O.lang.dart.formatter.stdin ~= nil),
|
|
}
|
|
end,
|
|
}
|
|
|
|
require("formatter.config").set_defaults {
|
|
logging = false,
|
|
filetype = O.formatters.filetype,
|
|
}
|
|
if require("lv-utils").check_lsp_client_active "dartls" then
|
|
return
|
|
end
|
|
|
|
require("lspconfig").dartls.setup {
|
|
cmd = { "dart", O.lang.dart.sdk_path, "--lsp" },
|
|
on_attach = require("lsp").common_on_attach,
|
|
init_options = {
|
|
closingLabels = false,
|
|
flutterOutline = false,
|
|
onlyAnalyzeProjectsWithOpenFiles = false,
|
|
outline = false,
|
|
suggestFromUnimportedLibraries = true,
|
|
},
|
|
}
|