Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9ebaa0d

Browse files
authored
Merge pull request #3144 from jllv/check_completion_setting
fix: return empty response to `textDocument/completion` if completion disabled
2 parents c3334eb + b95cc88 commit 9ebaa0d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* `NEW` `unnecessary-assert` diagnostic warns when asserting values that are always truthy
66
* `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema)
77
* `FIX` prevent unnecessary edits by LSP formatting when content did not change
8+
* `FIX` return no completions if completion is disabled
89

910
## 3.13.9
1011
`2025年3月13日`

‎script/provider/provider.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,9 @@ m.register 'textDocument/completion' {
618618
---@async
619619
function (params)
620620
local uri = files.getRealUri(params.textDocument.uri)
621+
if not config.get(uri, 'Lua.completion.enable') then
622+
return
623+
end
621624
if not workspace.isReady(uri) then
622625
return nil
623626
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /