-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(koka): fix koka language server config (#3213)
- Loading branch information
Showing
1 changed file
with
6 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,21 @@ | ||
local util = require 'lspconfig.util' | ||
|
||
local root_files = {} | ||
|
||
local default_capabilities = { | ||
textDocument = { | ||
completion = { | ||
editsNearCursor = true, | ||
}, | ||
}, | ||
offsetEncoding = { 'utf-8' }, | ||
} | ||
|
||
return { | ||
default_config = { | ||
cmd = { 'koka', '--language-server' }, | ||
filetypes = { 'kk' }, | ||
root_dir = function(fname) | ||
return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) | ||
end, | ||
cmd = { 'koka', '--language-server', '--lsstdio' }, | ||
filetypes = { 'koka' }, | ||
single_file_support = true, | ||
capabilities = default_capabilities, | ||
root_dir = util.find_git_ancestor, | ||
}, | ||
commands = {}, | ||
|
||
docs = { | ||
description = [[ | ||
https://koka-lang.github.io/koka/doc/index.html | ||
Koka is a functional programming language with effect types and handlers. | ||
]], | ||
default_config = { | ||
root_dir = [[ | ||
]], | ||
capabilities = [[default capabilities, with offsetEncoding utf-8]], | ||
root_dir = [[git directory]], | ||
capabilities = [[default capabilities]], | ||
}, | ||
}, | ||
} |