Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/halkn/lightline-lsp
Vim plugin for lightline.vim and vim-lsp
https://github.com/halkn/lightline-lsp
lightline vim vim-lsp vim-plugin
Last synced: 3 months ago
JSON representation
Vim plugin for lightline.vim and vim-lsp
- Host: GitHub
- URL: https://github.com/halkn/lightline-lsp
- Owner: halkn
- License: mit
- Created: 2020-05-16T10:55:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-16T14:56:54.000Z (over 3 years ago)
- Last Synced: 2024-06-10T02:32:15.865Z (5 months ago)
- Topics: lightline, vim, vim-lsp, vim-plugin
- Language: Vim script
- Size: 2.93 KB
- Stars: 21
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lightline-lsp
This plugin is a very simple plugin that integrates [lightline.vim](1) and [vim-lsp](2).
Display the diagnostic result of vim-lsp in the statusline of lightline.vim.## Install
Install with your favorite plugin manager.
Of course lightline.vim and vim-lsp are required.## Usage
For example, set `g:lightline` in vimrc.
Just set `component_expand` to this plugin's autoload function and specify its type.
See lightline.vim documentation for more infomation.```vim
let g:lightline = {
\ 'active': {
\ 'right': [ [ 'lsp_errors', 'lsp_warnings', 'lsp_ok', 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_expand': {
\ 'lsp_warnings': 'lightline_lsp#warnings',
\ 'lsp_errors': 'lightline_lsp#errors',
\ 'lsp_ok': 'lightline_lsp#ok',
\ },
\ 'component_type': {
\ 'lsp_warnings': 'warning',
\ 'lsp_errors': 'error',
\ 'lsp_ok': 'middle',
\ },
\ }
```## Configuration
The warning and error signs depend on the vim-lsp settings.
See vim-lsp documentation for more infomation.
The sign when vim-lsp diagnostic result does not exist is set with `g:lightline_lsp_signs_ok`.
The default value if this global variable does not exist is `OK`.[1]: https://github.com/itchyny/lightline.vim "lightline.vim"
[2]: https://github.com/prabirshrestha/vim-lsp "vim-lsp"