mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +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.
29 lines
571 B
TOML
29 lines
571 B
TOML
id = "go"
|
|
name = "Go"
|
|
extensions = ["go"]
|
|
line-comment = "//"
|
|
block-comment = ["/*", "*/"]
|
|
indent = { tab-size = 4, insert-spaces = false }
|
|
ui-mode = "Go"
|
|
tree-sitter = "go"
|
|
scratch-template = '''
|
|
package main
|
|
|
|
func main() {
|
|
$END$
|
|
}
|
|
'''
|
|
|
|
[[language-servers]]
|
|
name = "gopls"
|
|
command = "gopls"
|
|
root-markers = ["go.work", "go.mod"]
|
|
install-hint = "go install golang.org/x/tools/gopls@latest"
|
|
|
|
[debugger]
|
|
adapter = "delve"
|
|
command = "dlv"
|
|
args = ["dap", "--listen", "127.0.0.1:${port}"]
|
|
transport = "tcp"
|
|
install-hint = "go install github.com/go-delve/delve/cmd/dlv@latest"
|