###
### Configuration for languages
###

[[language]]
name = "go"
language-servers = ["gopls"]

[[language]]
name = "markdown"
language-servers = ["marksman"]

# Change dart format to 120 lines
[[language]]
name = "dart"
formatter = {command = "dart", args = ["format", "-l", "120"]}
language-servers = ["dart"]

[[language]]
name = "nix"
language-servers = ["nil"]

#
# Zig configuration
# 
[[language]]
name = "zig"
language-servers = ["zls"]

[language.debugger]
name = "codelldb-dap"
transport = "tcp"
command = "codelldb"
args = []
port-arg = "--port {}"

[[language.debugger.templates]]
name = "launch"
request = "launch"
completion = [ { name = "binary", completion = "filename" } ]
args = { console = "internalConsole", program = "{0}" }

[[language.debugger.templates]]
name = "attach"
request = "attach"
completion = [ "pid" ]
args = { console = "internalConsole", pid = "{0}" }

[[language.debugger.templates]]
name = "gdbserver attach"
request = "attach"
completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }

#
# cyo custom def
# 
[[language]]
name = "cyano"
scope = "source.cyo"
file-types = ["cyo"]
# Spell checker
language-servers = ["ltex-ls"]

[language-server.ltex-ls]
command = "ltex-ls"

