项目作者: halkn

项目描述 :
Vim plugin for lightline.vim and vim-lsp
高级语言: Vim script
项目地址: git://github.com/halkn/lightline-lsp.git
创建时间: 2020-05-16T10:55:09Z
项目社区:https://github.com/halkn/lightline-lsp

开源协议:MIT License

下载


lightline-lsp

This plugin is a very simple plugin that integrates lightline.vim and vim-lsp.
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.

  1. let g:lightline = {
  2. \ 'active': {
  3. \ 'right': [ [ 'lsp_errors', 'lsp_warnings', 'lsp_ok', 'lineinfo' ],
  4. \ [ 'percent' ],
  5. \ [ 'fileformat', 'fileencoding', 'filetype' ] ]
  6. \ },
  7. \ 'component_expand': {
  8. \ 'lsp_warnings': 'lightline_lsp#warnings',
  9. \ 'lsp_errors': 'lightline_lsp#errors',
  10. \ 'lsp_ok': 'lightline_lsp#ok',
  11. \ },
  12. \ 'component_type': {
  13. \ 'lsp_warnings': 'warning',
  14. \ 'lsp_errors': 'error',
  15. \ 'lsp_ok': 'middle',
  16. \ },
  17. \ }

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.