Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Lack of documentation on the scry setup #56

Closed
9 tasks
faustinoaq opened this issue Mar 7, 2018 · 9 comments
Closed
9 tasks

Lack of documentation on the scry setup #56

faustinoaq opened this issue Mar 7, 2018 · 9 comments

Comments

@faustinoaq
Copy link
Member

faustinoaq commented Mar 7, 2018

Hi @crystal-lang-tools/scry community!

This project is getting better everyday. I think is cool but some newcomers are getting confused on how to use scry. This is mainly because the lack of documentation on LSP clients configuration:

I propose to write some wiki articles about configuring scry to run on:

⚠️ Work In Progress, see the wiki: https://github.com/crystal-lang-tools/scry/wiki/Clients

@faustinoaq
Copy link
Member Author

If you have tested scry successfully in some editor , please feel free to contribute to scry wiki 👍

@keplersj
Copy link
Contributor

keplersj commented Mar 7, 2018

Use with Atom is as simple as installing the ide-crystal package and a consumer package. This can be done using either the Settings GUI, or on the command line with apm install ide-crystal. For the consumer I recommend atom-ide-ui. Facebook's Nuclide and steelbrain's linter (only providers diagnostics, not full IDE functionality) are also viable options for consumers.

@kofno
Copy link
Contributor

kofno commented Mar 8, 2018

I'm kind of a newcomer again, so maybe I can find some time to re-set things up and I can write some articles from a kind-of newcomer perspective.

@bmulvihill
Copy link
Contributor

@faustinoaq I see how @keplersj installs scry through his atom package, would something similar be possible for vscode-crystal-lang?

@faustinoaq
Copy link
Member Author

faustinoaq commented Mar 9, 2018

@bmulvihill In fact I used to embed scry in vscode-crystal-lang. I removed it because some time ago scry was some unsable, bigger and slower 😅

Currently scry is pretty stable, lightweight and fast, so, maybe I can try to add it again 😄

https://github.com/crystal-lang-tools/vscode-crystal-lang/blob/229f2e2e3910724e60dc76f3f4fce6ddd652eff0/src/crystalMain.ts#L31-L48

Feel free to open a PR 😉

CHANGELOG entry

@faustinoaq
Copy link
Member Author

I removed embedded scry here: https://github.com/crystal-lang-tools/vscode-crystal-lang/blob/master/CHANGELOG.md#change-8

BTW, I used 7zip because I was trying to ship scry as small as possible. Seems that isn't a problem now 💯

@brantou
Copy link
Member

brantou commented Mar 9, 2018

@faustinoaq Scry is already available in emacs(lsp-crystal.el).
wechatimg47

However, scry has some problems when dealing with didSave.

{"code":-32001,"message":"Couldn't parse (Scry::NotificationMessage | Scry::RequestMessage) from {"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///home/parallels/program/github/scry/src/scry/log.cr","version":30},"includeText":""}} at 1:1","data":["???","(Scry::NotificationMessage | Scry::RequestMessage)","Scry::Message#parse:(Scry::NotificationMessage | Scry::RequestMessage)","Scry::start:(IO+ | Nil)","__crystal_main","_crystal_main<Int32, Pointer(Pointer(UInt8))>:Nil","Crystal::main_user_code<Int32, Pointer(Pointer(UInt8))>:Nil","Crystal::main<Int32, Pointer(Pointer(UInt8))>:Int32","main","__libc_start_main","_start","???"]}

I made a local change and fixed the above problem.

struct TextDocumentParams
    JSON.mapping({
      text_document: {type: (TextDocumentIdentifier | VersionedTextDocumentIdentifier), key: "textDocument"},
      text:          String?,
      include_text:  {type: Bool, nilable: true, key: "includeText"},  # Add includeText fix didSave bug
    }, true)
  end

@KaneRoot
Copy link

Besides the setup, the documentation is lacking an explanation about the actual features of Scry.
I read the wiki, I still don't know what are the actual features implemented.

@omerxx
Copy link

omerxx commented Sep 25, 2020

Hi guys, any hint about nvim setup?
It's taking hours and I still can't figure it out.
Can anyone provide an init.vim / .vimrc example of the setup function for the lsp?

@bcardiff bcardiff closed this as completed Jun 1, 2023
Crystal Tools automation moved this from To do to Done Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Crystal Tools
  
Done
Development

No branches or pull requests

8 participants