Settings
This extension provides some useful settings:
- compiler
- problems
- maxNumberOfProblems
- mainFile
- processesLimit
- implementations
- completion
- hover
- server
- logLevel
- bashOnWindows
Allow to set a custom absolute path for Crystal compiler executable.
✋ requires reload
{
"crystal-lang.compiler": "/usr/bin/crystal"
}
crystal-lang.problems
allow setting different error levels.
- syntax: check syntax and token.
- build: check requires, objects and methods.
- none: disable problem finder.
By default value is syntax
.
{
"crystal-lang.problems": "build"
}
Problems are checked onOpen
and onSave
.
This allows to limit the amount of problems that appears in problems view.
By default value is 100.
{
"crystal-lang.maxNumberOfProblems": 20
}
crystal-lang.mainFile
says to the compiler which file should analyze.
You should use workspaceRoot to get absolute filepath.
The default value is empty
.
{
"crystal-lang.mainFile": "${workspaceRoot}/src/main.cr"
}
Reload VSCode to apply this setting.
This extension block the amount of crystal processes executing in parallel to reduce resources usage.
Commonly crystal takes milliseconds to do something like formatting, but in some projects other features like implementations or completion can take a moment. To prevent using too many resources you can fix the amount of processes.
By default value is 3
.
✋ requires reload
{
"crystal-lang.processesLimit": 5
}
You can use this feature to peek or go to implementation of a method.
This extension show implementations and definitions as same thing.
By default value is false
.
{
"crystal-lang.implementations": true
}
This provides instance method completion using crystal tool context.
You have to press CTRL + SPACE
or CMD + SPACE
to call method suggestion.
By default value is false
.
{
"crystal-lang.completion": true
}
Show symbols information on hover.
This feature uses crystal tool context
to get types.
By default value is false
.
{
"crystal-lang.hover": true
}
This provide support for Language Server Protocol using Crystalline or Scry.
See implemented features.
By default value is empty
.
{
"crystal-lang.server": "/absolute/path/bin/crystalline_or_scry"
}
Controls the amount of data logged by Scry server.
You can see logs in scry.out
files located on the OS temp directory.
{
"crystal-lang.logLevel": "debug | info | warn | error | fatal"
}
Allow to enable Windows Subsystem Linux support.
You need to install crystal.bat
shortcut using crystal-windows-installer.
Node.js backend doesn't detect c:\> crystal
but c:\> crystal.bat
.
By default values are false
and empty
.
{
"crystal-lang.bashOnWindows": true,
"crystal-lang.compiler": "crystal.bat"
}