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, }, }