mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Half of code-actions
This commit is contained in:
parent
66be735aa9
commit
23c06db9c2
5 changed files with 139 additions and 57 deletions
|
@ -23,6 +23,7 @@ mod req;
|
|||
mod dispatch;
|
||||
mod handlers;
|
||||
mod util;
|
||||
mod conv;
|
||||
|
||||
use threadpool::ThreadPool;
|
||||
use crossbeam_channel::{bounded, Sender, Receiver};
|
||||
|
@ -33,7 +34,7 @@ use libanalysis::{WorldState, World};
|
|||
use ::{
|
||||
io::{Io, RawMsg, RawRequest},
|
||||
handlers::{handle_syntax_tree, handle_extend_selection, publish_diagnostics, publish_decorations,
|
||||
handle_document_symbol},
|
||||
handle_document_symbol, handle_code_action},
|
||||
util::{FilePath, FnBox}
|
||||
};
|
||||
|
||||
|
@ -182,6 +183,10 @@ fn main_loop(
|
|||
handle_request_on_threadpool::<req::DocumentSymbolRequest>(
|
||||
&mut req, pool, world, &sender, handle_document_symbol
|
||||
)?;
|
||||
handle_request_on_threadpool::<req::CodeActionRequest>(
|
||||
&mut req, pool, world, &sender, handle_code_action
|
||||
)?;
|
||||
|
||||
let mut shutdown = false;
|
||||
dispatch::handle_request::<req::Shutdown, _>(&mut req, |(), resp| {
|
||||
resp.result(io, ())?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue