X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/fe3919e725e156d751069662d11e38f7b4791de1..5179925d63a908e267c6675e2a2e64bf30d3f727:/.vim/bundle/vim-lsp-ale/README.md diff --git a/.vim/bundle/vim-lsp-ale/README.md b/.vim/bundle/vim-lsp-ale/README.md new file mode 100644 index 00000000..2734b07c --- /dev/null +++ b/.vim/bundle/vim-lsp-ale/README.md @@ -0,0 +1,75 @@ +[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. + +screencast + +## 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