Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhysd/vim-lsp-ale
Bridge between vim-lsp and ALE
https://github.com/rhysd/vim-lsp-ale
language-server-protocol linter vim vim-plugin
Last synced: 3 months ago
JSON representation
Bridge between vim-lsp and ALE
- Host: GitHub
- URL: https://github.com/rhysd/vim-lsp-ale
- Owner: rhysd
- License: mit
- Created: 2021-04-08T12:25:19.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-11T06:47:49.000Z (about 3 years ago)
- Last Synced: 2024-11-01T11:51:29.411Z (3 months ago)
- Topics: language-server-protocol, linter, vim, vim-plugin
- Language: Vim script
- Homepage:
- Size: 77.1 KB
- Stars: 87
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[vim-lsp][] + [ALE][]
=====================
[![Build Status][ci-badge]][ci]
[![Coverage Status][codecov-badge]][codecov][vim-lsp-ale][] is a Vim plugin for bridge between [vim-lsp][] and [ALE][]. Diagnostics results received
by vim-lsp are shown in ALE's interface.When simply using ALE and vim-lsp, both plugins run LSP servers respectively. Running multiple server processes
consume resources and may cause some issues. And showing lint results from multiple plugins is confusing.
vim-lsp-ale solves the problem.## Installation
Install [vim-lsp][], [ale][ALE], [vim-lsp-ale][] with your favorite package manager or `:packadd` in your `.vimrc`.
An example with [vim-plug](https://github.com/junegunn/vim-plug):
```viml
Plug 'dense-analysis/ale'
Plug 'prabirshrestha/vim-lsp'
Plug 'rhysd/vim-lsp-ale'
```## Usage
Register LSP servers you want to use with `lsp#register_server` and set `vim-lsp` linter to `g:ale_linters`
for filetypes you want to check with vim-lsp.The following example configures `gopls` to check Go sources.
```vim
" LSP configurations for vim-lsp
if executable('gopls')
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'gopls',
\ 'cmd': ['gopls'],
\ 'allowlist': ['go', 'gomod'],
\ })
endif" Set 'vim-lsp' linter
let g:ale_linters = {
\ 'go': ['golint'], " vim-lsp is implicitly active
\ }
```This plugin configures vim-lsp and ALE automatically. You don't need to setup various variables.
When opening a source code including some lint errors, vim-lsp will receive the errors from language server
and ALE will report the errors in the buffer.ALE supports also many external programs. All errors can be seen in one place. The above example enables
vim-lsp and golint.For more details, see [the documentation](./doc/vim-lsp-ale.txt).
## Testing
There are unit tests and integration tests. CI runs on GitHub Actions.
See [test/README.md](./test/README.md) for more details.## License
Licensed under [the MIT license](./LICENSE).
[vim-lsp]: https://github.com/prabirshrestha/vim-lsp
[ALE]: https://github.com/dense-analysis/ale
[vim-lsp-ale]: https://github.com/rhysd/vim-lsp-ale
[ci-badge]: https://github.com/rhysd/vim-lsp-ale/workflows/CI/badge.svg?branch=master&event=push
[ci]: https://github.com/rhysd/vim-lsp-ale/actions?query=workflow%3ACI+branch%3Amaster
[codecov-badge]: https://codecov.io/gh/rhysd/vim-lsp-ale/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/rhysd/vim-lsp-ale