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

Non-UTF8 characters appear to break the semantic tokens feature #614

Closed
pagedMov opened this issue Nov 7, 2024 · 1 comment
Closed

Non-UTF8 characters appear to break the semantic tokens feature #614

pagedMov opened this issue Nov 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pagedMov
Copy link

pagedMov commented Nov 7, 2024

Describe the bug
Semantic tokens appear to be broken by files that contain non UTF-8 characters.

Logs (Required)

Error executing vim.schedule lua callback: ....10.2/share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:304: ....10.2/share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:149
: index out of range
stack traceback:
[builtin#36]: at 0x7f16a7547e00
....10.2/share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:304: in function 'handler'
...wrapped-0.10.2/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

Configuration

I use nixvim to configure nixd. These are my settings:

nixd = {
  enable = true;
  settings = {
    nixd = {
      nixpkgs.expr = "import <nixpkgs> { }";
      formatting.command = "nixfmt";
    };
    options = {
      nixos.expr = "(builtins.getFlake \"github:pagedMov/nixos-config\").nixosConfigurations.xenon.options";
      home.expr = "(builtins.getFlake \"github:pagedMov/nixos-config\").homeConfigurations.xenonHome.options";
    };
  };
};

To Reproduce
Steps to reproduce the behavior:

  1. Open a file containing non UTF-8 characters (Here is the file I've been using to test fixes/workarounds, it triggers this bug every time)
  2. Attempt to do anything that makes calls to the LSP.
@pagedMov pagedMov added the bug Something isn't working label Nov 7, 2024
@inclyc
Copy link
Member

inclyc commented Nov 11, 2024

Duplicate of #604.

@inclyc inclyc closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants