Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feature: configurable icon for local file links

未关闭
#712 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
57/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
lua, neovim

调研方向

Start by reading the plugin’s link rendering and link.custom configuration code to see how it classifies link targets and applies icon overrides. Trace how relative, absolute, and file:// paths are distinguished from fragment-only links and other URI schemes. Done means local file links can use an optional configured icon, custom overrides retain precedence, and existing behavior remains when no file icon is set.

由索引模型根据 Issue 内容生成。

描述

Is your feature request related to a problem? Please describe.

Links to local files currently use the same default icon as web links. When reading Markdown notes with many links to other notes, a distinct file icon would make it easier to tell whether a link opens another local document or a website.

For example:

[Related note](../notes/topic.md)
[Local document](./document.pdf)
[Website](https://example.com)

I'd like the first two links to use a Nerd Font file icon such as 󰈙 , while the website keeps the existing hyperlink icon.

Describe the solution you'd like

Would you consider supporting a separate icon for local file links, perhaps through an optional link.file setting?

Ideally, this would cover relative paths, absolute paths, and file:// URLs, including paths without a file extension. Fragment-only links such as #heading and links with other URI schemes should retain their existing behavior. Existing link.custom overrides should still take precedence.

Keeping the current appearance unless a file icon is explicitly configured would be fine. This request is about being able to distinguish the link targets, rather than requiring a particular default glyph.

Describe alternatives you've considered

link.custom can match known path prefixes or file extensions. However, covering local paths in general seems less straightforward: paths may have no extension, and web URLs may also end in .md or .pdf.

If there is already a clean way to express this using link.custom, a documented configuration example would also solve my use case.

Additional information

I'm interested in contributing a PR if this fits the plugin's scope. I'd appreciate your preference on whether this belongs in a dedicated setting or the existing custom-link configuration.

主要语言
Lua
星标
5.2k
派生
150
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MeanderingProgrammer/render-markdown.nvim 的其他 Issue

查看 MeanderingProgrammer/render-markdown.nvim 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。