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

Bug: A symlink that points to a file with with an unrecognizable file extension should fallback to the symlinks file extension #7458

Closed
budde25 opened this issue Jun 26, 2023 · 1 comment · Fixed by #9330
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@budde25
Copy link
Contributor

budde25 commented Jun 26, 2023

Summary

The file extension of a symlink should be used as a file type hint, when the one on the destination file does not help.
This is in regards to syntax highlighting.

Reproduction Steps

Minimum reproducible example:
I have two files, one real one name test.c.1 with my c source code
and a symlink to that previous file named test.c.

When I open test.c.1 there is no syntax highlighting which is expected since there is not hint for the editor, however when I open test.c (symlink to test.c.1), I would expect it to open with c syntax highlighting (at least as a fallback).

This expected behavior is the current behavior of other popular editors (Ex: neovim)

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux + MacOs

Terminal Emulator

Iterm2 Build 3.4.19

Helix Version

helix 23.05 (7f5940b)

@budde25 budde25 added the C-bug Category: This is a bug label Jun 26, 2023
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Jun 30, 2023
@woojiq
Copy link
Contributor

woojiq commented Jul 16, 2023

This would be a nice feature because I have often run into its lack, especially on NixOs. When you have a ~/.config/helix/config.toml file which is a symlink to /nix/store/blablabla-helix-config (plain text), so I don't have syntax highlighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
4 participants