GithubHelp home page GithubHelp logo

kozachynskyi / lightline-ale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maximbaz/lightline-ale

0.0 0.0 0.0 65 KB

ALE indicator for the lightline vim plugin

License: ISC License

Vim Script 100.00%

lightline-ale's Introduction

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('w0rp/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' ]] }

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

lightline-ale's People

Contributors

maximbaz avatar neozenith avatar vancluever avatar mphe avatar earnubs avatar infokiller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.