Confused by how to setup rust_analyzer with formatting

I was trying to set up lsp with rust_analyzer in NvChad. I tried to set up null-ls with rustfmt but then I found this line in the note.

Source specific Configuration · jose-elias-alvarez/null-ls.nvim Wiki (

Note: If you are using rust-analyzer , format with rust-analyzer . It reads edition from Cargo.toml .

Does this mean I can setup rust-analyzer using lspconfig to format my code directly without the use of null-ls’s rustfmt? If yes then how to set it up? I am new to using neovim. Thank you for any help.