Skip to content

creativenull/feline-provider-ale.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feline ALE Provider

Custom provider for displaying ALE status/diagnostics for feline.nvim.

screenshot

Requirements

Installation

Packer.nvim

use 'dense-analysis/ale'
use {
  'famiu/feline.nvim',
  requires = { 'creativenull/feline-provider-ale.nvim' },
}

Lazy.nvim

'dense-analysis/ale',
{
  'famiu/feline.nvim',
  dependencies = { 'creativenull/feline-provider-ale.nvim' },
},

vim-plug

Plug 'dense-analysis/ale'
Plug 'famiu/feline.nvim'
Plug 'creativenull/feline-provider-ale.nvim'

Documentation

Docs can also be found over at :help feline-provider-ale.

Check out the example file over in examples/feline.lua

Providers

There are four custom providers that come with this plugin for ALE.

ALE Status Provider

Shows the current status.

local ale = require('feline.custom_providers.ale')

require('feline').setup({
    -- ...
    custom_providers = {
        ale_status = ale.status_provider,
    },
})

ALE Diagnostics

Separate providers for different diagnostics.

local ale = require('feline.custom_providers.ale')

require('feline').setup({
    -- ...
    custom_providers = {
        ale_error = ale.diagnostic_error_provider,
        ale_warning = ale.diagnostic_warning_provider,
        ale_info = ale.diagnostic_info_provider,
    },
})

Utilities

There are also some helper functions that you can use provided in the same module.

  • is_registered() - returns a boolean when an ALE linter or fixer has been setup
  • has_registered_linters() - returns a boolean when an ALE linter has been setup
  • has_registered_fixers() - returns a boolean when an ALE fixers has been setup
  • get_diagnostic_count(attr) - returns a count of diagnostic given an scope (attr), which can be error, warning or info

License

Covered by the same GPL license provided in feline.

About

ALE component providers for feline.nvim

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages