Open sadtab opened 4 months ago
I would also be really interested in this. It would be amazing to be able to have an obsidian link in comments so i can directly link back to my vault. I could basically have documentation links where needed.
Haven't had much success hacking the library.
I found this in the source code, but don't really know the architecure
Client.find_files_async = function(self, term, callback, opts)
opts = opts or {}
local matches = {}
local tx, rx = channel.oneshot()
local on_find_match = function(path_match)
matches[#matches + 1] = Path.new(path_match)
end
local on_exit = function(_)
tx()
end
local find_opts = self:_prepare_search_opts(opts.search)
find_opts:add_exclude "*.md"
find_opts.include_non_markdown = true
search.find_async(self.dir, term, find_opts, on_find_match, on_exit)
async.run(function()
rx()
return matches
end, callback)
end
@sadtab
This seems to only be realated to the ObsidianSearch feature. The "include_non_markdown" is used to build flags for rip-grep within the "build_find_cmd" function.
I assume a similar flag should be implemented within "workspaces" override configuration.
🚀 The feature, motivation and pitch
I like to keep my leet code exercises as obsidian notes. We can markdown style comment blocks in a cpp file, the only issue is that Obsidian does not recognize a cpp extension as a note file, can we have the option to enable some custom file extensions (or patterns that match the file name) to be treated as a plain markdown note?
Alternatives
No response
Additional context
No response