-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from CFiggers/dev
v0.0.4
- Loading branch information
Showing
8 changed files
with
111 additions
and
82 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
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,21 +1,26 @@ | ||
(declare-project | ||
:name "janet-lsp" | ||
:description "A Language Server (LSP) for the Janet Programming Language" | ||
:version "0.0.3" | ||
:version "0.0.4" | ||
:dependencies ["https://github.com/janet-lang/spork.git" | ||
"https://github.com/ianthehenry/judge.git"]) | ||
|
||
(def cflags | ||
(case (os/which) | ||
:windows [] | ||
["-s"])) | ||
# (def cflags | ||
# (case (os/which) | ||
# :windows [] | ||
# ["-s"])) | ||
|
||
(declare-executable | ||
:name "janet-lsp" | ||
:entry "src/main.janet" | ||
:cflags cflags | ||
:install true) | ||
# (declare-executable | ||
# :name "janet-lsp" | ||
# :entry "src/main.janet" | ||
# :cflags cflags | ||
# :install true) | ||
|
||
(declare-archive | ||
:name "janet-lsp" | ||
:entry "/src/main") | ||
:name "janet-lsp" | ||
:entry "/src/main") | ||
|
||
(declare-binscript | ||
:main "src/janet-lsp" | ||
:hardcode-syspath true | ||
:is-janet true) |
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(import janet-lsp) | ||
|
||
(defn main [& args] | ||
(janet-lsp/main ;args)) |
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
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
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,7 +1,12 @@ | ||
# (import spork/json) | ||
(import ../libs/jayson) | ||
|
||
(defn success-response [id result] | ||
(jayson/encode {:jsonrpc "2.0" | ||
:id id | ||
:result result})) | ||
(defn success-response [id result &keys opts] | ||
(def rpc | ||
(if (opts :notify) | ||
(merge {:jsonrpc "2.0"} | ||
result) | ||
{:jsonrpc "2.0" | ||
:id id | ||
:result result})) | ||
(jayson/encode rpc)) |
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