From 2e831e569296acc3f90f83a1b8c5dd79c0631175 Mon Sep 17 00:00:00 2001 From: moxie Date: Sun, 15 Mar 2026 23:56:23 +0200 Subject: chore: update readme/doc --- doc/muwiki.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/muwiki.txt b/doc/muwiki.txt index e4d06de..c22acb1 100644 --- a/doc/muwiki.txt +++ b/doc/muwiki.txt @@ -73,6 +73,14 @@ dirs List of wiki directories. index_file Name of the index file for each wiki. Default: 'index.md' + *muwiki-opt-text_extensions* +text_extensions List of file extensions that open directly in Neovim + for file:// links. Files with matching extensions + bypass xdg-open and open in a Neovim buffer. + Extensions can be specified with or without leading + dot (e.g., 'txt' or '.txt'). + Default: {} + Example Configuration~ > local muwiki = require('muwiki') @@ -83,6 +91,9 @@ Example Configuration~ { name = 'work', path = '~/work/wiki' }, }, index_file = 'index.md', + -- Open these file types directly in Neovim (bypass xdg-open) + -- Note: Even binary files like PNG can be opened in Neovim + text_extensions = { 'txt', 'md', 'png' }, }) < @@ -120,8 +131,9 @@ muwiki.setup({opts}) *muwiki.setup()* muwiki.open_link() *muwiki.open_link()* Open the link under cursor. - Wiki links: open in Neovim buffer - - Web links: open with xdg-open - - File links: open with xdg-open + - Web links (http/https): open with xdg-open + - File links (file://): open with xdg-open, unless the file extension + matches |muwiki-opt-text_extensions|, in which case opens in Neovim muwiki.next_link() *muwiki.next_link()* Jump to the next markdown link in the buffer. -- cgit v1.2.3