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

HTML Element Highlighting doesn't work in PHP files #9766

Closed
mkellyxp opened this issue Feb 29, 2024 · 2 comments
Closed

HTML Element Highlighting doesn't work in PHP files #9766

mkellyxp opened this issue Feb 29, 2024 · 2 comments
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@mkellyxp
Copy link

Summary

In HTML files, you can press ALT + UP to highlight the current HTML element, and ALT + UP again to go up and highlight the parent element.

This only seems to work on files that have the .html extension. If you rename the same file to .php, the highlighting behavior fails to work.

I have my languages.toml file set up like this, and have the LSPs installed.

[[language]]
name = "php"
language-servers = [ "intelephense", "tailwindcss-ls", "vscode-html-language-server"]
auto-format = true

[[language]]
name = "html"
language-servers = [ "tailwindcss-ls", "vscode-html-language-server" ]

And my hx --health shows this

[mkelly@thelio:/var/www/vip_member_vault]$ hx --health html
Configured language servers:
  ✓ tailwindcss-language-server: /run/current-system/sw/bin/tailwindcss-language-server
  ✓ vscode-html-language-server: /run/current-system/sw/bin/vscode-html-language-server
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✘

[mkelly@thelio:/var/www/vip_member_vault]$ hx --health php
Configured language servers:
  ✓ intelephense: /run/current-system/sw/bin/intelephense
  ✓ tailwindcss-language-server: /run/current-system/sw/bin/tailwindcss-language-server
  ✓ vscode-html-language-server: /run/current-system/sw/bin/vscode-html-language-server
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓

Reproduction Steps

Set up your languages.toml file for HTML and PHP

[[language]]
name = "php"
language-servers = [ "intelephense", "tailwindcss-ls", "vscode-html-language-server"]
auto-format = true

[[language]]
name = "html"
language-servers = [ "tailwindcss-ls", "vscode-html-language-server" ]

I tried this:

  1. open a basic HTML file and confirm that ALT + Up works for highlighting elements.
  2. close the file and rename it to .php
  3. confirm that ALT + Up no longer highlights HTML elements

Helix log

~/.cache/helix/helix.log
2024-02-29T08:48:49.865 helix_lsp::transport [ERROR] nil err: <- StreamClosed
2024-02-29T09:05:26.447 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T09:05:51.868 helix_view::editor [ERROR] Failed to initialize the language servers for `source.toml` - `taplo` { cannot find binary path }
2024-02-29T09:07:50.350 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T09:07:50.676 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T09:07:51.003 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T09:32:40.134 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(22)), original request likely timed out
2024-02-29T09:32:40.135 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(99)), original request likely timed out
2024-02-29T10:05:52.854 helix_view::editor [ERROR] editor error: can't find file to reload from "application/views/admin/activity/early_access.php"
2024-02-29T10:13:06.593 helix_view::editor [ERROR] Failed to initialize the language servers for `source.toml` - `taplo` { cannot find binary path }
2024-02-29T10:13:58.144 helix_view::editor [ERROR] Failed to initialize the language servers for `source.toml` - `taplo` { cannot find binary path }
2024-02-29T10:14:45.173 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-02-29T10:14:45.818 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:14:46.086 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:14:46.537 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:18:38.094 helix_view::editor [ERROR] Failed to initialize the language servers for `source.toml` - `taplo` { cannot find binary path }
2024-02-29T10:19:37.057 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-02-29T10:19:38.396 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:21:22.439 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-02-29T10:21:24.454 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:25:58.119 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-02-29T10:25:58.364 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:25:59.701 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:26:00.074 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:29:35.016 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-02-29T10:29:35.681 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:29:35.902 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:29:36.376 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-02-29T10:55:58.821 helix_view::editor [ERROR] Failed to initialize the language servers for `source.toml` - `taplo` { cannot find binary path }

Platform

Linux (NixOS)

Terminal Emulator

Gnome Terminal

Installation Method

nixpkgs (23.11)

Helix Version

helix 23.10 (f6021dd)

@mkellyxp mkellyxp added the C-bug Category: This is a bug label Feb 29, 2024
@the-mikedavis
Copy link
Member

Duplicate of #2311. Also see #5176

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
@the-mikedavis the-mikedavis added the R-duplicate Duplicated issue: please refer to the linked issue label Feb 29, 2024
@mkellyxp
Copy link
Author

Ahh, thanks @the-mikedavis. I had done a search in the issues to see this already existed, but didn't find it. Glad to know it's already logged elsewhere.. Keep up the good work, love this editor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

2 participants