mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Run prettier on all files
This commit is contained in:
parent
3a405b65d6
commit
e26071d96e
23 changed files with 220 additions and 129 deletions
|
@ -8,24 +8,26 @@ export class Server {
|
|||
public static config = new Config();
|
||||
public static client: lc.LanguageClient;
|
||||
|
||||
public static start(notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>) {
|
||||
public static start(
|
||||
notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>
|
||||
) {
|
||||
const run: lc.Executable = {
|
||||
command: 'ra_lsp_server',
|
||||
options: { cwd: '.' },
|
||||
options: { cwd: '.' }
|
||||
};
|
||||
const serverOptions: lc.ServerOptions = {
|
||||
run,
|
||||
debug: run,
|
||||
debug: run
|
||||
};
|
||||
const clientOptions: lc.LanguageClientOptions = {
|
||||
documentSelector: [{ scheme: 'file', language: 'rust' }],
|
||||
documentSelector: [{ scheme: 'file', language: 'rust' }]
|
||||
};
|
||||
|
||||
Server.client = new lc.LanguageClient(
|
||||
'ra-lsp',
|
||||
'rust-analyzer languge server',
|
||||
serverOptions,
|
||||
clientOptions,
|
||||
clientOptions
|
||||
);
|
||||
Server.client.onReady().then(() => {
|
||||
for (const [type, handler] of notificationHandlers) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue