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

Syntax highlighting / Set filetype for previewed file in bookmarks float window #18

Closed
ttytm opened this issue Apr 10, 2023 · 2 comments

Comments

@ttytm
Copy link
Contributor

ttytm commented Apr 10, 2023

Currently, no filetype is set for a previewed filed. Setting the ft would enable syntax highlighting.

I didn't made any implementation test yet, so my theoretical assumptionion on how this could be solved: It might be possible to directly retrieve the filetype when opening the preview. If not, it might be worth the tradeoff to additionally save ft = vim.bo.ft on bookmark creation.

Screenshot, manually setting the ft in a previewed file after opening the window.

Screenshot_20230410_114726

Might be related to #13 (edit: didn't read through the issue properly. No relation afaik.)

@crusj
Copy link
Owner

crusj commented Apr 14, 2023

Currently, no filetype is set for a previewed filed. Setting the ft would enable syntax highlighting.

I didn't made any implementation test yet, so my theoretical assumptionion on how this could be solved: It might be possible to directly retrieve the filetype when opening the preview. If not, it might be worth the tradeoff to additionally save ft = vim.bo.ft on bookmark creation.

Screenshot, manually setting the ft in a previewed file after opening the window.

Screenshot_20230410_114726

Might be related to #13 (edit: didn't read through the issue properly. No relation afaik.)

In the setup options, preview_ext_enable is used to configure whether to add a filetype suffix to the current buffer.

@ttytm
Copy link
Contributor Author

ttytm commented Apr 14, 2023

Awesome! Sorry for not checking better beforehand.
Let me close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants