Skip to content

fix: return empty response to textDocument/completion if completion disabled #3144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* `NEW` `unnecessary-assert` diagnostic warns when asserting values that are always truthy
* `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema)
* `FIX` prevent unnecessary edits by LSP formatting when content did not change
* `FIX` return no completions if completion is disabled

## 3.13.9
`2025-3-13`
Expand Down
3 changes: 3 additions & 0 deletions script/provider/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ m.register 'textDocument/completion' {
---@async
function (params)
local uri = files.getRealUri(params.textDocument.uri)
if not config.get(uri, 'Lua.completion.enable') then
return
end
if not workspace.isReady(uri) then
return nil
end
Expand Down
Loading