Giter VIP home page Giter VIP logo

vscode-ide-purescript's Issues

Make psc-ide-server optional

I tried setting fastRebuild to false in my default language configuration (opting to only enable it per project), but I don't think this settings does anything anymore. Often times the plugin is too eager about trying to launch a server. For example, just opening the PureScript language settings in a fresh window tries to launch a server (resulting in an error). Sometimes I want to open up or work on random PureScript files, and the launch errors are off-putting.

Code breaks on imports claiming it was not found

Whenever I have imports, the IDE breaks on import statements claiming they were not found with the following error message:

Module Control.Monad.State was not found.
  Make sure the source file exists, and that it has been provided as an input to psc.

Is there a fix for this or is it a bug?

Purescript version: 0.11.4
Pulp version: 11.0.0

error reporting not working on save

When we save the file we just sometimes get "Build Error :(" and no error reporting.

When we checked the Developer Tools, we were able to see ECONNREFUSED error.

Thanks in Advance for the fix.

Goto Definition is broken

Trying to "go to definition" on 0.8.1 is failing, trying to open the source at /bower_components/../...purs

I've hacked a solution by making the following change to Location.ts, but i doubt this is the right solution:

import { workspace, Position, Location, Uri } from 'vscode';
import * as Path from 'path';

export const mkLocation = (file : string) => (pos: Position) =>  {
    var fullPath = Path.resolve(workspace.rootPath, file)
    return new Location(Uri.file(fullPath), pos); 
}

if this is good enough for now i can submit a PR though

Rogue psc-ide-server

…when I open a new project with Cmd+O (consequently closing the active one).

Republish correct version

Somehow tagged latest with an older version. So the new default for "use purs" is not enabled if you get latest

Request Opinion: VS Code and Atom

Hi Nicholas,

I'm researching IDEs and I was wondering if you could share your experiences writing plugins for both Atom and VS Code. Do you prefer one over the other and if you have to support just one IDE, which one would you prefer?

Thanks,
Rajiv

Some default commands may be broken on windows

Due to the .cmd thing of npm installed commands. Unlike atom the configuration defaults are json rather than dynamic so need to do something different. Works when manually specified.

Display the module's name in suggestions

Hello,

I often auto-import a function from a suggestion from the wrong module because I'm not able to see the module's name in it.

Example :
image

Would it be possible to add the module's name in the suggestions ?

Tooltips broken

Tooltips are not appearing when I hover over symbols. To complicate things somewhat I'm running VS Code on Ubuntu 16.04 inside a virtualbox guest on a windows 10 host.

Allow variable substitution in pscIdeServerExe

VScode supports variable substitution in certain config variables. Supporting it in the "purescript.pscIdeServerExe" config variable would allow me to specify a local node binary relative to project root. Currently this doesn't work as evidenced by the error below:

Couldn't find psc-ide-server, check PATH. Looked for: ${workspaceRoot}/node_modules/.bin/psc-ide-server in PATH: [snip]

Build failure not reported

When I run a build which should fail, it instead gave an info message "Build success!"

Rebuild successfully failed.

Error: Unrecognised arguments: --json-errors

I'm getting a build error in VS Code when i try to use the pulp build command from the command palette, so i thought i would try the build on the command line.

bash-3.2$ pulp --version
Pulp version 10.0.0
psc version 0.10.5 using /usr/local/bin/psc
bash-3.2$ pulp build --no-psa --json-errors
Error: Unrecognised arguments: --json-errors

I see that psc supports --json-errors

bash-3.2$ psc --help
--json-errors Print errors to stderr as JSON

But i don't see any support for that with pulp

bash-3.2$ pulp build --help
--no-psa Do not attempt to use the psa frontend instead of pic

Ideas?

Improved tooltips

Should be able to easily get syntax highlighting in tooltips I think

Shared suggestion code

Finish sharing suggestions code with atom package & pull more out of .ts

(eg - "Apply Suggestion" text is customised)

Search on Pursuit

Hello,

I often go to Pursuit in order to search a function by a type definition.

Would it be possible to integrate a command to search directly on Pursuit within VS Code ?

requires psc 0.9.2 ?

I think this requires psc 0.9.2 due to passing globs to psc-ide-server.

Probably should follow the same policy as atom package - support compiler from last patch of prior minor version up to current version.

Module autocomplete

