Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josa42/vim-lightline-coc
https://github.com/josa42/vim-lightline-coc
lightline neovim vim vim-plugin
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/josa42/vim-lightline-coc
- Owner: josa42
- License: mit
- Archived: true
- Created: 2019-04-02T11:28:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-06T18:44:24.000Z (almost 3 years ago)
- Last Synced: 2024-08-01T17:41:29.365Z (3 months ago)
- Topics: lightline, neovim, vim, vim-plugin
- Language: Vim script
- Homepage:
- Size: 16.6 KB
- Stars: 51
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lightline-coc
This plugin provides [coc](https://github.com/neoclide/coc.nvim) diagnostics indicator for the [lightline](https://github.com/itchyny/lightline.vim) vim plugin.
![Example](.github/example-v2.jpg)
## Installation
Install using a plugin manager of your choice, for example [`vim-plug`](https://github.com/junegunn/vim-plug):
```viml
Plug 'josa42/vim-lightline-coc'
```## Components
- `coc_errors` Number of diagnostics errors
- `coc_warnings` Number of diagnostics warnings
- `coc_info` Number of diagnostics information messages
- `coc_hints` Number of diagnostics hints
- `coc_ok` Checkmark if there are no errors or warnings
- `coc_status` Show status messages if there are any.## Integration
```viml
let g:lightline = {
\ 'active': {
\ left': [[ 'coc_info', 'coc_hints', 'coc_errors', 'coc_warnings', 'coc_ok' ], [ 'coc_status' ]]
\ }
\ }" register compoments:
call lightline#coc#register()
```**Or register manually**
```viml
" Register the components:
let g:lightline = {}
let g:lightline.component_expand = {
\ 'linter_warnings': 'lightline#coc#warnings',
\ 'linter_errors': 'lightline#coc#errors',
\ 'linter_info': 'lightline#coc#info',
\ 'linter_hints': 'lightline#coc#hints',
\ 'linter_ok': 'lightline#coc#ok',
\ 'status': 'lightline#coc#status',
\ }" Set color to the components:
let g:lightline.component_type = {
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_info': 'info',
\ 'linter_hints': 'hints',
\ 'linter_ok': 'left',
\ }" Add the components to the lightline:
let g:lightline.active = {
\ left': [[ 'coc_info', 'coc_hints', 'coc_errors', 'coc_warnings', 'coc_ok' ], [ 'coc_status' ]]
\ }
```## Configuration
- `g:lightline#coc#indicator_warnings`
The indicator to use when there are warnings. Default is `•`.- `g:lightline#coc#indicator_errors`
The indicator to use when there are errors. Default is `×`.- `g:lightline#coc#indicator_info`
The indicator to use when there are information messages. Default is `~`.- `g:lightline#coc#indicator_hints`
The indicator to use when there are hints. Default is `>`.- `g:lightline#coc#indicator_ok`
The indicator to use when there are no warnings or errors. Default is `✓`.## Credit
- The plugin is based on [`maximbaz/lightline-ale`](https://github.com/maximbaz/lightline-ale)
## License
[MIT © Josa Gesell](LICENSE)