summaryrefslogtreecommitdiff
path: root/script/provider/formatting.lua
diff options
context:
space:
mode:
authorfesily <fesil@foxmail.com>2024-01-10 11:03:21 +0800
committerGitHub <noreply@github.com>2024-01-10 11:03:21 +0800
commit1e7bb72ad3ff2b75a1c55ee4bc53004cb7fe30f7 (patch)
treedd94cf09b9e3a675a73a9f1d41248d1538165997 /script/provider/formatting.lua
parentbb6e172d6166190bd4edd3bb56230a7d60ebcb93 (diff)
parent37779f9b2493e51e59e1e4366bf7dcb8350e69bd (diff)
downloadlua-language-server-1e7bb72ad3ff2b75a1c55ee4bc53004cb7fe30f7.zip
Merge branch 'LuaLS:master' into plugin-add-OnTransformAst
Diffstat (limited to 'script/provider/formatting.lua')
-rw-r--r--script/provider/formatting.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/script/provider/formatting.lua b/script/provider/formatting.lua
index 73f9a534..ea94db08 100644
--- a/script/provider/formatting.lua
+++ b/script/provider/formatting.lua
@@ -82,16 +82,13 @@ function m.updateNonStandardSymbols(symbols)
return
end
- local eqTokens = {}
- for _, token in ipairs(symbols) do
- if token:find("=") and token ~= "!=" then
- table.insert(eqTokens, token)
+ for _, symbol in ipairs(symbols) do
+ if symbol == "//" then
+ codeFormat.set_clike_comments_symbol()
end
end
- if #eqTokens ~= 0 then
- codeFormat.set_nonstandard_symbol()
- end
+ codeFormat.set_nonstandard_symbol()
end
config.watch(function(uri, key, value)