Skip to content

"files in selection" command creates a blank buffer. #5806

Description

@Jeordanis

Summary

"files in selection" command creates a blank buffer instead of opening the file under cursor.
What actually takes me to the file under cursor is go to definition ('gd').

helix --health cpp:
Configured language server: clangd
Binary for language server: D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin\clangd.exe
Configured debug adapter: lldb-vscode
Binary for debug adapter: D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin\lldb-vscode.exe
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓

Reproduction Steps

I tried this:

  1. hx
  2. Open a c++ project
  3. Out the cursor over a included file
  4. Hit gf

I expected this to happen:
Open the file under the cursor.
Instead, this happened:
Open a new buffer with the name of the file under the cursor.

Helix log

~/.cache/helix/helix.log
2023-02-03T11:20:56.150 helix_lsp::transport [ERROR] err <- "I[11:20:56.149] clangd version 13.0.1\r\n"Repo
2023-02-03T11:20:56.151 helix_lsp::transport [ERROR] err <- "I[11:20:56.150] Features: windows\r\n"
2023-02-03T11:20:56.151 helix_lsp::transport [ERROR] err <- "I[11:20:56.150] PID: 20044\r\n"
2023-02-03T11:20:56.151 helix_lsp::transport [ERROR] err <- "I[11:20:56.150] Working directory: D:\\Repo\\MyProject\r\n"
2023-02-03T11:20:56.151 helix_lsp::transport [ERROR] err <- "I[11:20:56.150] argv[0]: D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin\\clangd.exe\r\n"
2023-02-03T11:20:56.156 helix_lsp::transport [ERROR] err <- "I[11:20:56.155] Starting LSP over stdin/stdout\r\n"
2023-02-03T11:20:56.156 helix_lsp::transport [ERROR] err <- "I[11:20:56.156] <-- initialize(0)\r\n"
2023-02-03T11:20:56.158 helix_lsp::transport [ERROR] err <- "I[11:20:56.158] --> reply:initialize(0) 2 ms\r\n"
2023-02-03T11:20:56.159 helix_lsp::transport [ERROR] err <- "I[11:20:56.159] <-- initialized\r\n"
2023-02-03T11:20:56.179 helix_lsp::transport [ERROR] err <- "I[11:20:56.179] <-- textDocument/didOpen\r\n"
2023-02-03T11:20:56.181 helix_lsp::transport [ERROR] err <- "I[11:20:56.181] Loaded compilation database from D:\\Repo\\build/compile_commands.json\r\n"
2023-02-03T11:20:56.182 helix_lsp::transport [ERROR] err <- "I[11:20:56.182] ASTWorker building file D:\\Repo\\MyProject\\GWEngine\\SharedLibrary.h version 0 with command inferred from D:\\Repo\\MyProject\\GWEngine\\systems\\ScriptSystem.cpp\r\n"
2023-02-03T11:20:56.182 helix_lsp::transport [ERROR] err <- "[D:Work/Projects/build]\r\n"
2023-02-03T11:20:56.182 helix_lsp::transport [ERROR] err <- "\"D:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\VC\\\\Tools\\\\Llvm\\\\x64\\\\bin\\\\clang.exe\" \"-DCMAKE_INTDIR=\\\"Debug\\\"\" -ID:Work/Projects -isystem C:/Users/user/.conan/data/fmt/9.1.0/_/_/package/dce89c8fb7ba6bfefaf8cf2fab0a94df03661d07/include -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -fcolor-diagnostics -Wall -Wextra -Wextra-semi -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -c -x c++-header -std=c++20 \"-resource-dir=D:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\VC\\\\Tools\\\\Llvm\\\\x64\\\\lib\\\\clang\\\\13.0.1\" -- \"D:\\\\Work\\\\Development\\\\Repos\\\\DoubleNight\\\\MyProject\\\\GWEngine\\\\SharedLibrary.h\"\r\n"
2023-02-03T11:20:56.184 helix_lsp::transport [ERROR] err <- "I[11:20:56.184] --> window/workDoneProgress/create(0)\r\n"
2023-02-03T11:20:56.184 helix_lsp::transport [ERROR] err <- "I[11:20:56.184] Enqueueing 6 commands for indexing\r\n"
2023-02-03T11:20:56.184 helix_lsp::transport [ERROR] err <- "I[11:20:56.184] <-- reply(0)\r\n"
2023-02-03T11:20:56.184 helix_lsp::transport [ERROR] err <- "I[11:20:56.184] --> $/progress\r\n"
2023-02-03T11:20:56.184 helix_lsp::transport [ERROR] err <- "I[11:20:56.184] --> $/progress\r\n"
2023-02-03T11:20:57.028 helix_lsp::transport [ERROR] err <- "I[11:20:57.028] --> $/progress\r\n"
2023-02-03T11:20:57.028 helix_lsp::transport [ERROR] err <- "I[11:20:57.028] --> $/progress\r\n"
2023-02-03T11:21:00.268 helix_lsp::transport [ERROR] err <- "I[11:21:00.268] --> textDocument/publishDiagnostics\r\n"
2023-02-03T11:21:09.761 helix_lsp::transport [ERROR] err <- "I[11:21:09.761] <-- textDocument/definition(1)\r\n"
2023-02-03T11:21:09.762 helix_lsp::transport [ERROR] err <- "I[11:21:09.762] --> reply:textDocument/definition(1) 1 ms\r\n"
2023-02-03T11:21:09.765 helix_lsp::transport [ERROR] err <- "I[11:21:09.765] <-- textDocument/didOpen\r\n"
2023-02-03T11:21:09.766 helix_lsp::transport [ERROR] err <- "I[11:21:09.766] ASTWorker building file D:\\Repo\\MyProject\\GWEngine\\LibraryPlatform.h version 0 with command inferred from D:\\Repo\\MyProject\\GWEngine\\systems\\ScriptSystem.cpp\r\n"
2023-02-03T11:21:09.766 helix_lsp::transport [ERROR] err <- "[D:Work/Projects/build]\r\n"
2023-02-03T11:21:09.767 helix_lsp::transport [ERROR] err <- "\"D:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\VC\\\\Tools\\\\Llvm\\\\x64\\\\bin\\\\clang.exe\" \"-DCMAKE_INTDIR=\\\"Debug\\\"\" -ID:Work/Projects -isystem C:/Users/user/.conan/data/fmt/9.1.0/_/_/package/dce89c8fb7ba6bfefaf8cf2fab0a94df03661d07/include -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -fcolor-diagnostics -Wall -Wextra -Wextra-semi -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -c -x c++-header -std=c++20 \"-resource-dir=D:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\VC\\\\Tools\\\\Llvm\\\\x64\\\\lib\\\\clang\\\\13.0.1\" -- \"D:\\\\Work\\\\Development\\\\Repos\\\\DoubleNight\\\\MyProject\\\\GWEngine\\\\LibraryPlatform.h\"\r\n"
2023-02-03T11:21:13.590 helix_lsp::transport [ERROR] err <- "I[11:21:13.589] <-- shutdown(2)\r\n"
2023-02-03T11:21:13.590 helix_lsp::transport [ERROR] err <- "I[11:21:13.589] --> reply:shutdown(2) 0 ms\r\n"
2023-02-03T11:21:13.590 helix_lsp::transport [ERROR] err <- "I[11:21:13.590] <-- exit\r\n"
2023-02-03T11:21:13.590 helix_lsp::transport [ERROR] err <- "I[11:21:13.590] LSP finished, exiting with status 0\r\n"

Platform

Windows

Terminal Emulator

Windows Powershell

Helix Version

22.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions