refactoring and starting to implement settings
This commit is contained in:
parent
cd4358a4b7
commit
566b475ff8
@ -158,6 +158,10 @@ Every time the client sends a message, it gets handled by a function in the corr
|
||||
(local file (state.get-by-uri self uri))
|
||||
(set file.open? false))
|
||||
|
||||
(λ notifications.workspace/didChangeConfiguration [self send params]
|
||||
(set self.settings params.fennel-ls))
|
||||
;; TODO respect the settings
|
||||
|
||||
(λ requests.shutdown [self send]
|
||||
"The server still needs to respond to this request, so the program can't close yet. Just wait until notifications.exit"
|
||||
nil)
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
(let [response (dispatch.handle* state (completion-at filename line col))
|
||||
seen (collect [_ suggestion (ipairs (. response 1 :result))]
|
||||
suggestion.label suggestion.label)]
|
||||
(if (= (type expected) :table)
|
||||
(if expected
|
||||
(each [_ exp (ipairs expected)]
|
||||
(is.truthy (. seen exp) (.. exp " was not suggested, but should be"))))
|
||||
(if ?unexpected
|
||||
@ -33,7 +33,6 @@
|
||||
{:jsonrpc "2.0" :id id :result nil}
|
||||
"there shouldn't be a result")))
|
||||
|
||||
|
||||
(describe "completions"
|
||||
(it "suggests globals"
|
||||
(check-completion "(" 0 1 [:_G :debug :table :io :getmetatable :setmetatable :_VERSION :ipairs :pairs :next]))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user