mason.nvim icon indicating copy to clipboard operation
mason.nvim copied to clipboard

Add prisma-fmt to the regestry

Open zhiburt opened this issue 3 years ago • 1 comments
trafficstars

Hi there

Close #393

Thanks for good first issue mark.

Take care

zhiburt avatar Oct 12 '22 14:10 zhiburt

Cool! When the issue was created I took a quick look at it. After having done some research now again I've come to the same conclusion: The prisma formatter is generally bundled with the prisma npm package itself. This npm package ships with prebuilt binaries (which behind the scenes are hosted by their "@prisma/engines" package).

I'm a bit worried about landing this because:

  1. It needs nightly rust toolchain to be installed. I'm pretty confident this means a vast majority will be excluded from using this package.
  2. It uses an unstable source (git HEAD).

I'm wondering if it would be better to just provide a prisma package (which maps to the prisma npm package)? I also wonder why there's a prisma-fmt formatter in null-ls - exactly which executable is this formatter meant to target?

You're correct. It's bundled with Prisma and if you have Prisma lsp it should work as a language formatter.

I think they extracted it to a separate package to make maintenance easier.

vuki656 avatar Oct 15 '22 21:10 vuki656

FWIW, they recommend installing Prisma as a project-local dependency: https://www.prisma.io/docs/concepts/components/prisma-cli/installation#local-installation-recommended. I'm not opposed to adding prisma as a standalone package in Mason though (PR welcome)

williamboman avatar Jan 12 '23 10:01 williamboman