diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-24 18:42:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-24 18:42:22 +0800 |
commit | 8b57fe8867cf2a82025b8c0b18305ea24b063f4f (patch) | |
tree | 51b708ee01e34c67e2c7531f4f8c770071f0bd8b /script/provider/diagnostic.lua | |
parent | 8a2de634b1db860a009dafb5144c0d38eeacc5ad (diff) | |
download | lua-language-server-8b57fe8867cf2a82025b8c0b18305ea24b063f4f.zip |
add settings for file scheme
`workspace.supportScheme`: `["file", "untitled", "git"]`
`diagnostics.disableScheme`: `["git"]`
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r-- | script/provider/diagnostic.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index 15b08d49..36428b67 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -14,6 +14,7 @@ local loading = require 'workspace.loading' local scope = require 'workspace.scope' local time = require 'bee.time' local ltable = require 'linked-table' +local furi = require 'file-uri' ---@class diagnosticProvider local m = {} @@ -217,6 +218,11 @@ function m.doDiagnostic(uri, isScopeDiag) end end end + local scheme = furi.split(uri) + local disableScheme = config.get(uri, 'Lua.diagnostics.disableScheme') + if disableScheme[scheme] then + return + end await.delay() |