Giter VIP home page Giter VIP logo

Comments (5)

nwolverson avatar nwolverson commented on July 21, 2024 1

You're right that you don't want to use both psc-package and bower, so you can just ignore the bower.json, nothing wrong should happen due to it existing. If you install both with bower and psc-package, I could believe odd things happen.

The setting you want in vscode is "Add Psc Package Sources":
image
The "Package Path" setting also can work as you describe, but this is really only required for more custom scenarios, the "Add Psc Package Sources" will not require updating if you change package set version, for example.

from purescript-language-server.

JunYang-tes avatar JunYang-tes commented on July 21, 2024 1

Hi, @nwolverson
I'm using coc.nvim and spago. I have this issue too.
I tried use --config to set addSpagoSources to true like this :

image

I also tried to set packagePath to .spage, buildCommand to spago build

But this problem always there.
image

Could you help on this please?

from purescript-language-server.

nwolverson avatar nwolverson commented on July 21, 2024

You don't post any detailed error, and no idea what editor or tool you are using with the language server, so hard to help, but "modules not found" sounds like nothing will be working for you - completion, tooltips, etc. The package path there is then irrelevant, what matters is just that you have compiled the project prior to launching the language server (ie your IDE) and paths etc are set up correctly (purs at the right version in your path), and the language server is launched with the right source folders (open your project folder with the bower.json or psc-package.json at the root level).

The setting you see for package paths is only required for a couple of things though - getting documentation when showing completions etc, and navigating to source. If psc-package is used, a setting is available addPscPackageSources which will add the correct psc-package source directories, similarly addSpagoSources for spago - if you're using vscode, for example, this will appear with some similar setting in the config UI.

from purescript-language-server.

nicoabie avatar nicoabie commented on July 21, 2024

I've provided a link to the repository to be able to replicate the issue but it is true that I did not specify the IDE I'm using. It's vscode. Sorry for that.

The projects have both a bower.json and a psc-package.json (I don't know if this is a good idea, coming from js feels it's like having a package-lock and a yarn-lock)

When installing the dependencies using psc-package install all deps gets intalled in the .psc-package folfer.

If I also run bower install (which makes no sense because I have everything already installed by psc) the language server works as expected.

I noticed in the Purescript configuration that there is a Package Path pointing to bower_components.

If I point it to .psc-package/psc-0.13.3 I can remove the bower_components folder and everything works.

Is that correct? When using psc instead of bower the Package Path should be updated? Thanks in advance.

from purescript-language-server.

nicoabie avatar nicoabie commented on July 21, 2024

Works like a charm now, thanks a lot @nwolverson for the explanation!

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.