Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help: how to disable all Obsidian callouts #380

Closed
chrisgrieser opened this issue Mar 25, 2025 · 4 comments
Closed

help: how to disable all Obsidian callouts #380

chrisgrieser opened this issue Mar 25, 2025 · 4 comments
Labels
question Further information is requested

Comments

@chrisgrieser
Copy link
Contributor

Neovim version (nvim -v)

0.10.4

Neovim distribution

n/a

Description

I only really need the GitHub callouts; having the Obsidian callouts suggested when typing > is merely clutter for me. is there a way to disable the Obsidian callouts?

@chrisgrieser chrisgrieser added the question Further information is requested label Mar 25, 2025
@MeanderingProgrammer
Copy link
Owner

There is not currently a way to disable callouts, more just alter their behavior.

Is what you're looking for specific to completions? Or do you want to disable them entirely, including rendering?

@chrisgrieser
Copy link
Contributor Author

Is what you're looking for specific to completions?

Yep. Sorry, forgot to mention that, it's mostly about the added clutter than typing > for callout suggestions.

MeanderingProgrammer added a commit that referenced this issue Mar 25, 2025
## Details

Request: #380

Adds a `filter` option under `completions` which allow the user to
define filters for `callout` and `checkbox`. These filters will be
applied before producing the completion list.

The main use case is likely for callouts so to make filtering easier
we've added a `category` for all the builtin callouts. These consist of
2 values `github` & `obsidian`.

Users are welcome to add categories to their own callouts, but it is
entirely optional and not used at all by this plugin directly, they are
only added to improve filtering.

For example to remove all the `obsidian` callouts, meaning keep the
`github` callouts + any user defined ones, use:

```lua
require('render-markdown').setup({
    completions = {
	filter = {
	    callout = function(value)
		return value.category ~= 'obsidian'
	    end,
	}
    },
})
```
@MeanderingProgrammer
Copy link
Owner

Implemented here: 84d413b

Added a category field to all the builtin callouts to make distinguishing them easier when filtering and a way to specify filter functions for callout & checkbox.

To remove all the obsidian callouts use:

require('render-markdown').setup({
    completions = {
	filter = {
	    callout = function(value)
		return value.category ~= 'obsidian'
	    end,
	},
    },
})

@chrisgrieser
Copy link
Contributor Author

fantastic, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants