Settings - crystal-lang-tools/vscode-crystal-lang GitHub Wiki
This extension provides some useful settings:
- compiler
- problems
- maxNumberOfProblems
- mainFile
- processesLimit
- implementations
- completion
- hover
- server
- logLevel
- bashOnWindows
compiler
Allow to set a custom absolute path for Crystal compiler executable.
:hand: requires reload
{
"crystal-lang.compiler": "/usr/bin/crystal"
}
problems
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
.
maxNumberOfProblems
This allows to limit the amount of problems that appears in problems view.
By default value is 100.
{
"crystal-lang.maxNumberOfProblems": 20
}
mainFile
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"
}
processesLimit
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
.
:hand: requires reload
{
"crystal-lang.processesLimit": 5
}
implementations
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
.
:warning: Unstable feature
{
"crystal-lang.implementations": true
}
completion
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
.
:warning: Unstable feature
{
"crystal-lang.completion": true
}
hover
Show symbols information on hover.
This feature uses crystal tool context
to get types.
By default value is false
.
:warning: Unstable feature
{
"crystal-lang.hover": true
}
server
This provide support for Language Server Protocol using Crystalline or Scry.
See implemented features.
By default value is empty
.
:warning: Unstable feature, requires reload
{
"crystal-lang.server": "/absolute/path/bin/crystalline_or_scry"
}
logLevel
Controls the amount of data logged by Scry server.
You can see logs in scry.out
files located on the OS temp directory.
:warning: Unstable feature
{
"crystal-lang.logLevel": "debug | info | warn | error | fatal"
}
bashOnWindows
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
.
:warning: Unstable feature, requires reload
{
"crystal-lang.bashOnWindows": true,
"crystal-lang.compiler": "crystal.bat"
}