summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-07 21:27:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-07 21:27:45 +0800
commit680e6c9848a6e5f43ccce11561ec98839822bdea (patch)
tree829e587428002e9fdd3f82364c39490d2c3f0c24 /script/provider
parent5762f1bdc412a128489f0ad27124193fedfb13e9 (diff)
downloadlua-language-server-680e6c9848a6e5f43ccce11561ec98839822bdea.zip
cleanup
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/diagnostic.lua2
-rw-r--r--script/provider/formatting.lua2
-rw-r--r--script/provider/spell.lua1
3 files changed, 3 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 076a613e..d6d6c4a3 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -183,7 +183,7 @@ function m.syntaxErrors(uri, ast)
local results = {}
pcall(function ()
- local disables = config.get(uri, 'Lua.diagnostics.disable')
+ local disables = util.arrayToHash(config.get(uri, 'Lua.diagnostics.disable'))
for _, err in ipairs(ast.errs) do
if not disables[err.type:lower():gsub('_', '-')] then
results[#results+1] = buildSyntaxError(uri, err)
diff --git a/script/provider/formatting.lua b/script/provider/formatting.lua
index 4c153330..7bb802e1 100644
--- a/script/provider/formatting.lua
+++ b/script/provider/formatting.lua
@@ -83,7 +83,7 @@ function m.updateNonStandardSymbols(symbols)
end
local eqTokens = {}
- for token in pairs(symbols) do
+ for _, token in ipairs(symbols) do
if token:find("=") and token ~= "!=" then
table.insert(eqTokens, token)
end
diff --git a/script/provider/spell.lua b/script/provider/spell.lua
index 60efc223..3909ddd2 100644
--- a/script/provider/spell.lua
+++ b/script/provider/spell.lua
@@ -7,6 +7,7 @@ local fs = require 'bee.filesystem'
local config = require 'config'
local diagnostics = require 'provider.diagnostic'
local pformatting = require 'provider.formatting'
+local util = require 'utility'
local m = {}