feat: ✨ add follow_link and Marksman diagnostics filter#7
Merged
Conversation
The [[notebook:name]] syntax is defined by this plugin, but resolving it (gd jump) and suppressing Marksman's non-existent-document warnings lived in user dotfiles, which had to track the link syntax. Move both into the plugin: follow_link() returns a boolean so users choose their own fallback, keeping the plugin free of LSP/distro assumptions, and the diagnostics filter wraps only the marksman client handler instead of the global one. Closes #6 Co-Authored-By: Claude Fable 5 <[email protected]>
mozumasu
added a commit
to mozumasu/dotfiles
that referenced
this pull request
Jul 16, 2026
The [[notebook:name]] parsing regex and the Marksman diagnostics filter duplicated knowledge owned by nb.nvim (mozumasu/nb.nvim#7). Keep only the gd binding here because overriding LazyVim's LspAttach gd is a distro-specific timing concern. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
[[notebook:name]]リンクの追跡 (gd ジャンプ) と Marksman の「Link to non-existent document」警告の除外を、dotfiles からプラグイン本体に移す。Closes #6
変更内容
lua/nb/link.luaを追加link_at_cursor()— カーソル下のnotebook:nameリンク文字列を返す(コロンなしの通常 wiki リンクは対象外)follow_link()— リンク先ノートを開く。boolean を返し、フォールバック(LSP definition 等)は呼び出し側で選ぶ設計。LazyVim / LSP に非依存enable_marksman_filter()— 診断フィルタ。グローバルハンドラではなく marksman client のハンドラのみをラップし、他の LSP に影響しないmarksman_filterオプションを追加(デフォルト有効):h nb-links) に API と gd キーマップ例を追記動作確認
stylua --check lua/パスlink_at_cursor()がリンク文字列を返すnil/follow_link()がfalse[[home:20260716202334.md]]上でfollow_link()→trueで該当ファイルが開いた🤖 Generated with Claude Code