dense-analysis / dense-analysis/ale
Neovim LSP & Lua Integration
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
# Prior Reading & Watching
* https://neovim.io/doc/user/lsp.html
* https://neovim.io/doc/user/lua.html
* [`ThePrimeagen` - 0 to LSP : Neovim RC From Scratch](https://www.youtube.com/watch?v=w7i4amO_zaE)
# History
ALE has existed [since 2016](https://github.com/dense-analysis/ale/commit/11c11e578f22cda52048fdec1354f9675b413495). ALE was created as an asynchronous replacement for Syntastic following [the advice of the Syntastic maintainer](https://github.com/vim-syntastic/syntastic/issues/699#issuecomment-61709028), and has served in that function for quite some time. Since the creation of ALE, it became obvious that TypeScript was going to become extremely popular, and so @w0rp added integration with `tsserver` into ALE to leverage `tsserver` diagnostics, and then adding on top capabilties for fixing code and some light "IDE" like features became obvious. `tsserver` inspired [LSP](https://microsoft.github.io/language-server-protocol/), which @w0rp added support for, both having come from Microsoft, and LSP has become commonplace now across all editors.
@w0rp has contributed to the LSP spec itself by way of recommending the [diagnostic pull model](https://github.com/microsoft/language-server-protocol/issues/737), which still has yet to be implemented in ALE for Vim. #3600
ALE will always be maintained in Vim script with _zero_ external dependencies so it can offer first class support for both Vim and Neovim, in every possible environment, from [Debian Stable packages for ALE](https://packages.debian.org/bookworm/vim-ale) right through to [modern advanced editors](https://github.com/neovide/neovide). ALE now forms a part of the [DAFT](https://denseanalysis.org/projects/daft/) under Dense Analysis, a 501(c)(3) nonprofit created by @w0rp and friends for improving IT education and training, and improving the quality of every day lives for both IT persons and the world at large.
Since time has marched on, the bleeding edge developer experience for users interested in Vim has become use of [Neovim](https://neovim.io/), [Tree-sitter](https://tree-sitter.github.io/tree-sitter/), Lua-based plugin configuration, [fancy Neovim GUIs](https://github.com/neovide/neovide), embedding in other editors [such as VS Code](https://github.com/vscode-neovim/vscode-neovim), and so on. This is an entirely different and exciting modern development world, and those developers have certain expectations about how to leverage a plugin for Neovim and how to configure it. In order to adapt to the modern world, ALE's code needs to be cleaned up so unnecessary aspects of ALE are removed, and tighter integration with Neovim is achieved, without loss of functionality for Vim.
# Proposal
In order to faciliate a better developer experience and tighten integration, we will achieve the following.
1. Implement the Diagnostic Pull Model in Vim, so Vim users aren't left behind: https://github.com/dense-analysis/ale/issues/3600
1. **(Done)** Support Neovim's native LSP client for better integration without plugins, without loss of functionality in Vim.
1. **(Done)** Enable this support in Neovim _by default_ for "new enough" Neovim versions, so no configuration is needed.
1. **(Done)** Run through ALE functionality and ensure all current functionality is supported.
1. **(Done)** Rewrite all documentation and tweak options so ALE can be configured entirely from Lua with relevant Lua functions. [Neural has prior art for this](https://github.com/dense-analysis/neural/blob/main/autoload/neural/config.vim).
1. Tweak any code needed to ensure that the `ale_filename_mappings` option works correctly for running linters and language servers from inside of Docker and docker compose.
1. Adjust ALE code so it automatically interferes with native VSCode functionality _less_ when embedded in VSCode, by default.
1. Adjust ALE code so Tree-sitter and other UI enhancements function at their best by default.
1. Amend ALE code with better default for Neovide, as the preffered Neovim GUI experience.
1. Absorb [all nvim-lspconfig default configurations](https://github.com/neovim/nvim-lspconfig/tree/master/lua/lspconfig/server_configurations) into ALE, with proper author credits, so ALE supersets the default configurations for LSP, for the convenience of users.
1. **(Done)** Ensure ALE works seamlessly in combination with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig).
1. **(Done)** Ensure ALE continues to work seamlessly with other LSP client plugins, [such as coc.nvim](https://github.com/neoclide/coc.nvim/blob/bf68721135abb3b7e3ea358836553c1bace0d4fc/doc/coc-config.txt#L147).
1. Add support for [mason.nvim](https://github.com/williamboman/mason.nvim), if installed, for making the installation of language servers much easier, and update documentation to point to how to use mason.
Contributor guide
Assessment
This issue has not been assessed yet.