This works in Atom to autocomplete specifically modules in the context of imports.

No longer connects to existing psc-ide-server

I used to be able to run psc-ide-server in debug mode, and then when I reloaded the window it would connect to the running instance. Now when I reload the window it appears to always kill the existing server, start up a new one, and overwrite the .psc-ide-port file. This is making it difficult to debug some issues I'm having.

Add "packagePath" setting

For people starting to use psc-package (or whatever else) instead of bower, it would be nice to have the option to override the "bower_components" search path. I can create and submit a PR for this if you like.

Adding imports via Ctrl+Space eats newlines on Windows

Here is what I have:

module A where
-- empty line
import Prelude
-- empty line
f :: String -> Maybe String

Go after Maybe, press Ctrl+Space. This imports Data.Maybe and I want this:

module A where
-- empty line
import Prelude
import Data.Maybe (Maybe)
-- empty line
f :: String -> Maybe String

But I get this:

module A where
-- empty line
import Prelude
import Data.Maybe (Maybe)
f :: String -> Maybe String

It eats declarations when no empty lines exist. Works on Linux.

Pulp version 11.0.0
purs version 0.11.3

Purescript: Build command

On Windows, this command does nothing (probably connected with the other issue). Is it necessary to provide some special setting when using on Windows? Could you please give a hint how to?
By the way, should it work the same way as in Atom, i.e. build once saved?
Thank you.

Reduce notifications

In Atom I changed non-essential notifications to use a status bar icon instead, I think we also have an API for that here. Could think about this as well as reducing some.

Open FFI file command

Would it be generally useful to open the corresponding FFI file to the side? Go to definition for foreign imports would be better but sounds difficult.

Merge problem list on fast-rebuild

I somewhat frequently initiate a full rebuild, which will yield errors across the whole project. If I go to one of those files and fix them, initiating a fast rebuild, all the errors disappear and I have to rebuild again. It would be nice if it would merge the errors instead.

Build error(maybe psc-package related)

Hi,
This may very well be due to a lack of understanding of how psc-package works but I'm getting a build error while trying to build in vscode from a psc-package created personal project

Details:

  • PureScript version: 0.11.3

Steps:

  • Create a project directory and cd
  • psc-package init and psc-package build
  • Open project directory in vscode
  • vscode displays Started psc-ide-server (port 15206) message
  • Open my simple file(src/Trial.purs)
  • Press Cmd+Shift+B

Result:
Shows Error message Build Error. I don't see any specific errors being reported in the bottom status ribbon.

0.9 quick-fixes

I'm sure these will be broken, in particular the replacement range for _ suggestion and newlines changed.

psc problem matcher

Discussed #13; not clear how well this can match psc output format but certainly could be worth a try.

Downside of this is JSON compiler output as processed by PureScript specific build command can power quick-fix functionality, give metadata

More configurable build

  1. Not configurable per project. Perhaps check for a npm build:purs script. (workspace settings)
  2. Cannot be triggered by the standard build command. Perhaps generate a task like for npm. It'd be nice to offer psa filtering in the template. #21
  3. No problem matchers for builds triggered by npm, WebPack, etc. #17
  4. Notifications too verbose. #15
  5. Build failure not reported. Perhaps also open problems view when problems exist. #14
  6. Automatic rebuild has never worked for me. (separate issue when I diagnose)
  7. No test command. #16

These might also apply to the Build package when I used Atom.

Appears to do too much `load`ing

I work on a large project (which has somewhat high cost to reload, 2-3s). Everytime I save and recompile, it also issues a load command. And then every so often it seems like it decides that it needs to issue a load command for every file open in the project. I think the arguments sent are incorrect according to https://github.com/purescript/purescript/blob/master/psc-ide-server/PROTOCOL.md#load. Maybe since it is sending dependencies instead of modules, it is reloading everything from disk? Not sure. I think psc-ide-server must be handling these requests one at a time, because it can take a while :). Anyway, here is a log after saving a single file

