Syntax Highlighting color shifts for variable.parameter
based on code in viewport
#10057
Labels
variable.parameter
based on code in viewport
#10057
Summary
The syntax highlighting for
variable.parameter
changes based on whether the function declaration (specifically the parameter) is visible in the viewport or not.My guess is that the editor doesn't look at variables declared outside the viewport as an optimization, however the UX is somewhat jarring.
.toml
Reproduction Steps
I tried this:
I've been able to reproduce this on several repos (some rust, and some typescript).
Observe that the color of the variable
tx_callback
is different depending on whether the function declaration is in the viewport or not.Repo that can be used to reproduce: https://github.com/tauseefk/streamformers
git clone [email protected]:tauseefk/streamformers.git
cd streamformers
hx src/main.rs
infer
line75
I expected this to happen:
tx_callback
to be colored#FFF4BA
Instead, this happened:
tx_callback
to be colored#7AA697
Helix log
~/.cache/helix/helix.log
2024-03-30T14:30:47.278 helix_view::editor [ERROR] Failed to initialize the language servers for
source.toml
-taplo
{ cannot find binary path }2024-03-30T14:41:25.192 helix_view::editor [ERROR] editor error: No configured language server supports range formatting
2024-03-30T14:55:13.214 helix_view::editor [ERROR] Failed to initialize the language servers for
source.toml
-taplo
{ cannot find binary path }2024-03-30T15:03:23.671 helix_view::editor [ERROR] Failed to initialize the language servers for
source.toml
-taplo
{ cannot find binary path }2024-03-30T15:18:55.920 helix_view::editor [ERROR] Failed to initialize the language servers for
source.css
-vscode-css-language-server
{ cannot find binary path }2024-03-30T15:19:08.618 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-03-30T15:19:08.731 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration
2024-03-30T15:19:08.731 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting
2024-03-30T15:19:08.731 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting
2024-03-30T15:19:08.731 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename
2024-03-30T15:19:08.731 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting
2024-03-30T15:19:08.731 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-03-30T15:19:08.731 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-03-30T15:19:08.731 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-03-30T15:23:41.876 helix_view::editor [ERROR] Failed to initialize the language servers for
source.toml
-taplo
{ cannot find binary path }Platform
MacOS Sonoma (14.2.1 (23C71))
Terminal Emulator
Alacritty version 0.13.1
Installation Method
brew
Helix Version
helix 23.10 (f6021dd)
The text was updated successfully, but these errors were encountered: