You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`app-eselect/eselect-repository`) and sync’d before running `emerge`:
182
-
183
-
$ eselect repository enable guru && emaint sync -r guru
184
-
$ emerge rust-analyzer-bin
172
+
`rust-analyzer` is installed when the `rust-analyzer` use flag is set for dev-lang/rust or dev-lang/rust-bin. You also need to set the `rust-src` use flag.
185
173
186
174
### macOS
187
175
@@ -201,8 +189,10 @@ to link to. Some compilers and libraries can be acquired as Flatpak
201
189
SDKs, such as `org.freedesktop.Sdk.Extension.rust-stable` or
202
190
`org.freedesktop.Sdk.Extension.llvm15`.
203
191
204
-
If you use a Flatpak SDK for Rust, there should be no extra steps
205
-
necessary.
192
+
If you use a Flatpak SDK for Rust, it must be in your `PATH`:
193
+
194
+
* install the SDK extensions with `flatpak install org.freedesktop.Sdk.Extension.{llvm15,rust-stable}//23.08`
195
+
* enable SDK extensions in the editor with the environment variable `FLATPAK_ENABLE_SDK_EXT=llvm15,rust-stable` (this can be done using flatseal or `flatpak override`)
206
196
207
197
If you want to use Flatpak in combination with `rustup`, the following
208
198
steps might help:
@@ -363,14 +353,14 @@ Once `neovim/nvim-lspconfig` is installed, use
363
353
You can also pass LSP settings to the server:
364
354
365
355
lua << EOF
366
-
local nvim_lsp = require'lspconfig'
356
+
local lspconfig = require'lspconfig'
367
357
368
358
local on_attach = function(client)
369
359
require'completion'.on_attach(client)
370
360
end
371
361
372
-
nvim_lsp.rust_analyzer.setup({
373
-
on_attach=on_attach,
362
+
lspconfig.rust_analyzer.setup({
363
+
on_attach = on_attach,
374
364
settings = {
375
365
["rust-analyzer"] = {
376
366
imports = {
@@ -392,10 +382,23 @@ You can also pass LSP settings to the server:
392
382
})
393
383
EOF
394
384
385
+
If you're running Neovim 0.10 or later, you can enable inlay hints via `on_attach`:
0 commit comments