[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Card/Component.purs"},"command":"rebuild"} @(main:Main psc-ide-server/Main.hs:170:9)
Reloaded File at: /Users/nathan/Sites/slamdata/slamdata/output/SlamData.Workspace.Card.Component/externs.json
[Debug] Setting Rebuild cache: SlamData.Workspace.Card.Component @(pures_8jj4hUyQwQtHLLXzhSQyGW:Language.PureScript.Ide.Rebuild src/Language/PureScript/Ide/Rebuild.hs:94:9)
[perf] Command Rebuild took 1266.56ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Card.Component"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.00ms
[perf] Command Load took 2637.60ms
[perf] Finished populating Stage3 in 0.00ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Card/Component.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command List took 7.88ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Card.Component.State"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command Load took 2369.80ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Eval.Persistence"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.05ms
[perf] Finished populating Stage3 in 0.96ms
[perf] Command Load took 2280.72ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Deck.Component"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.01ms
[perf] Finished populating Stage3 in 2.16ms
[perf] Finished populating Stage2 in 0.00ms
[perf] Command Load took 2337.57ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["Control.Monad.Aff.EventLoop"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.00ms
[perf] Finished populating Stage2 in 0.00ms
[perf] Command Load took 2207.99ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Deck.Component"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.22ms
[perf] Finished populating Stage2 in 0.00ms
[perf] Command Load took 2020.27ms
[perf] Finished populating Stage3 in 0.01ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Eval.Persistence"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.01ms
[perf] Finished populating Stage3 in 0.00ms
[perf] Command Load took 2426.35ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Card/Component/State.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command List took 12.37ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Card.Component.State"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.01ms
[perf] Command Load took 1941.34ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Card.Component"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.22ms
[perf] Finished populating Stage2 in 0.01ms
[perf] Command Load took 2066.34ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Eval"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.00ms
[perf] Command Load took 2374.99ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Eval.Deck"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.05ms
[perf] Finished populating Stage3 in 0.01ms
[perf] Finished populating Stage2 in 0.00ms
[perf] Command Load took 1971.95ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Eval/Persistence.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.50ms
[perf] Command List took 43.56ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Card.Common"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.01ms
[perf] Command Load took 2050.43ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Deck.Slider"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.22ms
[perf] Finished populating Stage2 in 0.00ms
[perf] Command Load took 2098.16ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"dependencies":["SlamData.Workspace.Deck.Component.Render"],"modules":[]},"command":"load"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage3 in 0.23ms
[perf] Command Load took 2428.36ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Deck/Component.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Finished populating Stage2 in 0.01ms
[perf] Finished populating Stage3 in 0.05ms
[perf] Command List took 45.11ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/Control/Monad/Aff/EventLoop.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command List took 3.79ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Deck/Component.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command List took 28.57ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Eval/Persistence.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command List took 33.27ms
[Debug] Accepted a connection @(main:Main psc-ide-server/Main.hs:160:5)
[Debug] {"params":{"file":"/Users/nathan/Sites/slamdata/slamdata/src/SlamData/Workspace/Card/Component/State.purs","type":"import"},"command":"list"} @(main:Main psc-ide-server/Main.hs:170:9)
[perf] Command List took 14.15ms

Renamed psc-ide to psc-ide-client

In order to be more consistent I renamed the psc-ide exectuable into psc-ide-client. This will take effect with the purescript-0.8.1 release.

Assistance for unicode input

I have ported the agda input method to vscode and made it available in the vscode-input-assist extension. If I recall correctly, the Atom mode has some sort of latex input for unicode so maybe it would be worth adding this extension to the dependencies here to have feature parity.

If you think it is worth adding the dependency, it would be best to change the wordPattern to something like this.

The extended wordPattern is needed due to how the vscode completion algorithm works. Without it, some completions like \<=>n (⇎) cannot be typed because the completion widget will close as soon as a non-word character is typed after \.

Feature Request: Run Code(ctrl+alt+N)

Hi,
One feature that I use frequently is running the main command within the IDE. An example of this is shown here(after 0:38).

I got something similar hacky using a task runner running pulp run. But I see that if one right clicks on the purs file, one sees the option Run Code. When I click on that, I get the info message Code language not supported or defined.

I was wondering what you thought of binding that to a behaviour which runs the main command in the file where it was executed. Would this fall under the vscode-ide-purescript project or is it external to it?

Can't find psc-ide-server in PATH

I just get this error when I open vscode

Couldn't find psc-ide-server, check PATH. Looked for: psc-ide-server in PATH:

How do I add psc-ide-server to the path? I don't even know where it is supposed to be installed by the purescript compiler.

I downloaded purescript and pulp today from npm so I have no idea why I get this error. I can't get the deprecated psc-ide to build in stack either.

Any suggestions? What other info do you need?

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.