scry
scry copied to clipboard
Lack of documentation on the scry setup
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:
:warning: Work In Progress, see the wiki: https://github.com/crystal-lang-tools/scry/wiki/Clients
- [ ] Atom :warning:
- [ ] VSCode :warning:
- [ ] Vim :warning:
- [ ] NeoVim :warning:
- [ ] Sublime Text :warning:
- [ ] Eclipse
- [ ] Emacs :warning:
- [ ] Intellij Idea
- [ ] Visual Studio
If you have tested scry successfully in some editor , please feel free to contribute to scry wiki :+1:
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.
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.
@faustinoaq I see how @keplersj installs scry through his atom package, would something similar be possible for vscode-crystal-lang?
@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 :sweat_smile:
Currently scry is pretty stable, lightweight and fast, so, maybe I can try to add it again :smile:
https://github.com/crystal-lang-tools/vscode-crystal-lang/blob/229f2e2e3910724e60dc76f3f4fce6ddd652eff0/src/crystalMain.ts#L31-L48
Feel free to open a PR :wink:
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 :100:
@faustinoaq Scry is already available in emacs(lsp-crystal.el).
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
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.
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?