Compare commits

..

19 Commits

Author SHA1 Message Date
w0rp
e1c8d665d6 #3600 Implement pull model with Neovim Client
Implement the diagnostics pull model with the LSP Neovim client. We
must handle messages a little different and tweak client capabilities
for pull diagnostics to work through the Neovim client.
2025-03-23 16:08:18 +00:00
w0rp
fe50a711cb Close #3600 - Implement pull diagnostics in VimL
Implement pull diagnostics in the VimL implementation so ALE is able
to track when servers are busy checking files. Only servers that
support this feature will return diagnostics these ways.
2025-03-23 16:07:46 +00:00
w0rp
19e1b5a9d3 Implement ale.queue for calling ale#Queue in Lua 2025-03-22 01:10:11 +00:00
w0rp
33a902f489 Implement ale.pad in Lua 2025-03-22 00:43:29 +00:00
w0rp
a1c57918ef Implement ale.get_filename_mappings in Lua 2025-03-22 00:35:53 +00:00
w0rp
1aae83497d Add ale.has to mirror ale#Has in Lua 2025-03-22 00:04:46 +00:00
w0rp
f4af0dc84b Add basic Lua ALE functions and test coverage
Ensure that basic ALE functions `ale.var`, `ale.escape`, and `ale.env`
are available in Lua. Cover all Lua code so far with busted tests,
fixing bugs where ALE variables can be set with Boolean values instead
of numbers. Document all functionality so far.
2025-03-21 23:37:35 +00:00
w0rp
7f43666fb3 Detect the Lua project root using .luarc.json 2025-03-21 12:07:10 +00:00
w0rp
bcd1a12949 Implement Lua ALE setup & overhaul documentation
1. Add ale.setup and ale.setup.buffer for pure Lua configuration.
2. Update many global settings to use Booleans instead of numbers to
   make types easiert to work with in Lua.
3. Radically reformat documentation and fix errors to make
   documentation more usable for Neovim users.
2025-03-20 21:52:13 +00:00
w0rp
53f036fe9f Support g:ale_shell with the Neovim LSP client 2025-03-20 21:45:19 +00:00
w0rp
3dfebe45c6 Add Neovim TCP connections to language servers
Support TCP connections to language servers through Neovim's built in
client. In all but what is currently the nightly builds of Neovim
connections via a hostname will fail, but connections via an IP address
should function. We will still enable the built in Neovim client by
default anyway, as LSP clients very rarely connect over TCP.
2025-03-20 21:45:19 +00:00
w0rp
964e0a2e39 Supply language_id values to Neovim LSP API
Change logic so ALE's LSP implementation and the Neovim LSP client
retrieve the language_id for language clients at roughly the same time
via the same means. This makes ALE inform the language server what the
language for the language is for clients.
2025-03-20 21:45:19 +00:00
w0rp
ee975196ff Fix tests for Neovim LSP integration 2025-03-20 21:45:19 +00:00
w0rp
3f7ea86ae1 Update documentation for Neovim LSP integration
Update documentation to advertise ALE's integration with Neovim's native
LSP client, and explain how functionality is integrated with ALE,
Neovim's native tools, and other plugins.
2025-03-20 21:45:18 +00:00
w0rp
dd8d7cb4b4 Clean up message handling for LSP integration
Now we ought to be able to handle any kind of response for any request
we send, clean up message handling so there are fewer changes to make
to LSP code to adjust for Neovim integration.
2025-03-20 21:45:18 +00:00
w0rp
8216ee4a65 Handle other LSP capabilities via ALE
Save capabilities from language servers ALE connects to via Neovim's LSP
client and handle responses to requests ALE sends to language servers.
This enables ALE to work with Neovim's language client for its commands
while also letting users directly use the connected clients for native
Neovim keybinds and so on.
2025-03-20 21:45:18 +00:00
w0rp
9a251b2865 Remove the log_level line from Lua code 2025-03-20 21:45:18 +00:00
w0rp
61a1fcc92f Handle Neovim LSP diagnostics via ALE's functions 2025-03-20 21:45:18 +00:00
w0rp
c9eb8f9d15 Start up language servers with Neovim's API
Get language servers starting and displaying diagnostics with Neovim's
API in Neovim 0.8 and up. With this set up, now ALE needs to take over
handling diagnostics returned by the language servers.
2025-03-20 21:45:18 +00:00
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
function! ale#fixers#biome#Fix(buffer) abort
let l:executable = ale#handlers#biome#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'biome_options')
let l:apply = ale#Var(a:buffer, 'biome_fixer_apply_unsafe') ? '--write --unsafe' : '--write'
let l:apply = ale#Var(a:buffer, 'biome_fixer_apply_unsafe') ? '--apply-unsafe' : '--apply'
return {
\ 'read_temporary_file': 1,

View File

@@ -17,7 +17,7 @@ Execute(The default biome command should be correct):
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
\ . ' check --write %t'
\ . ' check --apply %t'
\ }
Execute(Unsafe fixes can be applied via an option):
@@ -28,7 +28,7 @@ Execute(Unsafe fixes can be applied via an option):
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
\ . ' check --write --unsafe %t'
\ . ' check --apply-unsafe %t'
\ }
Execute(The fixer should accept options):
@@ -39,5 +39,5 @@ Execute(The fixer should accept options):
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
\ . ' check --write --foobar %t',
\ . ' check --apply --foobar %t',
\ }