Updated Yazi: version, hop plugin, glow preview
This commit is contained in:
20
nvim/lua/plugins/prettier.lua
Normal file
20
nvim/lua/plugins/prettier.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
debug = false, -- set to true if you want log spam
|
||||
sources = {
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
filetypes = { "markdown", "markdown.pandoc", "pandoc" },
|
||||
}),
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
Reference in New Issue
Block a user