askfiy / nvim

An excellent Neovim configuration, which is as powerful as Vscode, is lightning fast ⚡

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust Support

mauricekraus opened this issue · comments

Hey awesome project @askfiy

I followed your configuration, however I couldn't get it running with Mason and rust-tools/rust analyzer. Could you help me with the configuration or include the configuration directly into the project.

commented

The easiest way is to open the basic/mason.lua file and add it to the lsp option "rust-analyzer" (note that the separator symbol is -)

others:

If you need to customize some lsp server startup commands, you need to add in lsp/server_configurations/ A file named rust_analyzer.lua (note the separator is _).

You can refer to other existing files, such as gopls.lua.

You can also refer to the default configuration of rust_analyzer, its default configuration file is in $HOME/.local/share/nvim/store/nvim-lspconfig/lua/lspconfig/server_configurations/rust_analyzer.lua

For configuration of DAP debugger, you can refer to nvim-dap/wiki. If you need it, I will guide you how to install it correctly.

Sorry, I'm new to rust.. so I can't add it directly. PRs are welcome.