diff options
author | CppCXY <812125110@qq.com> | 2022-02-07 22:04:45 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2022-02-07 22:04:45 +0800 |
commit | 4a2203daaf5ff5935eb185db1d938a7ed25772e6 (patch) | |
tree | b2a0451e2e3b3b7fe1a14384d3cb7d18a94cf478 /script/provider | |
parent | 3f620ce549997ecaf9db3b3ddf86ca8bb488527f (diff) | |
parent | 38adf62e8dec279ef76073a807989dd8b7669afc (diff) | |
download | lua-language-server-4a2203daaf5ff5935eb185db1d938a7ed25772e6.zip |
Merge branch 'format' of https://github.com/CppCXY/lua-language-server into format
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/capability.lua | 3 | ||||
-rw-r--r-- | script/provider/provider.lua | 12 |
2 files changed, 6 insertions, 9 deletions
diff --git a/script/provider/capability.lua b/script/provider/capability.lua index 31baf690..e13e11e0 100644 --- a/script/provider/capability.lua +++ b/script/provider/capability.lua @@ -114,9 +114,6 @@ function m.getIniter() }, documentFormattingProvider = true, documentRangeFormattingProvider = true - --documentOnTypeFormattingProvider = { - -- firstTriggerCharacter = '}', - --}, } --testFileEvents() diff --git a/script/provider/provider.lua b/script/provider/provider.lua index a5e0a1ca..329bc66b 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -103,9 +103,9 @@ m.register 'initialize' { if params.initializationOptions then if params.initializationOptions.editorConfigFiles then - local code_format = require "code_format" + local codeFormat = require "code_format" for _, config in pairs(params.initializationOptions.editorConfigFiles) do - local status, err = code_format.update_config(1, config.workspace, config.path) + local status, err = codeFormat.update_config(1, config.workspace, config.path) if not status and err ~= nil then log.error(err) @@ -930,7 +930,7 @@ m.register 'textDocument/formatting' { function(params) local uri = files.getRealUri(params.textDocument.uri) workspace.awaitReady(uri) - local _<close> = progress.create(workspace.getScope(uri), lang.script.WINDOW_PROCESSING_TYPE_FORMATTING, 0.5) + local _ <close> = progress.create(workspace.getScope(uri), lang.script.WINDOW_PROCESSING_TYPE_FORMATTING, 0.5) if not files.exists(uri) then return nil @@ -960,7 +960,7 @@ m.register 'textDocument/rangeFormatting' { function(params) local uri = files.getRealUri(params.textDocument.uri) workspace.awaitReady(uri) - local _<close> = progress.create(workspace.getScope(uri), lang.script.WINDOW_PROCESSING_TYPE_FORMATTING, 0.5) + local _ <close> = progress.create(workspace.getScope(uri), lang.script.WINDOW_PROCESSING_TYPE_FORMATTING, 0.5) if not files.exists(uri) then return nil @@ -988,8 +988,8 @@ m.register 'config/editorconfig/update' { abortByFileUpdate = true, ---@async function(params) - local code_format = require "code_format" - local status, err = code_format.update_config(params.type, params.source.workspace, params.source.path) + local codeFormat = require "code_format" + local status, err = codeFormat.update_config(params.type, params.source.workspace, params.source.path) if not status and err ~= nil then log.error(err) |