BufferFilter

Trait BufferFilter 

Source
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§

Source

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).

Source

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§

Source

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.

Implementors§