Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim LSP & Lua Integration #4815

Open
w0rp opened this issue Aug 2, 2024 · 0 comments
Open

Neovim LSP & Lua Integration #4815

w0rp opened this issue Aug 2, 2024 · 0 comments
Labels
enhancement LSP Any issue relating to LSP or tsserver
Milestone

Comments

@w0rp
Copy link
Member

w0rp commented Aug 2, 2024

Prior Reading & Watching

History

ALE has existed since 2016. ALE was created as an asynchronous replacement for Syntastic following the advice of the Syntastic maintainer, 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, 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, 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 right through to modern advanced editors. ALE now forms a part of the 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, Tree-sitter, Lua-based plugin configuration, fancy Neovim GUIs, embedding in other editors such as VS Code, 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: Implement the new LSP diagnostic pull model #3600
  2. Support Neovim's native LSP client for better integration without plugins, without loss of functionality in Vim.
    1. Enable this support in Neovim by default for "new enough" Neovim versions, so no configuration is needed.
  3. Run through ALE functionality and ensure all current functionality is supported.
  4. Rewrite all documentation and tweak options so ALE can be configured entirely from Lua with relevant Lua functions. Neural has prior art for this.
  5. 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.
  6. Adjust ALE code so it automatically interferes with native VSCode functionality less when embedded in VSCode, by default.
  7. Adjust ALE code so Tree-sitter and other UI enhancements function at their best by default.
  8. Amend ALE code with better default for Neovide, as the preffered Neovim GUI experience.
  9. Absorb all nvim-lspconfig default configurations into ALE, with proper author credits, so ALE supersets the default configurations for LSP, for the convenience of users.
    1. Ensure ALE works seamlessly in combination with nvim-lspconfig.
    2. Ensure ALE continues to work seamlessly with other LSP client plugins, such as coc.nvim.
  10. Add support for mason.nvim, if installed, for making the installation of language servers much easier, and update documentation to point to how to use mason.

Why?

@w0rp uses ALE every single day, and will never use anything else. @w0rp will use Neovim when it actually has a 1.0.0 version, and does not sponsor it, but ironically something else with a very similar name does. 😆

Screenshot_20240802_085700

@w0rp w0rp added enhancement LSP Any issue relating to LSP or tsserver labels Aug 2, 2024
@w0rp w0rp added this to the Version 4.0.0 milestone Aug 2, 2024
@w0rp w0rp pinned this issue Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement LSP Any issue relating to LSP or tsserver
Projects
None yet
Development

No branches or pull requests

1 participant