mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-02 00:56:02 +02:00
more language reformat (#949)
This commit is contained in:
parent
2a7b3d4892
commit
e6de44e444
8 changed files with 116 additions and 89 deletions
|
@ -1,8 +1,19 @@
|
|||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
-- TODO: implement config for language
|
||||
return "No config available!"
|
||||
O.formatters.filetype["yaml"] = {
|
||||
function()
|
||||
return {
|
||||
exe = O.lang.yaml.formatter.exe,
|
||||
args = O.lang.yaml.formatter.args,
|
||||
stdin = not (O.lang.yaml.formatter.stdin ~= nil),
|
||||
}
|
||||
end,
|
||||
}
|
||||
require("formatter.config").set_defaults {
|
||||
logging = false,
|
||||
filetype = O.formatters.filetype,
|
||||
}
|
||||
end
|
||||
|
||||
M.format = function()
|
||||
|
@ -15,7 +26,17 @@ M.lint = function()
|
|||
return "No linters configured!"
|
||||
end
|
||||
|
||||
M.lsp = function() end
|
||||
M.lsp = function()
|
||||
if require("lv-utils").check_lsp_client_active "yamlls" then
|
||||
return
|
||||
end
|
||||
|
||||
-- npm install -g yaml-language-server
|
||||
require("lspconfig").yamlls.setup {
|
||||
cmd = { DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server", "--stdio" },
|
||||
on_attach = require("lsp").common_on_attach,
|
||||
}
|
||||
end
|
||||
|
||||
M.dap = function()
|
||||
-- TODO: implement dap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue