Skip to content

Commit

Permalink
feat: add roc-language-server support (#3143)
Browse files Browse the repository at this point in the history
This adds a basic configuration for Roc's built-in language
server.

So far only go-to-definition, hover, inline diagnostics and formatting
is implemented.

Co-authored-by: jdsee <jdsee@protonmail.com>
  • Loading branch information
jdsee and jdsee committed May 8, 2024
1 parent 2beb3e9 commit e0cc3f9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lua/lspconfig/server_configurations/roc_ls.lua
@@ -0,0 +1,21 @@
local util = require 'lspconfig.util'

return {
default_config = {
cmd = { 'roc_language_server' },
filetypes = { 'roc' },
root_dir = util.find_git_ancestor,
single_file_support = true,
},
docs = {
description = [[
https://github.com/roc-lang/roc/tree/main/crates/language_server#roc_language_server
The built-in language server for the Roc programming language.
[Installation](https://github.com/roc-lang/roc/tree/main/crates/language_server#installing)
]],
default_config = {
root_dir = [[util.find_git_ancestor]],
},
},
}

0 comments on commit e0cc3f9

Please sign in to comment.