2024-12-02 18:32:54 +08:00
|
|
|
return {}
|
2023-10-05 02:55:01 +08:00
|
|
|
|
2024-12-02 18:32:54 +08:00
|
|
|
-- local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
|
|
|
--
|
|
|
|
-- return {
|
|
|
|
-- "nvimtools/none-ls.nvim",
|
|
|
|
-- opts = function(_, opts)
|
|
|
|
-- local nls = require("none-ls")
|
|
|
|
-- opts.sources = vim.list_extend(opts.sources or {}, {
|
|
|
|
-- nls.builtins.diagnostics.markdownlint,
|
|
|
|
-- })
|
|
|
|
-- -- table.insert(opts.sources, nls.builtins.formatting.prettierd)
|
|
|
|
-- end,
|
|
|
|
-- config = {
|
|
|
|
-- on_attach = function(client, bufnr)
|
|
|
|
-- if client.supports_method("textDocument/formatting") then
|
|
|
|
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
|
|
|
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
|
|
|
-- group = augroup,
|
|
|
|
-- buffer = bufnr,
|
|
|
|
-- callback = function()
|
|
|
|
-- vim.lsp.buf.format()
|
|
|
|
-- end,
|
|
|
|
-- })
|
|
|
|
-- end
|
|
|
|
-- end,
|
|
|
|
-- },
|
|
|
|
-- }
|