From 92b1ecebb0cabb321c95f486f3ede89045be9035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Gro=C3=9F?= Date: Thu, 29 Aug 2024 17:06:45 +0200 Subject: [PATCH] Support native MacOS Dash docsets Without a Mac it is hard to find out where the docsets live, since it's not documented anywhere officially. My magic crystalball [0] says that this is likely the correct path, but we will probably never know if this actually works. [0] https://github.com/dash-docs-el/helm-dash/issues/162#issuecomment-328048310 --- autoload/clue/dash.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/clue/dash.vim b/autoload/clue/dash.vim index 4c16ceb..322d99d 100644 --- a/autoload/clue/dash.vim +++ b/autoload/clue/dash.vim @@ -4,6 +4,9 @@ let s:current_query = "" func clue#dash#init() for p in clue#dash#docset_paths() + if !isdirectory(p) + continue + endif for d in readdir(p) let dpath = p . '/' . d let meta = dpath . '/meta.json' @@ -27,7 +30,7 @@ func clue#dash#init() endfunc func clue#dash#docset_paths() - return [$HOME . '/.local/share/Zeal/Zeal/docsets'] + return [$HOME . '/.local/share/Zeal/Zeal/docsets', $HOME . '/Library/Application Support/Dash/DocSets'] endfunc func clue#dash#sanitize_sqlite_path(s)