vscode-elixir-ls icon indicating copy to clipboard operation
vscode-elixir-ls copied to clipboard

Autocomplete spacing between Module and type (e.g. struct/behaviour)

Open benvp opened this issue 2 years ago • 3 comments

I noticed that when having autocomplete of modules that there is no space between the actual module name and the type of it (e.g. struct or behaviour).

CleanShot 2023-10-16 at 09 53 28@2x

I'd expect at least there to be a space or some margin so that this can be distinguished more easily. Happy to create a PR if you could guide me in some direction where I'd start this.

(I am not entirely sure if it's vscode or core elixir ls, bur to me it seems that this would fall into the vscode plugin.)

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 26 [erts-14.1] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [jit]

Elixir 1.15.6 (compiled with Erlang/OTP 26)

  • VSCode ElixirLS version: 0.17.1
  • Operating System Version: darwin 23.0.0

benvp avatar Oct 16 '23 07:10 benvp

This is how VSCode renders the detail property on LSP CompletionItem. The relevant code is in https://github.com/elixir-lsp/elixir-ls/blob/2cd117272135f400822200c2c6856e43f6c0017e/apps/language_server/lib/language_server/providers/completion.ex#L537. We could workaround it by prepending spaces if the client is VSCode or report an issue to VSCode repo

lukaszsamson avatar Oct 16 '23 08:10 lukaszsamson

I was assuming something like this. What's your stance on that? Would you mind rendering spaces in the VSCode case? Even it feels kinda hacky I'd think it would improve the readability a lot.

benvp avatar Oct 16 '23 08:10 benvp

What's your stance on that? Would you mind rendering spaces in the VSCode case?

I'm OK with doing workarounds for major client. So far we don't check it anywhere but clientInfo from InitializeParams can be used for client checking. I wonder if VSCodium has different info than VSCode there. But let's raise a ticket upstream anyway

lukaszsamson avatar Oct 16 '23 08:10 lukaszsamson