Skip to content

Commit

Permalink
Add koka language server and update grammar (helix-editor#10119)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoohey31 committed Apr 5, 2024
1 parent f240d89 commit a2ee2e6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 37 deletions.
2 changes: 1 addition & 1 deletion book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
| julia |||| `julia` |
| just |||| |
| kdl |||| |
| koka || || |
| koka || || `koka` |
| kotlin || | | `kotlin-language-server` |
| latex ||| | `texlab` |
| ld || || |
Expand Down
4 changes: 3 additions & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ intelephense = { command = "intelephense", args = ["--stdio"] }
jdtls = { command = "jdtls" }
jsonnet-language-server = { command = "jsonnet-language-server", args= ["-t", "--lint"] }
julia = { command = "julia", timeout = 60, args = [ "--startup-file=no", "--history-file=no", "--quiet", "-e", "using LanguageServer; runserver()", ] }
koka = { command = "koka", args = ["--language-server", "--lsstdio"] }
kotlin-language-server = { command = "kotlin-language-server" }
lean = { command = "lean", args = [ "--server" ] }
ltex-ls = { command = "ltex-ls" }
Expand Down Expand Up @@ -3264,10 +3265,11 @@ injection-regex = "koka"
file-types = ["kk"]
comment-token = "//"
indent = { tab-width = 8, unit = " " }
language-servers = ["koka"]

[[grammar]]
name = "koka"
source = { git = "https://github.com/mtoohey31/tree-sitter-koka", rev = "2527e152d4b6a79fd50aebd8d0b4b4336c94a034" }
source = { git = "https://github.com/mtoohey31/tree-sitter-koka", rev = "96d070c3700692858035f3524cc0ad944cef2594" }

[[language]]
name = "tact"
Expand Down
34 changes: 0 additions & 34 deletions runtime/queries/koka/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@
])))
["(" (block) (fnexpr)])

(ntlappexpr
function: (ntlappexpr
(atom
(qidentifier
[
(qvarid) @function
(qidop) @function
(identifier
[(varid) (idop)] @function)
])))
["(" (block) (fnexpr)])

(appexpr
field: (atom
(qidentifier
Expand All @@ -46,28 +34,6 @@
])))
"[")

(ntlappexpr
field: (atom
(qidentifier
[
(qvarid) @function
(qidop) @function
(identifier
[(varid) (idop)] @function)
])))

(ntlappexpr
(ntlappexpr
field: (atom
(qidentifier
[
(qvarid) @variable
(qidop) @variable
(identifier
[(varid) (idop)] @variable)
])))
"[")

[
"initially"
"finally"
Expand Down
1 change: 0 additions & 1 deletion runtime/queries/koka/indents.scm
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[
(appexpr ["[" "("]) ; Applications.
(ntlappexpr ["[" "("])
(atom ["[" "("]) ; Lists and tuples.
(program (moduledecl "{")) ; Braced module declarations.
(funbody)
Expand Down

0 comments on commit a2ee2e6

Please sign in to comment.