Comments (9)
@paulcsmith Thank for your comment!
Go to Definition already work just methods. Modules or clases doesn't work due crystal doesn't support it yet. See crystal-lang/crystal#4941
Still a bit unstable, sometimes doesn't work
You can enable go to method definition using:
{
"crystal-lang.implementations": true
}
https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki/Settings#implementations
If you are in a custom project where you specify all requires inside a main file then you need to use:
https://github.com/crystal-lang-tools/vscode-crystal-lang/wiki/Settings#mainfile
{
"crystal-lang.mainFile": "${workspaceRoot}/src/mymainfile.cr"
}
(Older version Peek implementation command has been removed on latest versions)
from vscode-crystal-lang.
@Narven you might try this alternative
from vscode-crystal-lang.
But as I see now that issue is fixed by a PR. Can you support that now??
from vscode-crystal-lang.
When jump to definition throws the following error:
[Info - 9:53:45 PM] Scry is looking into your code...
[Error - 9:53:54 PM] A error was found while searching implementations
Unexpected char 'U' at 1:1
Usage: crystal tool implementations [options] [programfile] [--] [arguments]
from vscode-crystal-lang.
Hi, @minkir014 @iambudi This extension uses the output provided by crystal tool
CLI, so if the feature finds an error it's because crystal was designed that way, there is some workaround using a dynamic code analyzer based on javascript or something similar
Scry has some nice features but is in a very experimental state yet. It also uses crystal CLI, so it is an issue and it requires the full updated implementation of Language Server Protocol.
Right now I'm fixing some issues on Node.js backend of this extension, I'll figure out a way to solve this issue.
Cheers!
from vscode-crystal-lang.
Thanks @faustinoaq!!
from vscode-crystal-lang.
What is the current status of this?
On my side I don't see this work in any way currently. With peek, mouse click or anything.
I would say this is a pretty standard way to navigate code in the last 10 years, it pretty much renders useless any kind of editor/ide if it does not have it.
I'm currently running:
$ crystal -v
Crystal 1.8.2 (2023-05-09)
LLVM: 15.0.7
Default target: x86_64-apple-macosx
What do we need to do to make this a top priority? and/or help?
from vscode-crystal-lang.
Thanks @iambudi, will try that.
from vscode-crystal-lang.
This should work with v0.9.0-alpha.1, though it's reliant on the crystal tool implementations
CLI tool. This can be unreliable when working on a libraries internals and I'm not sure why - when working on an executable/app where everything gets compiled it works well.
from vscode-crystal-lang.
Related Issues (20)
- New release? HOT 20
- Supporting mutiple main files (entry points) for a single project HOT 4
- Hover feature does not work with Windows11 PC and v0.8.4 of the extension (Native Windows Crystal, not WSL) HOT 1
- With compiler path set properly still get error upon opening first .cr file HOT 1
- Dot in comments triggers autocomplete. HOT 3
- Crystalline server crashes if VSCode started with shortcut HOT 6
- Tasks don't support arbitrary files
- Use `spawn` instead of `exec` for formatting
- V 0.9 won't catch some errors HOT 1
- Type on hover missing HOT 7
- Syntax highlight mismatch for methods and variables HOT 3
- do autocompletes to DivisionByZero on ENTER HOT 8
- Non-variables starting with underscore are colored like comments
- Method names that start with a macro interpolation will show gray syntax highlighting HOT 1
- ECR formatting
- Not working when working from a parent DIR HOT 3
- Classes imported from shards throw a "undefined constant" error HOT 5
- After code is corrected and saved, previous error/problem is still persistent HOT 7
- Hover fails on fresh crystal install on Windows HOT 2
- Refactor to have one onDidSaveTextDocument
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 vscode-crystal-lang.