Skip to content
brotzeit edited this page Nov 1, 2019 · 25 revisions

Table of Contents

LSP support for Rust

  • lsp-rust-server Choose LSP server (default is RLS)

  • lsp-rust-switch-server Switch priorities of lsp servers

RLS

Customization

This is an incomplete list of the available options

  • lsp-rust-rls-server-command change command to start RLS

  • lsp-rust-show-hover-context turn off hover tooltips

rust-analyzer

Customization

lsp-rust-analyzer-server-command change command to start rust-analyzer

lsp-rust-analyzer-server-display-inlay-hints turn off inlay hints

Commands

lsp-rust-analyzer-syntax-tree

Display syntax tree for current buffer

lsp-rust-analyzer-status

Display status information for rust-analyzer

lsp-rust-analyzer-join-lines

Join selected lines into one, smartly fixing up whitespace and trailing commas

before

after

inlay-hints

lsp-rust-analyzer-inlay-hints-mode enables displaying of inlay hints

NOTE: the inlay hints interact badly with the lsp-ui sideline, because it doesn't seem to consider the overlays in its width calculation, which often leads to lines wrapping around.