From 15f145f7a602fbc6b90e6e3700cdc125770e7836 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 29 Oct 2025 11:01:41 -0400 Subject: [PATCH] neovim: Restore none-ls as null-ls again for Prettier --- neovim/lua/plugins/ide.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/neovim/lua/plugins/ide.lua b/neovim/lua/plugins/ide.lua index c8da368..ee9ce4c 100644 --- a/neovim/lua/plugins/ide.lua +++ b/neovim/lua/plugins/ide.lua @@ -453,6 +453,28 @@ return { }, }, }, + { + "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, + }, -- Completion + snippets { "hrsh7th/cmp-nvim-lsp", branch = "main" },