Comments (5)
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":
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.
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 :
I also tried to set packagePath
to .spage
, buildCommand
to spago build
But this problem always there.
Could you help on this please?
from purescript-language-server.
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.
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.
Works like a charm now, thanks a lot @nwolverson for the explanation!
from purescript-language-server.
Related Issues (20)
- Support configuring spago file/target
- Neovim configuration HOT 6
- BUG: Deleting/renaming modules does NOT purge them from the cache HOT 3
- Support completion for qualified do imports
- Docs: Update formatter section HOT 1
- Organizeing imports deletes comments HOT 1
- Hover (show documentation) does not work with recent coc.nvim HOT 8
- Suggestion: Extend diagnostics on type to buffer switches HOT 1
- Support multiple spans per diagnostic
- Incorrect "Go to definition" behavior for the `Bind` data type.
- E715: Dictionary required when trying to apply sourse.sortImports code action HOT 2
- Breakpoints?
- Use with spaghetto (spago@next)
- amazing stuff; just wondering if it supports eval? like in -- >> HOT 1
- Warning/Error reporting not working? HOT 5
- Action to export HOT 1
- Find references returns no references HOT 1
- Should optional field return null? HOT 1
- Stale errors/warnings stick around after a full build
- Presence of VTA prevents LSP functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-language-server.