GithubHelp home page GithubHelp logo

doytsujin / vim-lsp-ale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rhysd/vim-lsp-ale

0.0 1.0 0.0 79 KB

Bridge between vim-lsp and ALE

License: MIT License

Rust 0.19% Vim Script 99.81%

vim-lsp-ale's Introduction

Build Status Coverage Status

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, vim-lsp-ale with your favorite package manager or :packadd in your .vimrc.

An example with vim-plug:

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.

" 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.

Testing

There are unit tests and integration tests. CI runs on GitHub Actions. See test/README.md for more details.

License

Licensed under the MIT license.

vim-lsp-ale's People

Contributors

rhysd avatar idbrii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.