I am trying to follow the neovim manual to set up LSP (":h lsp"), but things do not seem to be working and I'm at a loss. I get these errors in the log file (more if I increase the output verbosity, but...):
[START][2024-02-15 14:58:27] LSP logging initiated
[WARN][2024-02-15 14:58:27] .../lua/vim/lsp.lua:1637 "buf_attach_client called on unloaded buffer (id: 1): "
[ERROR][2024-02-15 14:58:32] .../vim/lsp/rpc.lua:734 "rpc" "rust-analyzer" "stderr" "[ERROR rust_analyzer::main_loop] FetchBuildDataError:\nFailed to run build scripts for /home/lacall/proj/om/core: no current exe available (short)\n\n"
[ERROR][2024-02-15 14:58:33] .../vim/lsp/rpc.lua:734 "rpc" "rust-analyzer" "stderr" '[ERROR rust_analyzer::lsp_utils] overly long loop turn took 196.369724ms (event handling took 115.232941ms): AddDiagnostic { id: 0, workspace_root: AbsPathBuf("/home/lacall/proj/om/core"), diagnostic_code: Some("unused_imports") }\n'
Also ":lua =vim.lsp.buf.server_ready()" reports "false", though something is allowing neovim to report for the opened .rs file several instances of "_ multiple associated items are never used". And ":verbose set omnifunc?" yields only "omnifunc=".
cargo check runs successfully in this project, and I have run cargo build --release, so there are exes available for rust-analyzer and this project itself, anyway. The error seems to still occur after running "cargo clean".
rust-analyzer is built from commit 424da1007 (Sun Jul 16 00:50:43 2023)because OpenBSD 7.4 stable only provides rustc 1.72.1, and later versions of rust-analyzer don't seem to build without errors from the compiler.
I can provide my init.lua or other info if that would help.
Thanks much!!