Skip to content
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

Code completion does not work for non-ASCII module/function names #221

Closed
xhh opened this issue Feb 2, 2023 · 0 comments
Closed

Code completion does not work for non-ASCII module/function names #221

xhh opened this issue Feb 2, 2023 · 0 comments

Comments

@xhh
Copy link

xhh commented Feb 2, 2023

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [asyn
c-threads:1] [jit:ns]

Elixir 1.14.3 (compiled with Erlang/OTP 23)
  • Elixir Language Server version:
[Info  - 11:34:45] Started ElixirLS v0.13.0
  • Operating system: Windows 10
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • Editor Plugin/LSP Client name and version: ElixirLS: Elixir support and debugger - v0.13.0

Current behavior

When a module/function name contains Chinese characters, e.g. :你好, code completion does not work well like ASCII names.

Reproduction steps:

  1. Create a mix project: mix new hello
  2. Open the created project in VSCode
  3. Create a new file in the lib directory: 你好.ex, with content:
defmodule :你好 do
  def 运行 do
    IO.puts("你好")
  end
end
  1. Open lib/hello.ex, add a new line below def hello do, then enter :你好., then press ctrl+space to trigger code completion.
  2. It displays 无建议。 (No suggestions.)

Expected behavior

It should display a function list with 运行() included.

Screenshots

2

BTW the same code works in Livebook :

1

Other cases

If changing the module name to ASCII, e.g. :hello or MyHello, then :hello. will display 运行() in the completion list.
But :hello.运 will again display No suggestions.

@xhh xhh changed the title Code completion does not work for non-ASCII module/funciton names Code completion does not work for non-ASCII module/function names Feb 2, 2023
@lukaszsamson lukaszsamson transferred this issue from elixir-lsp/elixir-ls Jun 3, 2023
lukaszsamson added a commit to elixir-lsp/elixir-ls that referenced this issue Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant