postgres-language-server icon indicating copy to clipboard operation
postgres-language-server copied to clipboard

ts server plugin

Open psteinroe opened this issue 10 months ago • 3 comments

a tsserver plugin should allow us to add sql language features to template literals within a typescript / javascript file.

psteinroe avatar Jan 28 '25 20:01 psteinroe

after some research, I believe this must be solved on the editor side and not within tsserver.

For vscode, this should be possible via Request Forwarding. For Neovim, otter.nvim seems to be a good fit. we should try to make this as simple as possible.

But, since we are planning #177 anyways, we might as well look into the feasibility of running both tsserver and ours at the same time. Initial research suggests that this is not easily possible though.

psteinroe avatar Mar 07 '25 18:03 psteinroe

would this work for other language like in a python script ?

ThomAub avatar Apr 02 '25 13:04 ThomAub

Even if support was added for evaluating sql expressions within other languages, this extension would have a hard time expanding template literals without erroring. I created https://github.com/supabase-community/postgres-language-server/discussions/396 to track support for templated expressions, which in my understanding is a prerequisite feature for supporting this.

reteps avatar May 09 '25 19:05 reteps