rename diagnostic to lint
This commit is contained in:
parent
0fd6a48ed2
commit
b5750b1a8a
@ -1,7 +1,7 @@
|
||||
(local dispatch (require :fennel-ls.dispatch))
|
||||
(local json-rpc (require :fennel-ls.json-rpc))
|
||||
(local state (require :fennel-ls.state))
|
||||
(local diagnostics (require :fennel-ls.diagnostics))
|
||||
(local lint (require :fennel-ls.lint))
|
||||
|
||||
(λ check [filenames]
|
||||
(let [server (doto {}
|
||||
@ -15,7 +15,7 @@
|
||||
(var should-err? false)
|
||||
(each [_ filename (ipairs filenames)]
|
||||
(let [file (state.get-by-uri server (.. "file://" filename))]
|
||||
(diagnostics.check server file)
|
||||
(lint.check server file)
|
||||
(each [_ {: message :range {: start}} (ipairs file.diagnostics)]
|
||||
(print (: "%s:%s:%s %s" :format filename
|
||||
;; LSP line numbers are zero-indexed, but Emacs and Vim both use
|
||||
|
||||
@ -5,7 +5,7 @@ Every time the client sends a message, it gets handled by a function in the corr
|
||||
(ie, a textDocument/didChange notification will call notifications.textDocument/didChange
|
||||
and a textDocument/defintion request will call requests.textDocument/definition)"
|
||||
|
||||
(local diagnostics (require :fennel-ls.diagnostics))
|
||||
(local lint (require :fennel-ls.lint))
|
||||
(local message (require :fennel-ls.message))
|
||||
(local state (require :fennel-ls.state))
|
||||
(local language (require :fennel-ls.language))
|
||||
@ -253,12 +253,12 @@ Every time the client sends a message, it gets handled by a function in the corr
|
||||
(λ notifications.textDocument/didChange [self send {: contentChanges :textDocument {: uri}}]
|
||||
(local file (state.get-by-uri self uri))
|
||||
(state.set-uri-contents self uri (utils.apply-changes file.text contentChanges self.position-encoding))
|
||||
(diagnostics.check self file)
|
||||
(lint.check self file)
|
||||
(send (message.diagnostics file)))
|
||||
|
||||
(λ notifications.textDocument/didOpen [self send {:textDocument {: languageId : text : uri}}]
|
||||
(local file (state.set-uri-contents self uri text))
|
||||
(diagnostics.check self file)
|
||||
(lint.check self file)
|
||||
(send (message.diagnostics file))
|
||||
(set file.open? true))
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
:test.hover
|
||||
:test.completion
|
||||
:test.references
|
||||
:test.diagnostic
|
||||
:test.lint
|
||||
:test.code-action
|
||||
:test.rename
|
||||
:test.misc])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user