pub trait BufferFilter {
// Required methods
fn blacklisted_buf_paths(&self) -> &[&str];
fn blacklisted_buf_types(&self) -> &[&str];
// Provided method
fn skip_diagnostic(&self, buffer_with_path: &BufferWithPath) -> Result<bool> { ... }
}Expand description
Defines filtering logic for buffers based on path and type criteria.
Implementations specify which buffer paths and types should be excluded from diagnostic processing to reduce noise from build artifacts and non-source files.
Required Methods§
Sourcefn blacklisted_buf_paths(&self) -> &[&str]
fn blacklisted_buf_paths(&self) -> &[&str]
Buffer path substrings for which diagnostics are skipped entirely.
Buffers with paths containing these substrings are excluded from diagnostic processing to avoid noise from build artifacts and dependencies (e.g. Cargo registry).
Sourcefn blacklisted_buf_types(&self) -> &[&str]
fn blacklisted_buf_types(&self) -> &[&str]
Buffer types for which diagnostics are skipped entirely.
Buffers with these buftype values are excluded from diagnostic processing
to avoid noise from non-source files (e.g. fzf-lua results, grug-far search buffers).
Provided Methods§
Sourcefn skip_diagnostic(&self, buffer_with_path: &BufferWithPath) -> Result<bool>
fn skip_diagnostic(&self, buffer_with_path: &BufferWithPath) -> Result<bool>
Checks if diagnostics should be skipped for the given buffer.
§Errors
- Propagates [
nvim_oxi::api::Error] from buffer type retrieval.