From ef02f5d86edea97cbd094566570d555e6ddf4d2a Mon Sep 17 00:00:00 2001 From: Jake Hamilton <31600776+jakehamtexas@users.noreply.github.com> Date: Sat, 24 Aug 2024 18:16:45 -0500 Subject: [PATCH] prefer local prettierc by default --- lua/lazyvim/plugins/extras/formatting/prettier.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/formatting/prettier.lua b/lua/lazyvim/plugins/extras/formatting/prettier.lua index 13704ca9..e38db9f7 100644 --- a/lua/lazyvim/plugins/extras/formatting/prettier.lua +++ b/lua/lazyvim/plugins/extras/formatting/prettier.lua @@ -89,7 +89,11 @@ return { opts = function(_, opts) local nls = require("null-ls") opts.sources = opts.sources or {} - table.insert(opts.sources, nls.builtins.formatting.prettier) + + table.insert(opts.sources, nls.builtins.formatting.prettier.with({ + // See: https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTIN_CONFIG.md#using-local-executables + prefer_local = true + })) end, }, }