diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-07 21:27:45 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-07 21:27:45 +0800 |
commit | 680e6c9848a6e5f43ccce11561ec98839822bdea (patch) | |
tree | 829e587428002e9fdd3f82364c39490d2c3f0c24 /script/provider | |
parent | 5762f1bdc412a128489f0ad27124193fedfb13e9 (diff) | |
download | lua-language-server-680e6c9848a6e5f43ccce11561ec98839822bdea.zip |
cleanup
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/diagnostic.lua | 2 | ||||
-rw-r--r-- | script/provider/formatting.lua | 2 | ||||
-rw-r--r-- | script/provider/spell.lua | 1 |
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 = {} |