Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
rust-analyzer
Discontinued A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)
-
lsp-status.nvim
Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Additionally, since it's related I also have my lsp config stuff here--which may be a mess, but hopefully you can make sense of it. The on_attch callback I use is defined in that file. I'm definitely no expert on this stuff, but it's been working for me for some months now... I hope it serves as some help!
-- all the opts to send to nvim-lspconfig -- these override the defaults set by rust-tools.nvim -- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer server = { -- on_attach is a callback called when the language server attachs to the buffer -- on_attach = on_attach, settings = { -- to enable rust-analyzer settings visit: -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc ["rust-analyzer"] = { -- enable clippy on save checkOnSave = { command = "clippy" }, } } },
-- all the opts to send to nvim-lspconfig -- these override the defaults set by rust-tools.nvim -- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer server = { -- on_attach is a callback called when the language server attachs to the buffer -- on_attach = on_attach, settings = { -- to enable rust-analyzer settings visit: -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc ["rust-analyzer"] = { -- enable clippy on save checkOnSave = { command = "clippy" }, } } },
Ah yeah, good question. I use [nvim-dap](https://github.com/mfussenegger/nvim-dap) on occasion to facilitate debugging. This particular configuration relies on vscode-lldb, where you have to download and extract the VSCode plugin to use it; this is the path to that. Info is [here](https://github.com/mfussenegger/nvim-dap/wiki/C-C---Rust-(via--codelldb)). This definitely wasn't my starting place in trying to get DAP stuff hooked up (due to all the manual intervention), but after trying other plugin options I saw the usefulness in debugging and, once set up, this plugin provided the nicest experience with Rust.
[lsp-status](https://github.com/nvim-lua/lsp-status.nvim) that's used by the statusline plugin I use ([bubbly.nvim](https://github.com/datwaft/bubbly.nvim)) to populate lsp diagnostic info in the status bar (ex. 2 errors, 50 warnings, etc). I only added it per suggestion of the plugin, so it's quite possible you wouldn't need it.
[lsp-status](https://github.com/nvim-lua/lsp-status.nvim) that's used by the statusline plugin I use ([bubbly.nvim](https://github.com/datwaft/bubbly.nvim)) to populate lsp diagnostic info in the status bar (ex. 2 errors, 50 warnings, etc). I only added it per suggestion of the plugin, so it's quite possible you wouldn't need it.
This is a rust container with rust-analyzer pre-configured: https://github.com/nvim-lsp/try.nvim/tree/master/rust