summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-06-09 15:39:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-06-09 15:39:37 +0800
commitfeb7a18c4bfb416d38af519ab44167b50dae4af8 (patch)
tree55a52b9d8140dcc301c85b29bf5befee7dada0fe
parent7b1143ee0144be3ab7c1492563fe931ff1f00aaf (diff)
downloadlua-language-server-feb7a18c4bfb416d38af519ab44167b50dae4af8.zip
#175 可以关闭参数提示
-rw-r--r--script/config.lua3
-rw-r--r--script/method/textDocument/signatureHelp.lua4
2 files changed, 7 insertions, 0 deletions
diff --git a/script/config.lua b/script/config.lua
index 146631b8..471ef560 100644
--- a/script/config.lua
+++ b/script/config.lua
@@ -124,6 +124,9 @@ local ConfigTemplate = {
callSnippet = {'Disable', String},
keywordSnippet = {'Replace', String},
},
+ signatureHelp = {
+ enable = {true, Boolean},
+ },
color = {
mode = {'Semantic', String},
},
diff --git a/script/method/textDocument/signatureHelp.lua b/script/method/textDocument/signatureHelp.lua
index 3c6890d7..69cf6c8f 100644
--- a/script/method/textDocument/signatureHelp.lua
+++ b/script/method/textDocument/signatureHelp.lua
@@ -1,9 +1,13 @@
local core = require 'core'
+local config = require 'config'
--- @param lsp LSP
--- @param params table
--- @return table
return function (lsp, params)
+ if not config.config.signatureHelp.enable then
+ return
+ end
local uri = params.textDocument.uri
local vm, lines = lsp:loadVM(uri)
if not vm then