• Stars
    star
    246
  • Rank 158,878 (Top 4 %)
  • Language
    Vim Script
  • License
    ISC License
  • Created over 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ALE indicator for the lightline vim plugin

lightline-ale

This plugin provides ALE indicator for the lightline vim plugin.

screenshot

Table Of Contents

Installation

Install using a plugin manager of your choice, for example:

call dein#add('dense-analysis/ale')       " Dependency: linter
call dein#add('itchyny/lightline.vim')    " Dependency: status line
call dein#add('maximbaz/lightline-ale')

Integration

  1. Register the components:
let g:lightline = {}

let g:lightline.component_expand = {
      \  'linter_checking': 'lightline#ale#checking',
      \  'linter_infos': 'lightline#ale#infos',
      \  'linter_warnings': 'lightline#ale#warnings',
      \  'linter_errors': 'lightline#ale#errors',
      \  'linter_ok': 'lightline#ale#ok',
      \ }
  1. Set color to the components:
let g:lightline.component_type = {
      \     'linter_checking': 'right',
      \     'linter_infos': 'right',
      \     'linter_warnings': 'warning',
      \     'linter_errors': 'error',
      \     'linter_ok': 'right',
      \ }
  1. Add the components to the lightline, for example to the right side:
let g:lightline.active = { 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok' ]] }

3.1. Lineinfo, fileformat, etc. have to be added additionaly. Final example:

let g:lightline.active = {
            \ 'right': [ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok' ],
            \            [ 'lineinfo' ],
	    \            [ 'percent' ],
	    \            [ 'fileformat', 'fileencoding', 'filetype'] ] }

Configuration

g:lightline#ale#indicator_checking

The indicator to use when ALE is in progress. Default is Linting....

g:lightline#ale#indicator_infos

The indicator to use when there are infos. Default is I:.

g:lightline#ale#indicator_warnings

The indicator to use when there are warnings. Default is W:.

g:lightline#ale#indicator_errors

The indicator to use when there are errors. Default is E:.

g:lightline#ale#indicator_ok

The indicator to use when there are no warnings or errors. Default is OK.

Using icons as indicators

If you would like to replace the default indicators with symbols like on the screenshot, then you'll need to ensure you have some "iconic fonts" installed, such as Font Awesome. A common alternative is to replace your primary font with one of the Patched Nerd Fonts, which saves you from having to install multiple fonts.

The following icons from the Font Awesome font are used in the screenshot:

  • Checking: f110
  • Infos: f129
  • Warnings: f071
  • Errors: f05e
  • OK: f00c (although I prefer to disable this component)

To specify icons in the configuration, use their unicode codes as "\uXXXX" (make sure to wrap them in double quotes). Alternatively copy the icons from a font website, or type <C-v>u<4-digit-unicode> or <C-v>U<8-digit-unicode> to insert the literal characters.

See the code points here:

Here's the configuration snippet used in the screenshot:

let g:lightline#ale#indicator_checking = "\uf110"
let g:lightline#ale#indicator_infos = "\uf129"
let g:lightline#ale#indicator_warnings = "\uf071"
let g:lightline#ale#indicator_errors = "\uf05e"
let g:lightline#ale#indicator_ok = "\uf00c"

License

Released under the ISC License

More Repositories

1

dotfiles

Configuration for Arch Linux, Hyprland, kitty, kakoune, zsh and more + scripted installation guide
Shell
817
star
2

wluma

Automatic brightness adjustment based on screen contents and ALS
Rust
555
star
3

yubikey-touch-detector

A tool to detect when your YubiKey is waiting for a touch (to send notification or display a visual indicator on the screen)
Go
384
star
4

rebuild-detector

Detects which Arch Linux packages need to be rebuilt
Shell
200
star
5

arch-secure-boot

UEFI Secure Boot for Arch Linux + btrfs snapshot recovery
Shell
111
star
6

browser-fingerprint-protector

Prevents browser fingerprinting by spoofing your plugins, languages and user agent
JavaScript
71
star
7

docker-arch-build-aur

Build AUR packages (useful for building *-bin packages via Travis / Shippable)
Shell
28
star
8

snap-pac-grub

Pacman hook to update GRUB entries for grub-btrfs after snap-pac made snapshots
Makefile
20
star
9

wl-clipboard-manager

Clipboard manager for Wayland
Shell
16
star
10

cerebro-pass

Cerebro plugin for pass.
JavaScript
14
star
11

restclient.kak

HTTP REST client for Kakoune
KakouneScript
10
star
12

dmenu-term

dmenu as a terminal with fuzzy filter
Shell
9
star
13

lightline-trailing-whitespace

A trailing whitespace component for the lightline vim plugin
Vim Script
7
star
14

docker-joypixels-fonts-build

Build EmojiOne font files (today only Android / Linux)
Python
3
star
15

pkgbuilds

Shell
3
star
16

update-ipsets

Dockerfile
2
star
17

pkgbuild-brave-vaapi

Shell
2
star
18

container-tab-flow

Firefox extension: stay within the current container when closing a tab
JavaScript
1
star
19

maximbaz.github.io

HTML
1
star
20

iptables-exporter

Rust
1
star
21

LegoRobot

Managing LEGO robot via Bluetooth
C#
1
star
22

emacs-smart-home-end

Enables easy navigation with `Home' and `End' keys across wrapped lines (in Visual Line Mode).
Emacs Lisp
1
star
23

helm-echoip

Shell
1
star