Coder Social home page Coder Social logo

psc-ide-emacs's People

Contributors

actionshrimp avatar adamw avatar basil-conto avatar bogdanp avatar bsermons avatar cmdv avatar dbushenko avatar epost avatar eskimor avatar foollbar avatar iammrinal0 avatar j0ni avatar justinwoo avatar kritzcreek avatar liaowang11 avatar marsam avatar mechairoi avatar paulyoung avatar purcell avatar rexim avatar syohex avatar themoritz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

psc-ide-emacs's Issues

Auto-completion reorders imports

Using auto-completion anywhere in a file reorders the import list (specifically this happens the moment you hit tab). This is my biggest issue with psc-ide-emacs right now, everything else is working great.

Emacs: 25.2.1
Spacemacs: 0.200.9

Project root for pulp projects

C-c C-s asks me to specify the project root. What should I enter for pulp projects? src/ or the parent of that?

Starting the server seems to star the server for me but Emacs doesn't seem to think it's running.

What's the relationship between psc-ide-emacs and pulp? I didn't see a mention of it in the README.

Thanks!

Can't use package

Loading fails with

Symbol's value as variable is void: purescript-mode-map

I installed fresh package from melpa, followed instructions from README

Handle errors in psc-ide-send

psc-ide-send

Currently if the psc-ide utility exists with non-zero code, the psc-ide-send function doesn't even care about it. Just returns stderr without any error indication.

Does not work as claimed for me

Hi there!

company mode does not seem to work and also flycheck support does not work. I get no errors also nothing in Messages. Any tip on how to do debugging with emacs greatly appreciated :-)

Move this project into the purescript-emacs org

Hey, I just created a new organisation to collect some of the projects around PureScript in Emacs I'm maintaining. This way we can make sure the ball keeps on rolling if I take a vacation ๐Ÿ˜‰

Would you be up for moving the repository? I'd of course invite you to the organisation if you're still interested in PureScript in Emacs!

/cc @epost @bsermons

Flycheck: changes from other files not visible until loading all modules

When editing two files in the same project, it seems that changes done in one file are not visible to the checker until reloading all modules. More precisely:

  • start the server, load all modules
  • add anything in Foo.purs; no errors from Flycheck
  • switch to Bar.purs, try to use whatever was added in Foo
  • flycheck will detect an error
  • load all modules again
  • force a check - passes

I think by having Flycheck check Foo, the psc-ide server should have the changes loaded with the additions to Foo, and they should be available for Bar - or is that not the case?

psc-ide-server-start post hook

Hey everyone,
I was trying to have my emacs config to run psc-ide-server-start for me.
So I added:

(psc-ide-server-start (psc-ide-suggest-project-dir))
And something to start flycheck-mode.

But on startup, I get spurious messages, it seems possibly while the server is loading the files.

This might be mitigated if there was a way to make flycheck-mode only activate after the server is done starting?

Please specify the license for this package

Could you please specify the license used for this package?

Assuming that you want to release under "the GPL v3 or any later version", the best way to do that would be to add this permission statement to the library header:

;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.

;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also consider adding a LICENSE file containing the text of the GPL-3. You could add just that file without also adding the above persmission statement, but if you do that, then the "or (at your option) any later version" bit won't be known. So I recommend that you add both the actual license and the permission statement.

If you find the permission statement to be too noisy, then you could instead add one of these following lines to the header. If you do that, then it becomes more important to also add the LICENSE file - a judge might decide that such a line by itself is not sufficient. Still, adding just such a line is better than not specifing the license at all.

;; License: GNU General Public License version 3, or (at your option) any later version
;; License: GNU General Public License version 3, or any later version
;; License: GNU GPL version 3, or (at your option) any later version
;; License: GPL version 3, or (at your option) any later version
;; License: GPL version 3, or any later version
;; License: GPL v3, or (at your option) any later version
;; License: GPL v3, or any later version
;; License: GPL-3+

I should make some new GIFs

  • Our types are a bit prettier by now
  • Show the different kinds of imports and completions we support by now
  • Show doc strings

We also added a bunch of features since I last updated the README.

Things I/we should document

  • Editor mode
  • Document a full .dir-locals.el file for easy copy-paste
  • Talk about .projectile file trick to get the correct project root

Error after upgrade to `psc-ide-20170923.250`

After starting the server with psc-ide-server-start and getting a confirmation that all modules are loaded, I get the following error when I modify and save a random file:

error in process sentinel: Wrong type argument: flycheck-error-p, [cl-struct-flycheck-error #<buffer xxx.purs> psc-ide "/Users/.../xxx.purs" 353 10 "  Unknown data constructor  SomeDataCstr
" error #("UnknownName" 0 1 (:suggestion nil :startLine 353 :startColumn 10 :endLine 353 :endColumn 23))]

It seems that the psc-ide-server correctly reports the Purescript error, but psc-ide can't really parse it?

Compile error with emacs 24

So I'm just setting up a brand new Emacs installation, I don't really know what I'm doing, and I got an error while trying to install this package, so I thought I'd open an issue in case it's something that wants addressing in the README here. I'm using emacs 24.5.1, and this is the entire contents of my ~/.emacs.d/init.el:

(require 'package)
(add-to-list 'package-archives
	     '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)

I saw this when I ran package-install RET psc-ide RET:

Compiling file /home/harry/.emacs.d/elpa/psc-ide-20161220.553/psc-ide-flycheck.el at Thu Jan 12 17:32:41 2017
psc-ide-flycheck.el:20:13:Error: Cannot open load file: no such file or directory, let-alist

Presumably this means that completion won't work? Do I need to install let-alist first?

Goto definition opens wrong file

When I try to go to the definition using M-., the wrong file is opened, e.g. when editing src/Module1.purs and going to a definition which is in src/Module2.purs, the file src/src/Module2.purs is opened instead of src/Module2.purs.

I narrowed this down to the fact that psc-ide-goto-definition-impl does (expand-file-name file) on whatever is returned from psc-ide-server. The expand-file-name function does the expansion relative to the default-directory, which, when src/Module1.purs is opened, is the src directory.

As psc-ide-server returns src/Module2.purs (relative to project root), this path is resolved relatively to src and hence the src is duplicated.

Any ideas how to fix this? This used to work ~4 months ago, not sure what changed since :)

Find project root with projectile

It would be nice if psc-ide-emacs could find the root of the current Project and start psc-ide-server accordingly.

The -d/--directory switch can be used to set the working directory when starting the server.

Getting type fails if the cursor is on a dot

I wasn't sure if this should be reported here or in the purescript/purescript repo, so I can move this if it's in the wrong place.

The command to get the type of the identifier under the cursor seems to not work if it is a qualified identifier and the cursor is on the dot between the module name and the identifier name. For example:
pscide-get-type

"Invalid argument" when starting server

When starting the server, after choosing the base directory, I always get invalid argument src/**/*.purs. This happens when I use the psc-ide-server tool from the console as well. Even when I specify a file that's definitely there. The help for psc-ide-server says

Usage: psc-ide-server [--version] [-d|--directory ARG] [--output-directory ARG]
                  [-p|--port ARG] [--no-watch] [--debug]

So I'm not sure the tool even accepts files as arguments. I'm using version 0.9.1.

Wrong type argument: listp, "d:"

psc 0.7.6.1
psc-ide 0.5

psc-ide-show-type error

psc-ide-unwrap-result: Wrong type argument: listp, "d:"

company

Company: An error occurred in auto-begin
Company: backend company-psc-ide-backend error "Wrong type argument: listp, "d:"" with args (candidates ma)

Any way to fix it?

Windows problem

  • Doesn't work with psc-ide-use-npm-bin, can't find executable
  • With purs in PATH psc-ide-load-all returns It seems that server is not running

0.10.x npm bin doesn't work too.

Provide completion for qualified imports

eg: with the following import import qualified Data.Array as A

If the user types:

A.

Lookup completions for Data.Array only.

A thing to take care of is that the following is a valid usecase:

import qualified Html.Dom as DOM
import qualified Html.Dom.Attributes as DOM

So we need to take multiple Modules with the same qualifier into account.

Error when opening a .purs file

Im getting the following error when opening a new .purs file:

error in process sentinel: Wrong number of arguments: (2 . 2), 3 [2 times]

and psc-ide-mode doesn't work (no completions, no flycheck, etc.)

I have this

(add-hook 'purescript-mode-hook
          (lambda ()
            (psc-ide-mode)
            (company-mode)
            (flycheck-mode)
            (turn-on-purescript-indentation)))

in my init.el file, but it doesn't seem to help.

Any guess what might be wrong?

Im using emacs 24.5.1 and my OS is OSX El Capitan.

Module import suggestion should ignore comments

I'm not sure if this is an issue with psc-ide itself, but in the following scenario the word following "module" in a comment was picked up as the suggested module name instead of the actual module name.

screen shot 2016-06-20 at 10 26 04 am

screen shot 2016-06-20 at 10 26 16 am

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.

Issue with purescript-mode-hook

Hello,

I am quite new to emacs and don't really comprehend what is going on under the hood.
I installed purescript-mode and psc-ide, added

;; PureScript mode
(require 'purescript-mode)
(require 'psc-ide)
(add-hook 'purescript-mode-hook
  (lambda ()
    (psc-ide-mode)
    (company-mode)
    (flycheck-mode)))

to my .emacs file and things seem to be working. However, everytime I press Enter / Start a new line I get a popup:

purescript-mode-hook is a variable defined in `purescript-mode.el'.
Its value is ((lambda nil
   (psc-ide-mode)
   (company-mode)
   (flycheck-mode)))

Original value was nil

  This variable may be risky if used as a file-local variable.

Documentation:
Hook run after entering PureScript mode.
No problems result if this variable is not bound.
`add-hook' automatically binds it.  (This is true for all hook variables.)

You can customize this variable.

[back]

I started the server with C-C C-s and things like C-C C-a work!
Why is this happening? How can I fix it? Thanks!

Company micro freezes

There are micro freezes when you are typing and company is trying to create complete list. Is it possible to use psc-ide asynchronous?
Also, there should be option to disable pcs-ide company backend, so you could use company with TAGS file.

Go to definition after updating a source file

I noticed that go to definition stops working after a source file is edited.

Only after doing a pulp build followed by a psc-ide-load-all, the positions are updated and the goto works properly.

The easiest way to reproduce is to introduce two values:

x = 10

y = x

and try to jump to x from the definition of y.

Is there some configuration that I might be missing?

Use `npm bin` folder

It would be nice to have the option to use the ide-server version that's installed in the npm bin folder (for example, ./node_modules/.bin/psc-ide-server). This would make it more convenient to use the psc-ide-emacs in multiple projects hat have different versions of the purescript dependency.

I just noticed the ide-purescript Atom package also has this feature.

error when trying to use psc-ide-show-type

I upgraded Spacemacs and some packages and started getting this error when trying to show types:

error in process sentinel: Symbol's function definition is void: font-lock-ensure

I'm using psc-ide 20171122.347 and Spacemacs 0.200.10.x

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.