neovim: Restore none-ls/null-ls for Prettier formatting
This commit is contained in:
parent
487453d622
commit
1929a53229
2 changed files with 23 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2304ff65ecc8cb2afc2484de3e2ed9a407edf0b9" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"nerdtree": { "branch": "master", "commit": "690d061b591525890f1471c6675bcb5bdc8cdff9" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "a96172f673f720cd4f3572e1fcd08400ed3eb25d" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a7bcf1d88069fc67c9ace8a62ba480b8fe879025" },
|
||||
|
|
|
|||
|
|
@ -396,6 +396,28 @@ return {
|
|||
},
|
||||
|
||||
-- LSP
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function(_plugin, opts)
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
local group = vim.api.nvim_create_augroup("lsp_format_on_save", { clear = false })
|
||||
|
||||
local prettier_filetypes = {}
|
||||
for k, v in ipairs(null_ls.builtins.formatting.prettier.filetypes) do
|
||||
prettier_filetypes[k] = v
|
||||
end
|
||||
table.insert(prettier_filetypes, "htmldjango") -- Jinja templates
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
filetypes = prettier_filetypes,
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = '^6',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue