gabrielcolson / intellij-prisma

Prisma Schema Language support for WebStorm, GoLand, and other IDEs based on IntelliJ Platform.
https://plugins.jetbrains.com/plugin/14240-prisma
42 stars 9 forks source link

Prisma Language Server integraton #10

Open nierennakker opened 4 years ago

nierennakker commented 4 years ago

Prisma's language server just got merged into master, it might be cool looking into that. Thanks for your work so far!

gabrielcolson commented 4 years ago

Thanks for letting me know! I will definitely look into that as it will avoid duplication of the work on the syntax parsing.

BinaryFissionGames commented 4 years ago

It'd be worth looking into some library for this, e.g. lsp4intellij, if you haven't already.

gabrielcolson commented 4 years ago

Hey @Denu8thell! I already dived into the doc of this project and tried to make a small PoC. Before I start to properly integrate it, I still have to figure out a workaround for some blockers like "how to embed the JS language server and start it". This is the first time I write an IntelliJ plugin and I could use some help if you have some time to spare! 😁

BinaryFissionGames commented 4 years ago

I'm happy to help with what I can!

As far as the language server goes, it might be best to NOT embed it, but instead have some sort of install step that'll pull down the version using NPM, and have it run as a separate process. I'll take a look and see if I can get some proof of concept for that piece working.

gabrielcolson commented 4 years ago

Sounds great! Thank you! 😄

BinaryFissionGames commented 4 years ago

@gabrielcolson Alright, so, I spent some time seeing what I could do, and I managed to get it SORT OF working.

I ran into a few issues.

For one, I found that Windows really dislikes node trying to spawn processes with long file names, which is a problem since the test environment that intellij sets up for plugins has a very long path. I don't think this is a problem for distribution, but it is for development.

Second, I found there were numerous issues/misalignments with the LSP spec in lsp4intellij. I've made some issues in their repo (207, 208, 209, 210). My hope is that we can coordinate with them to solve these issues and get this up and working soon.

My current progress is here, if you're curious: https://github.com/Denu8thell/intellij-prisma/tree/prisma-language-server-integration