Switching to native lsp and using it with rust

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • dotfiles

  • 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!

  • nvim-lspconfig

    Quickstart configs for Nvim LSP

  • -- 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" }, } } },

  • 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.

    InfluxDB logo
  • rust-analyzer

    Discontinued A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)

  • -- 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" }, } } },

  • nvim-dap

    Debug Adapter Protocol client implementation for Neovim

  • 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.nvim

    Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline

  • [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.

  • bubbly.nvim

    Discontinued Bubbly statusline for neovim

  • [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.

  • try.nvim

    Discontinued Test container CI for neovim and the lsp ecosystem

  • This is a rust container with rust-analyzer pre-configured: https://github.com/nvim-lsp/try.nvim/tree/master/rust

  • 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.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts