From b5750b1a8ab39ef9b7a2a8c0657f130759a3fed7 Mon Sep 17 00:00:00 2001 From: XeroOl Date: Thu, 28 Mar 2024 23:01:20 -0500 Subject: [PATCH] rename diagnostic to lint --- src/fennel-ls.fnl | 4 ++-- src/fennel-ls/handlers.fnl | 6 +++--- src/fennel-ls/{diagnostics.fnl => lint.fnl} | 0 test/init.fnl | 2 +- test/{diagnostic.fnl => lint.fnl} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename src/fennel-ls/{diagnostics.fnl => lint.fnl} (100%) rename test/{diagnostic.fnl => lint.fnl} (100%) diff --git a/src/fennel-ls.fnl b/src/fennel-ls.fnl index dcce084..18edfe3 100644 --- a/src/fennel-ls.fnl +++ b/src/fennel-ls.fnl @@ -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 diff --git a/src/fennel-ls/handlers.fnl b/src/fennel-ls/handlers.fnl index b9bf6d5..07db3d4 100644 --- a/src/fennel-ls/handlers.fnl +++ b/src/fennel-ls/handlers.fnl @@ -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)) diff --git a/src/fennel-ls/diagnostics.fnl b/src/fennel-ls/lint.fnl similarity index 100% rename from src/fennel-ls/diagnostics.fnl rename to src/fennel-ls/lint.fnl diff --git a/test/init.fnl b/test/init.fnl index 9761b51..22a755a 100644 --- a/test/init.fnl +++ b/test/init.fnl @@ -20,7 +20,7 @@ :test.hover :test.completion :test.references - :test.diagnostic + :test.lint :test.code-action :test.rename :test.misc]) diff --git a/test/diagnostic.fnl b/test/lint.fnl similarity index 100% rename from test/diagnostic.fnl rename to test/lint.fnl