Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding auto formatting #7

Open
davidarenas opened this issue May 17, 2021 · 1 comment
Open

Adding auto formatting #7

davidarenas opened this issue May 17, 2021 · 1 comment

Comments

@davidarenas
Copy link

Would there be any objection to adding a prisma-fmt functionality to the project?

Wanted to make sure before I start work for a PR since prisma doesn't make it the easy finding binary.

I currently implement it in a bare bones mode that I made. I included links on how to get the executable, but not sure if auto-downloading like it VSCode does would be required feature for it being accepted.

@pimeys
Copy link
Owner

pimeys commented Dec 7, 2021

Hmm. I should be more careful with my github notifications...

So, hi!

Yeah, damn, I wish I would've spotted your mode already, could've just contribute to your repo instead of starting my own. Luckily emacs modes are easy. You can now quite easily add LSP and format/lint to the mode, see how I do it in this repo with the lsp-mode and triggering lsp-format on save. I have quite good auto complete/jump to definition etc. working, it's easy to do.

The npm package is @prisma/language-server and when you have prisma-language-server in your PATH, you should be able to get format/lint/autocomplete etc. just like the vscodium and neovim users get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants