RustLsp Command not found #354
Answered
by
mrcjkb
niksingh710
asked this question in
Q&A
-
Have you read the docs and searched existing issues?
Neovim version (nvim -v)v0.9.5 Operating system/versionArch Linux Output of :checkhealth rustaceanvim==============================================================================
rustaceanvim: require("rustaceanvim.health").check()
Checking for Lua dependencies ~
- WARNING dap not installed. Needed for debugging features [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap)
Checking external dependencies ~
- OK rust-analyzer: found
- OK Cargo: found cargo 1.77.2 (e52e36006 2024-03-26)
- OK rustc: found rustc 1.77.2 (25ef9e3d8 2024-04-09)
Checking config ~
- OK No errors found in config.
Checking for conflicting plugins ~
- OK No conflicting plugins detected.
Checking for tree-sitter parser ~
- OK tree-sitter parser for Rust detected. How to reproduce the issueused the minimal config also `RustLsp` command not available. Expected behaviour
Actual behaviourThe minimal config used to reproduce this issue.-- Minimal nvim config with lazy
-- Assumes a directory in $NVIM_DATA_MINIMAL
-- Start with
--
-- export NVIM_DATA_MINIMAL=$(mktemp -d)
-- export NVIM_APP_NAME="nvim-ht-minimal"
-- nvim -u NORC -u minimal.lua
--
-- Then exit out of neovim and start again.
-- Ignore default config
local config_path = vim.fn.stdpath('config')
vim.opt.rtp:remove(config_path)
-- Ignore default plugins
local data_path = vim.fn.stdpath('data')
local pack_path = data_path .. '/site'
vim.opt.packpath:remove(pack_path)
-- bootstrap lazy.nvim
data_path = assert(os.getenv('NVIM_DATA_MINIMAL'), '$NVIM_DATA_MINIMAL environment variable not set!')
local lazypath = data_path .. '/lazy/lazy.nvim'
local uv = vim.uv
---@diagnostic disable-next-line: deprecated
or vim.loop
if not uv.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'[email protected]:folke/lazy.nvim.git',
'--branch=stable',
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)
local lazy = require('lazy')
lazy.setup({
{
'mrcjkb/rustaceanvim',
version = '^4',
init = function()
-- Configure rustaceanvim here
vim.g.rustaceanvim = {}
end,
ft = { 'rust' },
},
-- Add any other plugins needed to reproduce the issue.
-- see https://github.com/folke/lazy.nvim#-lazynvim for details.
}, { root = data_path, state = data_path .. '/lazy-state.json', lockfile = data_path .. '/lazy-lock.json' }) |
Beta Was this translation helpful? Give feedback.
Answered by
mrcjkb
Apr 13, 2024
Replies: 2 comments 4 replies
-
I have a similar issue to this.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey 👋
The command becomes available when the LSP client attaches.
The health check doesn't print a version, which tells me you probably have the rustup wrapper for rust-analyzer installed, but not rust-analyzer (you can test this by trying to run rust-analyzer from the command line).
To install rust-analyzer, you need to install it with rustup:
rustup add component rust-analyzer
.