JohnnyMorganz / luau-lsp

Language Server Implementation for Luau
MIT License
218 stars 57 forks source link

Disable completion without disabling auto-imports? #681

Open ghost opened 1 month ago

JohnnyMorganz commented 1 month ago

Do you mind explaining your usecase here?

ghost commented 1 month ago

I have Roblox LSP and Luau LSP active since I like Roblox LSP's autocompletion, but I like Luau LSP's typing. With both of them it duplicates the autocompletion. Is there a way to disable it for Luau LSP?

ghost commented 1 month ago

image

lolmanurfunny commented 1 month ago

Is there a way to disable it for Luau LSP?

No, there's currently no way to disable completion in Luau LSP without also disabling auto-imports. This is because the setting responsible for auto-imports, luau-lsp.completion.imports.enabled, is under the luau-lsp.completion namespace rather than having it as its own independent setting like how Roblox LSP's config has it.

JohnnyMorganz commented 1 month ago

This is because the setting responsible for auto-imports, luau-lsp.completion.imports.enabled, is under the luau-lsp.completion namespace rather than having it as its own independent setting like how Roblox LSP's config has it.

This is not the reason. It does not make a difference where the config is located, and can be doable either way. Auto import is a type of autocomplete. Making it separable requires changes to our underlying completion operation structure.

lolmanurfunny commented 1 month ago

This is not the reason. It does not make a difference where the config is located, and can be doable either way.

I didn't intend to imply that it was. I was just trying to give a simple explanation, but I guess it was misleading.