neovim: fmt ide.lua
This commit is contained in:
parent
4919762e06
commit
8fcd5dc971
1 changed files with 16 additions and 16 deletions
|
|
@ -443,8 +443,8 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Apeiros-46B/uiua.vim",
|
"Apeiros-46B/uiua.vim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mason-org/mason-lspconfig.nvim",
|
"mason-org/mason-lspconfig.nvim",
|
||||||
|
|
@ -462,23 +462,23 @@ return {
|
||||||
{
|
{
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
config = function(_plugin, opts)
|
config = function(_plugin, opts)
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
local group = vim.api.nvim_create_augroup("lsp_format_on_save", { clear = false })
|
local group = vim.api.nvim_create_augroup("lsp_format_on_save", { clear = false })
|
||||||
|
|
||||||
local prettier_filetypes = {}
|
local prettier_filetypes = {}
|
||||||
for k, v in ipairs(null_ls.builtins.formatting.prettier.filetypes) do
|
for k, v in ipairs(null_ls.builtins.formatting.prettier.filetypes) do
|
||||||
prettier_filetypes[k] = v
|
prettier_filetypes[k] = v
|
||||||
end
|
end
|
||||||
table.insert(prettier_filetypes, "htmldjango") -- Jinja templates
|
table.insert(prettier_filetypes, "htmldjango") -- Jinja templates
|
||||||
|
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.prettier.with({
|
null_ls.builtins.formatting.prettier.with({
|
||||||
filetypes = prettier_filetypes,
|
filetypes = prettier_filetypes,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue