简体   繁体   中英

How do I configure the Rust Language Server via LanguageClient-neovim?

I am attempting to use the Rust Language Server via LanguageClient-neovim and I want to set RLS options such as wait_to_build .

I do not wish to configure LanguageClient-neovim settings like how to start the RLS process.

The RLS only explains configuring the VSCode extension via <project>/.vscode/settings.json .

How can I set configuration options for my server?

LanguageClient-neovim allows you to configure servers via the <project>/.vim/settings.json file.

If this does not exist you will want to create it and track it in your version control system.

The RLS configuration options are detailed in the project's README .

The structure of your settings file should be as such:

{
    "rust": {
        "wait_to_build": 1500
    }
}

Once you have saved that file you will need to restart the client by issuing the command :LanguageClientStop then :LanguageClientStart .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM