Giter Club home page Giter Club logo

Comments (9)

dwhitney avatar dwhitney commented on July 2, 2024

others are reporting that the pscIdePort option is being ignored as well

from purescript-language-server.

dwhitney avatar dwhitney commented on July 2, 2024

I think maybe here?

from purescript-language-server.

nwolverson avatar nwolverson commented on July 2, 2024

I agree this setting shouldn't be ignored, but if before launching the plugin you echo -n 12345 > .psc-ide-port it will connect to that port. You'll need to make sure a server is running with the correct working directory in that case.

from purescript-language-server.

kritzcreek avatar kritzcreek commented on July 2, 2024

I think the idea is to start a server in the "wrong" working directory and still have the server compile into that folders output/ directory.

from purescript-language-server.

dwhitney avatar dwhitney commented on July 2, 2024

from purescript-language-server.

dwhitney avatar dwhitney commented on July 2, 2024

I just tried this and it doesn't work. Just to re-describe the issue: I have a parent directory containing several related purescript projects, for example a "web" project that depends on a "core" project. I want to start a psc ide server in the "web" project, but open my editor in the parent folder so that I can easily edit code in either the "core" or the "web" projects and have changes reflected immediately in the "web" project's output folder by having my editor communicate changes to the psc ide server. It doesn't work in either Atom or VSCode, but it does work in vim, so I'm certain I have not setup the psc ide server incorrectly.

Just to reiterate - I've tried: putting .psc-ide-port with port 4242 in the parent folder, web, and core. And it didn't work. Doing that did stop Atom and VSCode from running their own servers, but They don't seem to interact much with the running server. The only logging output I get is the following when the editor loads (nothing when saving files):

[Debug] Accepted a connection @(main:Command.Ide app/Command/Ide.hs:204:5)
[Debug] Received command: {"command":"cwd"} @(main:Command.Ide app/Command/Ide.hs:214:9)
[perf] Command Cwd took 0.14ms

whereas with I use vim I get the following from opening the editor and saving a file:

[Debug] Accepted a connection @(main:Command.Ide app/Command/Ide.hs:204:5)
[Debug] Received command: {"command": "load"} @(main:Command.Ide app/Command/Ide.hs:214:9)
[perf] Command Load took 2301.55ms
[perf] Finished populating volatile state in: 119.67ms
[Debug] Accepted a connection @(main:Command.Ide app/Command/Ide.hs:204:5)
[Debug] Received command: {"params": {"file": "/Users/dtwhitney/development/valence/valence/projects/core/src/Core/Components/Workspace.purs"}, "command": "rebuild"} @(main:Command.Ide app/Command/Ide.hs:214:9)
[perf] Sorting externs: 16.75ms
[perf] Rebuilding Module: 171.20ms
[perf] Command Rebuild took 195.84ms
[perf] Finished populating volatile state in: 100.64ms

Hope this helps. I tried to poke around in the code base, but I couldn't figure out how to get the extension stuff going in VSCode. I'm not really familiar with making extensions

from purescript-language-server.

nwolverson avatar nwolverson commented on July 2, 2024

What output do you get from the PureScript output panel in vscode? That should tell you what's going on, I expect in this case it's finding that you are connecting to a server in the wrong directory (it runs Cwd and refuses to continue).

We can add an option to skip the cwd check on server startup, but the reason it's there is that connecting to random servers is going to give wrong results.

Regarding "open my editor in the parent folder" - you should not do this, this will not work in either atom or vscode plugin just now - in vscode you should open each project as a root folder (multi-root workspace)

from purescript-language-server.

nwolverson avatar nwolverson commented on July 2, 2024

This should now be fixed, along with the port configuration, with the latest LS release. That's released in the latest vscode plugin (0.18.1) but not yet in atom.

from purescript-language-server.

dwhitney avatar dwhitney commented on July 2, 2024

from purescript-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.