mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 16:08:05 +00:00
A new Java scratch was an empty file that couldn't run until a class and main method were typed in. Languages can now define `scratch-template` in `languages/<id>.toml`; a new scratch gets that content with the caret at `$END$`. - Java, Kotlin, Go, Rust, C and C++ get a runnable `main`. - Other languages still start empty.
27 lines
627 B
TOML
27 lines
627 B
TOML
id = "rust"
|
|
name = "Rust"
|
|
extensions = ["rs"]
|
|
line-comment = "//"
|
|
block-comment = ["/*", "*/"]
|
|
indent = { tab-size = 4, insert-spaces = true }
|
|
ui-mode = "Rust"
|
|
tree-sitter = "rust"
|
|
scratch-template = '''
|
|
fn main() {
|
|
$END$
|
|
}
|
|
'''
|
|
|
|
[[language-servers]]
|
|
name = "rust-analyzer"
|
|
command = "rust-analyzer"
|
|
root-markers = ["Cargo.toml", "rust-project.json"]
|
|
install-hint = "rustup component add rust-analyzer"
|
|
|
|
[debugger]
|
|
adapter = "codelldb"
|
|
command = "codelldb"
|
|
args = ["--port", "${port}"]
|
|
transport = "tcp"
|
|
install-hint = "Install the CodeLLDB adapter (https://github.com/vadimcn/codelldb/releases) and put `codelldb` on PATH"
|