rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.15k stars 1.58k forks source link

Invalid offset -32603 when editing an empty .rs file #17289

Open goldeneas opened 4 months ago

goldeneas commented 4 months ago

rust-analyzer version: 2024-05-09

rustc version: (eg. output of rustc -V): 1.78.0

editor or extension: neovim with Mason+Lspconfig+RustAnalyzer

relevant settings: none

repository link (if public, optional): none

code snippet to reproduce:

Rust analyzer is printing this error if I start editing an empty .rs file before it has completed its startup. There are no settings involved, just an empty cargo project with a main.rs. Once that error pops up, it will keep appearing on every keystroke until I close the buffer, reopen it, wait for it to fully initialize and then start writing. This does not happen if the file is not empty.

tejasprabhune commented 4 months ago

I had the same issue today using Mason+Lspconfig+RustAnalyzer as installed by Mason. I tried rust-analyzer -V in the terminal and the output was error: Unknown binary 'rust-analyzer' in official toolchain 'stable-x86_64-apple-darwin'.

I'm not sure what the root cause of this error is, but following this Stack Overflow link, I tried

rustup component add rust-analyzer

I no longer had the terminal Unknown binary error or the buffer Invalid offset error in neovim. Could be some Mason issue.

goldeneas commented 4 months ago

I ran that command and it also showed that error about the toolchain not being installed. However even after installing it the situation is the same.

tejasprabhune commented 4 months ago

You're correct, I mistakenly thought the problem was resolved. I am having this problem as well.

Veykril commented 4 months ago

This makes me believe that it might be an mason/lspconfig bug? (we should probably tell the invalid offset in the error message here)

yuvaldolev commented 4 months ago

Happens to me too in Neovim with Mason + Lspconfig on macOS

Veykril commented 4 months ago

Can you check whether this occurs with a previous rust-analyzer version? It's not clear if this is a rust-analyzer bug or maybe a change in mason/lspconfig that surfaced this.

yuvaldolev commented 4 months ago

Can you check whether this occurs with a previous rust-analyzer version? It's not clear if this is a rust-analyzer bug or maybe a change in mason/lspconfig that surfaced this.

It happens for quite a while, in multiple Rust Analyzer versions.

lnicola commented 4 months ago

@yuvaldolev how do you install it, using rustup, or from source / GitHub releases?

yuvaldolev commented 4 months ago

@yuvaldolev how do you install it, using rustup, or from source / GitHub releases?

I installed rust-analyzer using Mason (Rust itself is installed using Rustup but not rust-analyzer).

BTW this error seems to happen in other times than just editing an empty file. It happens to me once in a while when coding in Neovim, which is a real bummer as I have to reopen Neovim and lose the state of my project (doing LspRestart doesn't solve this... I must reopen Neovim to fix it).

yuvaldolev commented 4 months ago

@lnicola @Veykril Is there any update on this? It's quite hard to use rust-analyzer with Neovim as it currently is.

goldeneas commented 4 months ago

I am still experiencing this issue. I've noticed that it also rarely happens when the buffer is not empty if I start editing it while rust analyzer is still indexing files. I haven't tried using older versions, and I've always installed/updated mine using Mason. If no one else has tried using older version I could do that, or if anything else should be tried.

Veykril commented 4 months ago

In what r equest handler is this happening? The logs should tell that. I am unsure what the cause here is, given it only seems to occur for this specific editor setup

cronosmain commented 4 months ago

I am not using mason for rust analyzer. Here's what the lsp log shows when I encounter an error:

[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:286    "rpc.send"      {  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        range = {          ["end"] = {            character = 0,            line = 34          },          start = {            character = 0,            line = 0          }        },        rangeLength = 752,        text = ""      } },    textDocument = {      uri = "file:///home/mark/Documents/tmp/leetcode/src/main.rs",      version = 4    }  }}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:286    "rpc.send"      {  id = 10,  jsonrpc = "2.0",  method = "textDocument/documentSymbol",  params = {    textDocument = {      uri = "file:///home/mark/Documents/tmp/leetcode/src/main.rs"    }  }}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  id = 14,  jsonrpc = "2.0",  method = "workspace/semanticTokens/refresh"}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:286    "rpc.send"      {  id = 11,  jsonrpc = "2.0",  method = "textDocument/inlayHint",  params = {    range = {      ["end"] = {        character = 0,        line = 1      },      start = {        character = 0,        line = 0      }    },    textDocument = {      uri = "file:///home/mark/Documents/tmp/leetcode/src/main.rs"    }  }}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:286    "rpc.send"      {  id = 12,  jsonrpc = "2.0",  method = "textDocument/semanticTokens/full/delta",  params = {    previousResultId = "4",    textDocument = {      uri = "file:///home/mark/Documents/tmp/leetcode/src/main.rs"    }  }}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:423    "server_request: callback result"       {  result = vim.NIL,  status = true}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:286    "rpc.send"      {  id = 14,  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  id = 10,  jsonrpc = "2.0",  result = {}}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  error = {    code = -32603,    message = "Invalid offset"  },  id = 11,  jsonrpc = "2.0"}
[DEBUG][2024-06-02 11:51:18] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  id = 12,  jsonrpc = "2.0",  result = {    data = {},    resultId = "5"  }}

The error occurs in the textDocument/inlayHint method and I have also encountered it with textDocument/documentHighlight.

[DEBUG][2024-06-02 12:16:49] .../vim/lsp/rpc.lua:286    "rpc.send"      {  id = 29,  jsonrpc = "2.0",  method = "textDocument/documentHighlight",  params = {    position = {      character = 0,      line = 3    },    textDocument = {      uri = "file:///home/mark/Documents/tmp/leetcode/src/main.rs"    }  }}
[DEBUG][2024-06-02 12:16:49] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  error = {    code = -32603,    message = "Invalid offset"  },  id = 29,  jsonrpc = "2.0"}
Veykril commented 4 months ago

the offset panic occuring sporadically for some requests is known (unsure iif we have that tracked rn), this issue is talking about it occuring constantly under a certain setup

wonbyte commented 4 months ago

the offset panic occuring sporadically for some requests is known (unsure iif we have that tracked rn), this issue is talking about it occuring constantly under a certain setup

I'm using the same setup (Mason + Lspconfig on macOS) and here are my LSP logs when the error occurs. The error can be triggered by doing the following:

  1. cargo new --lib foo
  2. open lib.rs in neovim
  3. delete the file contents (error will begin)
[START][2024-05-03 12:09:29] LSP logging initiated
[WARN][2024-05-03 12:09:29] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-04 09:22:07] LSP logging initiated
[WARN][2024-05-04 09:22:07] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-04 09:42:36] LSP logging initiated
[WARN][2024-05-04 09:42:36] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-04 09:57:34] LSP logging initiated
[ERROR][2024-05-04 09:57:34] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T14:57:34.338129Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(156)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:02:59] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:02:59.936124Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(317)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:04:34] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:04:34.468085Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(423)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:06:09] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:06:09.273761Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(607)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:09:44] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:09:44.081898Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(833)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:10:34] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:10:34.791932Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(859)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:11:33] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:11:33.486903Z ERROR hir_ty::diagnostics::match_check::pat_analysis: trying to compare incompatible constructors Struct and Variant(EnumVariantContiguousIndex(0))\n"
[ERROR][2024-05-04 10:11:55] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:11:55.741187Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1092)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:13:06] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:13:06.272935Z ERROR hir_ty::diagnostics::match_check::pat_analysis: Unexpected type for `Variant(EnumVariantContiguousIndex(1))` constructor: Str\n"
[ERROR][2024-05-04 10:13:13] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:13:13.560667Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1256)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:13:45] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:13:45.403612Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:13:45] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:13:45.487204Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:13:45] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:13:45.627340Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:13:45] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:13:45.770751Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:13:45] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:13:45.950990Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:14:41] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:14:41.071421Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1570)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:15:43] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:15:43.070105Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1734)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:16:06] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:16:06.759433Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1776)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:21:54] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:21:54.824771Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1839)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:22:06] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:22:06.790237Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1897)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:22:14] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:22:14.167477Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1939)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:24:17] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:24:17.808152Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(2151)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:24:26] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:24:26.860658Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(2205)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:27:57] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:27:57.207990Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(2575)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:28:01] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:28:01.138577Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(2602)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:30:42] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:30:42.655347Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(2730)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:30:47] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:30:47.737510Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:30:47] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:30:47.879078Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:30:48] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:30:48.067908Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:30:48] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:30:48.224038Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:30:48] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:30:48.382329Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:30:48] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:30:48.632003Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:34:08] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:34:08.490486Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:34:08] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:34:08.651035Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:34:08] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:34:08.764647Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:36:41] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:36:41.736515Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(3161)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:36:58] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:36:58.681270Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:36:58] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:36:58.884732Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:36:59] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T15:36:59.042090Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 10:51:58] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:51:58.996325Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(3609)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 10:52:11] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T15:52:11.846732Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(3657)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 11:01:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T16:01:00.834929Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 11:01:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T16:01:00.898677Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 11:01:01] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-04T16:01:01.242202Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-04 11:02:41] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T16:02:41.572257Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(4098)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 11:08:23] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T16:08:23.413987Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(4493)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 11:08:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T16:08:53.250170Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(4551)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 11:28:24] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T16:28:24.189471Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(4857)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-04 11:29:39] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-04 11:31:01] LSP logging initiated
[WARN][2024-05-04 11:31:01] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-04 13:39:58] LSP logging initiated
[ERROR][2024-05-04 13:39:58] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T18:39:58.229428Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(220)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 13:40:10] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T18:40:10.077925Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(250)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 15:19:16] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T20:19:16.959777Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(437)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 15:37:54] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T20:37:54.885419Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(931)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 15:39:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T20:39:53.881340Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1102)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 15:46:31] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T20:46:31.418486Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1383)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 15:48:11] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T20:48:11.777305Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1579)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-04 15:50:08] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-04T20:50:08.832590Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1707)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-04 16:07:20] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-05 08:48:22] LSP logging initiated
[ERROR][2024-05-05 08:48:22] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T13:48:22.481239Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(42)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-05 08:56:39] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T13:56:39.664247Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(537)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-05 08:58:57] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T13:58:57.469930Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(681)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-05 09:00:37] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-05 09:23:08] LSP logging initiated
[WARN][2024-05-05 09:23:08] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-05 09:24:32] LSP logging initiated
[ERROR][2024-05-05 09:24:32] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:24:32.914012Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(41)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:26:25] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:26:25.535634Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(158)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:26:50] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:26:50.282093Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(257)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:27:18] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:27:18.908587Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(363)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:28:58] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:28:58.090660Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(549)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:32:57] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-05T14:32:57.809217Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-05 09:32:57] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-05T14:32:57.935031Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-05 09:32:57] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-05T14:32:57.979408Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-05 09:39:54] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:39:54.641290Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(802)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:40:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:40:00.851066Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(828)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:40:30] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:40:30.454039Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(935)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 09:40:39] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T14:40:39.403699Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(970)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 10:06:02] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T15:06:02.915740Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1598)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-05 10:11:01] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T15:11:01.052877Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1856)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[WARN][2024-05-05 10:22:10] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 65): "
[START][2024-05-05 10:30:25] LSP logging initiated
[WARN][2024-05-05 10:30:25] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 7): "
[START][2024-05-05 10:34:45] LSP logging initiated
[ERROR][2024-05-05 10:34:45] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-05T15:34:45.026860Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(213)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-05 10:35:33] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-05 10:45:46] LSP logging initiated
[WARN][2024-05-05 10:45:46] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-05 10:46:54] LSP logging initiated
[WARN][2024-05-05 10:46:54] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 10): "
[START][2024-05-05 11:03:18] LSP logging initiated
[WARN][2024-05-05 11:03:18] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-05 11:33:54] LSP logging initiated
[WARN][2024-05-05 11:33:54] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 7): "
[START][2024-05-05 13:37:46] LSP logging initiated
[WARN][2024-05-05 13:37:46] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 27): "
[START][2024-05-05 13:41:38] LSP logging initiated
[WARN][2024-05-05 13:41:38] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 20): "
[START][2024-05-05 13:44:40] LSP logging initiated
[WARN][2024-05-05 13:44:40] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 7): "
[START][2024-05-05 13:44:53] LSP logging initiated
[WARN][2024-05-05 13:44:53] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-05 13:45:31] LSP logging initiated
[WARN][2024-05-05 13:45:31] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-06 11:14:37] LSP logging initiated
[WARN][2024-05-06 11:14:37] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 16): "
[START][2024-05-06 11:15:36] LSP logging initiated
[WARN][2024-05-06 11:15:36] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 17): "
[START][2024-05-06 21:04:58] LSP logging initiated
[WARN][2024-05-06 21:04:58] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 13): "
[START][2024-05-07 09:13:51] LSP logging initiated
[WARN][2024-05-07 09:13:51] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-07 09:17:42] LSP logging initiated
[WARN][2024-05-07 09:17:42] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-07 13:09:24] LSP logging initiated
[WARN][2024-05-07 13:09:24] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 54): "
[START][2024-05-07 13:41:08] LSP logging initiated
[WARN][2024-05-07 13:41:08] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 15): "
[START][2024-05-07 13:52:06] LSP logging initiated
[WARN][2024-05-07 13:52:06] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 17): "
[START][2024-05-07 14:04:29] LSP logging initiated
[WARN][2024-05-07 14:04:29] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 7): "
[START][2024-05-08 08:44:55] LSP logging initiated
[WARN][2024-05-08 08:44:55] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-08 11:39:54] LSP logging initiated
[WARN][2024-05-08 11:39:54] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 19): "
[START][2024-05-08 14:25:12] LSP logging initiated
[WARN][2024-05-08 14:25:12] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 31): "
[START][2024-05-08 14:30:29] LSP logging initiated
[WARN][2024-05-08 14:30:29] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 6): "
[START][2024-05-08 14:37:35] LSP logging initiated
[ERROR][2024-05-08 14:37:35] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-08T19:37:35.962242Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(293)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-08 14:41:34] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 13): "
[START][2024-05-08 15:27:22] LSP logging initiated
[WARN][2024-05-08 15:27:22] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 13): "
[START][2024-05-08 19:39:11] LSP logging initiated
[WARN][2024-05-08 19:39:11] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 16): "
[START][2024-05-08 19:54:04] LSP logging initiated
[WARN][2024-05-08 19:54:04] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-09 08:19:45] LSP logging initiated
[WARN][2024-05-09 08:19:45] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 08:21:05] LSP logging initiated
[WARN][2024-05-09 08:21:05] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 08:29:51] LSP logging initiated
[WARN][2024-05-09 08:29:51] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-09 09:03:33] LSP logging initiated
[WARN][2024-05-09 09:03:33] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 6): "
[START][2024-05-09 09:09:53] LSP logging initiated
[WARN][2024-05-09 09:09:53] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 09:25:00] LSP logging initiated
[WARN][2024-05-09 09:25:00] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 09:28:27] LSP logging initiated
[WARN][2024-05-09 09:28:27] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 09:37:48] LSP logging initiated
[WARN][2024-05-09 09:37:48] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 09:43:38] LSP logging initiated
[WARN][2024-05-09 09:43:38] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 10:12:08] LSP logging initiated
[WARN][2024-05-09 10:12:08] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 10:17:02] LSP logging initiated
[WARN][2024-05-09 10:17:02] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 10:54:13] LSP logging initiated
[WARN][2024-05-09 10:54:13] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 11:20:08] LSP logging initiated
[WARN][2024-05-09 11:20:08] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-09 12:28:14] LSP logging initiated
[WARN][2024-05-09 12:28:14] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 16): "
[START][2024-05-09 15:23:57] LSP logging initiated
[WARN][2024-05-09 15:23:57] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-09 16:09:52] LSP logging initiated
[WARN][2024-05-09 16:09:52] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-11 13:14:46] LSP logging initiated
[WARN][2024-05-11 13:14:46] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 13:18:17] LSP logging initiated
[WARN][2024-05-11 13:18:17] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 13:28:14] LSP logging initiated
[WARN][2024-05-11 13:28:14] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 13:40:48] LSP logging initiated
[WARN][2024-05-11 13:40:48] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-11 13:50:35] LSP logging initiated
[WARN][2024-05-11 13:50:35] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 21:28:06] LSP logging initiated
[WARN][2024-05-11 21:28:06] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 21:47:06] LSP logging initiated
[WARN][2024-05-11 21:47:06] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 21:49:38] LSP logging initiated
[WARN][2024-05-11 21:49:38] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-11 22:06:14] LSP logging initiated
[WARN][2024-05-11 22:06:14] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-12 06:58:19] LSP logging initiated
[WARN][2024-05-12 06:58:19] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 06:58:34] LSP logging initiated
[WARN][2024-05-12 06:58:34] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 07:00:19] LSP logging initiated
[WARN][2024-05-12 07:00:19] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 07:01:16] LSP logging initiated
[WARN][2024-05-12 07:01:16] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 07:11:46] LSP logging initiated
[WARN][2024-05-12 07:11:46] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 14): "
[START][2024-05-12 07:12:39] LSP logging initiated
[WARN][2024-05-12 07:12:39] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 07:16:10] LSP logging initiated
[WARN][2024-05-12 07:16:10] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 11): "
[START][2024-05-12 07:19:01] LSP logging initiated
[WARN][2024-05-12 07:19:01] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 07:30:50] LSP logging initiated
[WARN][2024-05-12 07:30:50] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 07:37:29] LSP logging initiated
[ERROR][2024-05-12 07:37:29] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-12T12:37:29.277185Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(177)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-12 08:17:35] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:17:35.192045Z ERROR hir_ty::diagnostics::match_check::pat_analysis: trying to compare incompatible constructors Struct and Variant(EnumVariantContiguousIndex(1))\n"
[ERROR][2024-05-12 08:18:07] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:18:07.046972Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:18:07] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:18:07.195045Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:18:07] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:18:07.344726Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:18:07] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:18:07.607134Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:18:07] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:18:07.875788Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:29:49] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:29:49.459186Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:29:49] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:29:49.637916Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 08:29:49] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T13:29:49.782755Z ERROR hir::diagnostics: synthetic syntax\n"
[WARN][2024-05-12 08:37:57] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-12 08:56:19] LSP logging initiated
[WARN][2024-05-12 08:56:19] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 10:01:23] LSP logging initiated
[WARN][2024-05-12 10:01:23] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 10:27:55] LSP logging initiated
[ERROR][2024-05-12 10:27:55] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:55.553079Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:56] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:56.014871Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:56] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:56.026839Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:56] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:56.355932Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:59] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:59.439301Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:59] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:59.586224Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:59] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:59.739562Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:27:59] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:27:59.888380Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:00.663031Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:00.813006Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:00.962957Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:01] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:01.113265Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:01] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:01.262309Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:02] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:02.287424Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-12 10:28:03] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-12T15:28:03.545165Z ERROR hir::diagnostics: synthetic syntax\n"
[WARN][2024-05-12 10:37:00] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-12 12:39:33] LSP logging initiated
[WARN][2024-05-12 12:39:33] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-12 12:51:37] LSP logging initiated
[WARN][2024-05-12 12:51:37] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 10): "
[START][2024-05-12 16:54:55] LSP logging initiated
[WARN][2024-05-12 16:54:55] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-13 11:00:47] LSP logging initiated
[WARN][2024-05-13 11:00:47] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-13 13:19:29] LSP logging initiated
[WARN][2024-05-13 13:19:29] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-13 16:56:16] LSP logging initiated
[WARN][2024-05-13 16:56:16] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-14 10:40:34] LSP logging initiated
[WARN][2024-05-14 10:40:34] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-14 11:29:44] LSP logging initiated
[WARN][2024-05-14 11:29:44] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-14 12:32:35] LSP logging initiated
[WARN][2024-05-14 12:32:35] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-14 14:11:48] LSP logging initiated
[WARN][2024-05-14 14:11:48] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-15 14:02:12] LSP logging initiated
[WARN][2024-05-15 14:02:12] .../lua/vim/lsp.lua:1636    "buf_attach_client called on unloaded buffer (id: 18): "
[START][2024-05-17 09:15:28] LSP logging initiated
[WARN][2024-05-17 09:15:28] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:19:07] LSP logging initiated
[WARN][2024-05-17 09:19:07] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:22:02] LSP logging initiated
[WARN][2024-05-17 09:22:02] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:24:12] LSP logging initiated
[WARN][2024-05-17 09:24:12] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:25:46] LSP logging initiated
[WARN][2024-05-17 09:25:46] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:27:57] LSP logging initiated
[WARN][2024-05-17 09:27:57] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 7): "
[START][2024-05-17 09:30:20] LSP logging initiated
[WARN][2024-05-17 09:30:20] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:36:39] LSP logging initiated
[WARN][2024-05-17 09:36:39] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 4): "
[START][2024-05-17 09:43:38] LSP logging initiated
[ERROR][2024-05-17 09:43:38] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-17T14:43:38.583857Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(128)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-17 09:44:12] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-17T14:44:12.048939Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(322)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-17 09:48:16] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-17 10:03:50] LSP logging initiated
[WARN][2024-05-17 10:03:50] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-17 10:42:40] LSP logging initiated
[WARN][2024-05-17 10:42:40] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-17 11:47:10] LSP logging initiated
[WARN][2024-05-17 11:47:10] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 12): "
[START][2024-05-18 11:29:47] LSP logging initiated
[WARN][2024-05-18 11:29:47] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-18 12:49:36] LSP logging initiated
[WARN][2024-05-18 12:49:36] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 10): "
[START][2024-05-18 13:04:41] LSP logging initiated
[WARN][2024-05-18 13:04:41] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-18 13:06:15] LSP logging initiated
[WARN][2024-05-18 13:06:15] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-18 13:12:14] LSP logging initiated
[WARN][2024-05-18 13:12:14] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 14): "
[START][2024-05-18 13:14:42] LSP logging initiated
[WARN][2024-05-18 13:14:42] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 6): "
[START][2024-05-18 15:21:20] LSP logging initiated
[WARN][2024-05-18 15:21:20] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 16): "
[START][2024-05-18 15:25:21] LSP logging initiated
[WARN][2024-05-18 15:25:21] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 16): "
[START][2024-05-18 15:35:15] LSP logging initiated
[WARN][2024-05-18 15:35:15] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-19 11:41:04] LSP logging initiated
[WARN][2024-05-19 11:41:04] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-19 11:49:47] LSP logging initiated
[ERROR][2024-05-19 11:49:47] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-19T16:49:47.641139Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(153)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[ERROR][2024-05-19 11:51:07] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:07.283658Z ERROR hir_ty::diagnostics::match_check::pat_analysis: Unexpected type for `Variant(EnumVariantContiguousIndex(1))` constructor: Str\n"
[ERROR][2024-05-19 11:51:38] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:38.003067Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:38] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:38.151174Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:38] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:38.571419Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:41] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:41.914122Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:42] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:42.063597Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:42] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:42.209415Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:42] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:42.735190Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 11:51:43] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T16:51:43.003200Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:11:28] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:11:28.913585Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:11:29] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:11:29.076394Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:11:29] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:11:29.269131Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:11:29] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:11:29.418716Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:11:29] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:11:29.610198Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:11:29] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:11:29.759145Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:15:33] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:15:33.138245Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:15:33] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:15:33.312745Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:15:33] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:15:33.494416Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:39:58] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:39:58.987297Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:41:50] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:41:50.001182Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:41:50] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:41:50.148714Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 12:41:50] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "2024-05-19T17:41:50.299340Z ERROR hir::diagnostics: synthetic syntax\n"
[ERROR][2024-05-19 13:16:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-19T18:16:10.470565Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(4894)), method: "workspace/executeCommand", params: Object {"title": String("triggerParameterHints"), "command": String("rust-analyzer.triggerParameterHints")} }\n'
[WARN][2024-05-20 07:46:54] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 8): "
[START][2024-05-30 22:40:15] LSP logging initiated
[WARN][2024-05-30 22:40:15] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-30 22:52:25] LSP logging initiated
[WARN][2024-05-30 22:52:25] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 12): "
[START][2024-05-30 22:56:47] LSP logging initiated
[WARN][2024-05-30 22:56:47] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-05-31 08:32:47] LSP logging initiated
[ERROR][2024-05-31 08:32:47] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-31T13:32:47.456073Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(750)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-31 08:33:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-31T13:33:10.802252Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(869)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-31 08:33:32] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-31T13:33:32.423449Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1073)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[ERROR][2024-05-31 08:34:08] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    '2024-05-31T13:34:08.018295Z ERROR rust_analyzer::dispatch: unknown request: Request { id: RequestId(I32(1243)), method: "workspace/executeCommand", params: Object {"command": String("rust-analyzer.triggerParameterHints"), "title": String("triggerParameterHints")} }\n'
[WARN][2024-05-31 09:56:14] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-02 11:54:43] LSP logging initiated
[WARN][2024-06-02 11:54:43] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-02 12:09:39] LSP logging initiated
[WARN][2024-06-02 12:09:39] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-02 12:22:15] LSP logging initiated
[WARN][2024-06-02 12:22:15] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-02 14:08:30] LSP logging initiated
[WARN][2024-06-02 14:08:30] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-02 14:59:38] LSP logging initiated
[WARN][2024-06-02 14:59:38] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-02 15:50:09] LSP logging initiated
[WARN][2024-06-02 15:50:09] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-03 11:25:00] LSP logging initiated
[WARN][2024-06-03 11:25:00] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-04 09:25:07] LSP logging initiated
[WARN][2024-06-04 09:25:07] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 11): "
[START][2024-06-04 09:37:08] LSP logging initiated
[WARN][2024-06-04 09:37:08] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 12): "
[START][2024-06-04 11:25:36] LSP logging initiated
[WARN][2024-06-04 11:25:36] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 11): "
[START][2024-06-04 21:04:28] LSP logging initiated
[WARN][2024-06-04 21:04:28] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-04 21:05:14] LSP logging initiated
[WARN][2024-06-04 21:05:14] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-04 21:05:53] LSP logging initiated
[WARN][2024-06-04 21:05:53] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 11): "
[START][2024-06-04 21:06:19] LSP logging initiated
[WARN][2024-06-04 21:06:19] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-04 21:07:11] LSP logging initiated
[WARN][2024-06-04 21:07:11] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 11): "
[START][2024-06-04 21:09:02] LSP logging initiated
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "Panic context:\n> \nversion: 0.3.1983-standalone (7852a4c77 2024-06-02)\nrequest: textDocument/inlayHint InlayHintParams {\n    work_done_progress_params: WorkDoneProgressParams {\n        work_done_token: None,\n    },\n    text_document: TextDocumentIdentifier {\n        uri: Url {\n            scheme: \"file\",\n            cannot_be_a_base: false,\n            username: \"\",\n            password: None,\n            host: None,\n            port: None,\n            path: \"/Users/gps/code/strsplit/src/lib.rs\",\n            query: None,\n            fragment: None,\n        },\n    },\n    range: Range {\n        start: Position {\n            line: 0,\n            character: 0,\n        },\n        end: Position {\n            line: 21,\n            character: 0,\n        },\n    },\n}\n\nthread 'Worker' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chalk-ir-0.97.0/src/lib.rs:2236:9:\nassertion `left == right` failed\n  left: 2\n right: 1\nstack backtrace:\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "   0: _rust_begin_unwind\n "
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "  1: core::panicking::panic_fmt\n   2: core::panicking::assert_failed_inner\n   3: core::panicking::assert_failed\n   4: chalk_ir::Binders<T>::substitute\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "   5: hir_ty::display::generic_args_sans_defaults\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "   6: <chalk_ir::Ty<hir_ty::interner::Interner> as hir_ty::display::HirDisplay>::hir_fmt\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "   7: hir_ty::display::HirDisplayWrapper<T>::write_to\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "   8: ide::inlay_hints::label_of_ty::rec\n   9: ide::inlay_hints::label_of_ty\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "  10: ide::inlay_hints::bind_pat::hints\n  11: ide::inlay_hints::hints\n  12: ide::inlay_hints::inlay_hints\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "  13: salsa::Cancelled::catch\n  14: rust_analyzer::handlers::request::handle_inlay_hints\n  15: std::panicking::try\n  16: core::ops::function::FnOnce::call_once{{vtable.shim}}\n"
[ERROR][2024-06-04 21:09:02] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\n"
[WARN][2024-06-04 21:09:57] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-04 21:12:09] LSP logging initiated
[WARN][2024-06-04 21:12:09] .../lua/vim/lsp.lua:604 "buf_attach_client called on unloaded buffer (id: 5): "
[START][2024-06-04 21:13:10] LSP logging initiated
[ERROR][2024-06-04 21:13:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "Panic context:\n> \nversion: 0.3.1983-standalone (7852a4c77 2024-06-02)\nrequest: textDocument/inlayHint InlayHintParams {\n    work_done_progress_params: WorkDoneProgressParams {\n        work_done_token: None,\n    },\n    text_document: TextDocumentIdentifier {\n        uri: Url {\n            scheme: \"file\",\n            cannot_be_a_base: false,\n            username: \"\",\n            password: None,\n            host: None,\n            port: None,\n            path: \"/Users/gps/code/strsplit/src/lib.rs\",\n            query: None,\n            fragment: None,\n        },\n    },\n    range: Range {\n        start: Position {\n            line: 0,\n            character: 0,\n        },\n        end: Position {\n            line: 15,\n            character: 0,\n        },\n    },\n}\n\nthread 'Worker' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chalk-ir-0.97.0/src/lib.rs:2236:9:\nassertion `left == right` failed\n  left: 2\n right: 1\n"
[ERROR][2024-06-04 21:13:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "stack backtrace:\n"
[ERROR][2024-06-04 21:13:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "   0: _rust_begin_unwind\n  "
[ERROR][2024-06-04 21:13:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    " 1: core::panicking::panic_fmt\n   2: core::panicking::assert_failed_inner\n   3: core::panicking::assert_failed\n   4: chalk_ir::Binders<T>::substitute\n   5: hir_ty::display::generic_args_sans_defaults\n   6: <chalk_ir::Ty<hir_ty::interner::Interner> as hir_ty::display::HirDisplay>::hir_fmt\n   7: hir_ty::display::HirDisplayWrapper<T>::write_to\n   8: ide::inlay_hints::label_of_ty::rec\n   9: ide::inlay_hints::label_of_ty\n  10: ide::inlay_hints::bind_pat::hints\n  11: ide::inlay_hints::hints\n  12: ide::inlay_hints::inlay_hints\n  13: salsa::Cancelled::catch\n  14: rust_analyzer::handlers::request::handle_inlay_hints\n  15: std::panicking::try\n  16: core::ops::function::FnOnce::call_once{{"
[ERROR][2024-06-04 21:13:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "vtable.shim}}\n"
[ERROR][2024-06-04 21:13:10] .../vim/lsp/rpc.lua:770    "rpc"   "/Users/gps/.local/share/nvim/mason/bin/rust-analyzer"  "stderr"    "note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\n"
chaozwn commented 3 months ago

Has the issue been resolved yet?

Veykril commented 3 months ago

I still believe this is a client issue, not rust-analyzer

CertainLach commented 3 months ago

For me, it happens very rarely, and only in some projects, but when it happens - it spams a lot (Not on every keystroke, just lots of error messages appearing at the same time, probably caused by some other plugin).

I have just catched that, during appending text in the middle of existing line, no line was removed, no line was added, it failed on line 365 (the line after final newline), and R-A thinks this offset is invalid. image

I'm not sure how to debug it (I don't know how to reproduce it), but maybe there is no final line in RA document representation after some changes, or it was never here, but this error is caused only when RA/client queries some information on final line offset? Or just some off-by-one error in neovim LSP client/RA itself. 8814 is the offset after this final newline, file is 8814 bytes long, and there is no non-ASCII character inside.

Veykril commented 3 months ago

Okay that confirms my suspicion that one side of this here is wrong about the last line. Are these happening when you edit the file? Or just browsing? ~~If the latter this is certainly a client bug as line 365 does not exist in that document. ~~ Ah wait, your editor is just not rendering a line number for the last empty line. Then this seems weird ... Can you attach some logs (specifically backtraces of the panics) the next time you run into those?

CertainLach commented 3 months ago

Huh, I think I discovered something even funnier on neovim(?) side, now I'm wondering what information I can deduce from that behavior.

https://github.com/rust-lang/rust-analyzer/assets/6235312/e9ad4133-3e5e-4177-9c45-011d21105868

I have two windows open side by side, in one I have buffer of 898 lines, in other I have 756 lines. Saving 756-lines buffer for some reason triggers invalid offset error with the last line number of other buffer.

I don't think it is the same error I have found earlier, but today I have seen invalid offset multiple times on the same project (I haven't seen any problems with it earlier, but today I have merged couple of pretty big repositories without changing any versions, and here I am.), and I wonder if they might have the same cause.

I don't see any panics in R-A logs, but I think this is something on neovims side, because in LSP every change has document id, and races like that should not happen.

I have no idea what happened, but right now rust-analyzer lsp is completely broken and looks like its pulling information from other buffers, but applying them to current (Tried to use code actions). In the logs, I only see many unrelated ERROR hir_ty::mir: Only tuple has tuple field

What's strange, is that errors are displayed in the correct buffer

I believe I hit https://github.com/neovim/neovim/issues/28575, will try on newer neovim.

Veykril commented 3 months ago

Right there shouldn't be any backtraces, this is not a panic but a general error being bubbled up back to the client.

but I think this is something on neovims side, because in LSP every change has document id, and races like that should not happen.

It has to be, otherwise we'd observe this in other clients as well. Might be good to see if an older neovim doesn't have this problem

chaozwn commented 2 months ago

I've found that reproduce this problem is when we take an rs file with content, delete it all, and save it. I can repeat the error

greensegfault commented 2 months ago

I have the same error with latest stable neovim, mason, and rust-analyzer. $ cargo new helloworld, $ edit the src/main.rs and start deleting all lines, and it will start getting into a error flooding these errors and making it hard to navigate in nvim.

rust-analyzer: -32603: Invalid offset LineCol { line: 5, col: 0 } (line index length: 16)
Press ENTER or type command to continue

Is there any work around / fix to this issue?

OliverChao commented 2 months ago

I've found that reproduce this problem is when we take an rs file with content, delete it all, and save it. I can repeat the error

Correct, I encounter this bug as well. Is there any method to fix it?

greensegfault commented 2 months ago

Too critical to me when basic dev tooling brakes, so I switches to Helix for now. It worked out of the box with minor config.

Veykril commented 2 months ago

I have no knowledge about neovim/mason, so I'd recommend someone who has the problem in here to open an issue regarding that for them (as I don't believe anyone here has done so yet).

chaozwn commented 2 months ago

I have tested neovim 0.11 and currently there is no such problem. This seems to be the problem of neovim

BenjaminLawson commented 2 months ago

Possibly related to https://github.com/neovim/neovim/issues/19237

OliverChao commented 2 months ago

I have tested neovim 0.11 and currently there is no such problem. This seems to be the problem of neovim

@chaozwn, I have tried neovim 0.11, but it still exists. Maybe that occurs in some long file after deleting all content.

bnchi commented 2 months ago

I had that exact same error on a non empty file and it was due to cachePriming config being turned off, I enabled it back on and the error isn't showing anymore

wojciech-kulik commented 2 months ago

Try it: https://github.com/neovim/neovim/issues/19237 and let me know if this workaround works for you.

dlyongemallo commented 2 months ago

I tried rust-analyzer -V in the terminal

I just wanted to point out, for people using neovim + mason (under Linux), that the rust-analyzer installed by mason is a different one than the one installed by rustup (which is typically the one accessed through the terminal).

You can find the version installed by mason by opening ":Mason" inside neovim: image

If you type :!which rust-analyzer into neovim command line, you should get something like /home/[username]/.local/share/nvim/mason/bin/rust-analyzer. Typing :!rust-analyzer -V should give you a version like rust-analyzer 0.3.2037-standalone. The version number will match the release tag, e.g., 2024-07-15 (v0.3.2037):

image

If instead you run rust-analyzer from the terminal (outside of neovim), you get the version installed by rustup, which is typically older. For example, for me, which rust-analyzer results in /home/[username]/.cargo/bin/rust-analyzer and rust-analyzer -V gives rust-analyzer 1.79.0 (129f3b9 2024-06-10).

If you're using rust-analyzer only from within neovim + mason, and don't have a reason to run rust-analyzer independently outside of that setting, I'd recommend not installing (or uninstalling) the rustup version so there's no confusion. (And if you do need to run it outside neovim, I'd suggest using a symlink from the mason-installed version instead of installing a conflicting version from rustup. Having two different versions of rust-analyzer installed on one system can lead to subtle problems.)

SuXYIO commented 2 months ago

I got the same issue, but seems to only trigger when i quickly delete a tab and a newline. NO idea about why.

liketoeatcheese commented 2 months ago

It's actually a bug in Neovim version 10 and above. I'm not sure why it happened, though. I switched back to Neovim version 9.5, and there's no issue.

I suggest using bob to easily manage the version of neovim so you can test it later on when it's fixed.

uptudev commented 2 months ago

Potential Fix

Mason downloads rust-analyzer version 0.35 on my system, while rustup downloads version 1.80. This is most likely an issue with Mason specifically and not Neovim, as using the updated binary fixes the issue on my end. YMMV as always, but given that's a massively out of date binary, I imagine it's a compatibility issue with the old rust-analyzer binary and newer LSP protocols.

Check Mason's rust-analyzer version

~/.local/share/nvim/mason/bin/rust-analyzer --version

If this is an older version, proceed with the following:

Download the newest rust-analyzer version via rustup

rustup component add rust-analyzer

This will download the newest version, which can be found in ~/.cargo/bin/rust-analyzer. Now remove the one Mason downloaded at ~/.local/share/nvim/mason/bin/rust-analyzer via an rm call as follows, then create a symlink to the new one from rustup:

Create symlink to rustup version

rm ~/.local/share/nvim/mason/bin/rust-analyzer
ln -s ~/.cargo/bin/rust-analyzer ~/.local/share/nvim/mason/bin/rust-analyzer

This will likely need to be repeated if you update rust-analyzer through Mason. Consider creating a shell script with the second snippet to run in case of update.

In the case that this resolves the issue for everyone, this is not an issue for this repo, but williamboman/mason.nvim.

dlyongemallo commented 2 months ago

out of date binary

I just wanted to point out that, annoyingly, the version numbering system used by rust-analyzer differs between mason and rustup and aren't directly comparable like that. For example, as you can see from my comment above, mason's v0.3.2037 is dated 2024-07-15, while rustup's 1.79.0 is dated 2024-06-10, so 0.3 is actually newer than 1.79.

I've already tried symlinking to 1.79 (similar to your suggestion), and it produced the same error but with a differently worded error message. If someone has time (which I don't at the moment), it should be possible to use bisection to figure out when the error was introduced. But on my system, at least, it's the newest version of rustup which has this error. (The error reproduces at the head of the rust-analyzer repo.)

uptudev commented 2 months ago

This only makes this error more confusing.

It should be noted that I only had this error occur after migrating my system from Fedora to Arch, and it worked perfectly fine on Fedora. This makes me think it could be an issue related to system library implementations within either nvim, Mason, or rust-analyzer which produce unintentional errors on some systems.

The sheer inconsistency with which solutions work for users here may indicate multiple points of failure, as while patching rust-analyzer works for some (indicating it's an error with Mason's version) it doesn't for others (indicating an error with the LSP framework).

This is why I'm thinking it must be a low-level dependency issue which is heavily dependent on system configuration and shared between them all, explaining the inconsistency. This is purely conjecture, but it's the first place I'd check and unit test.

I tried forcing a different UTF character length in my lspconfig as recommended by some users, but then rust-analyzer gave no output at all.

tomtomjhj commented 2 months ago

It seems that both neovim and rust-analyzer have some issues. Here is what I found, but I wouldn't have enough time to investigate further.

environment

reproduction step: open main.rs, wait until indexing and etc finishes, then ggdG.

Then you will get something like this in nvim's lsp log file

messages ``` Panic context: request: textDocument/inlayHint InlayHintParams { ... range: Range { start: Position { line: 0, character: 0, }, end: Position { line: 3, character: 0, }, }, } ... LineIndex { index: LineIndex { newlines: [], line_wide_chars: {}, len: 0, }, endings: Unix, encoding: Wide( Utf16, ), } 2: rust_analyzer::lsp::from_proto::offset::{{closure}} at ./crates/rust-analyzer/src/lsp/from_proto.rs:38:9 3: core::option::Option::ok_or_else at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:1236:25 4: rust_analyzer::lsp::from_proto::offset at ./crates/rust-analyzer/src/lsp/from_proto.rs:37:21 5: rust_analyzer::lsp::from_proto::text_range at ./crates/rust-analyzer/src/lsp/from_proto.rs:49:15 6: rust_analyzer::lsp::from_proto::file_range_uri at ./crates/rust-analyzer/src/lsp/from_proto.rs:85:17 7: rust_analyzer::lsp::from_proto::file_range at ./crates/rust-analyzer/src/lsp/from_proto.rs:75:5 8: rust_analyzer::handlers::request::handle_inlay_hints at ./crates/rust-analyzer/src/handlers/request.rs:1561:40 ```

This issue can be fixed with the following patch to nvim.

diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 59ae3beae..0615c5da1 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -2145,7 +2145,7 @@ local function make_line_range_params(bufnr, start_line, end_line, offset_encodi
   ---@type lsp.Position
   local end_pos

-  if end_line == last_line and not vim.api.nvim_get_option_value('endofline', { buf = bufnr }) then
+  if end_line == last_line then
     end_pos = {
       line = end_line,
       character = M.character_offset(bufnr, end_line, #get_line(bufnr, end_line), offset_encoding),

(Or alternatively, rust-analyzer could be modified to gracefully handle the last line eol.)

update: the following is invalid. see https://github.com/rust-lang/rust-analyzer/issues/17289#issuecomment-2255637976


outdated Now repeat the same repro steps. Then you will get a similar error with slightly different contents:
messages ``` "rpc.receive" { id = 10, jsonrpc = "2.0", method = "workspace/inlayHint/refresh" } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 9, jsonrpc = "2.0", result = vim.NIL } "server_request" "workspace/inlayHint/refresh" nil "server_request: found handler for" "workspace/inlayHint/refresh" "default_handler" "workspace/inlayHint/refresh" { ctx = '{\n client_id = 1,\n method = "workspace/inlayHint/refresh"\n}' } "LSP[rust-analyzer]" "client.request" 1 "textDocument/inlayHint" { range = { ["end"] = { character = 1, line = 2 }, start = { character = 0, line = 0 } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs" } } 1 "rpc.send" { id = 4, jsonrpc = "2.0", method = "textDocument/inlayHint", params = { range = { ["end"] = { character = 1, line = 2 }, start = { character = 0, line = 0 } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs" } } } "rpc.receive" { id = 21, jsonrpc = "2.0", method = "workspace/inlayHint/refresh" } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 19, jsonrpc = "2.0", result = vim.NIL } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 20, jsonrpc = "2.0", result = vim.NIL } "server_request" "workspace/inlayHint/refresh" nil "server_request: found handler for" "workspace/inlayHint/refresh" "default_handler" "workspace/inlayHint/refresh" { ctx = '{\n client_id = 1,\n method = "workspace/inlayHint/refresh"\n}' } "LSP[rust-analyzer]" "client.request" 1 "textDocument/inlayHint" { range = { ["end"] = { character = 1, line = 2 }, start = { character = 0, line = 0 } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs" } } 1 "rpc.send" { id = 5, jsonrpc = "2.0", method = "textDocument/inlayHint", params = { range = { ["end"] = { character = 1, line = 2 }, start = { character = 0, line = 0 } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs" } } } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 21, jsonrpc = "2.0", result = vim.NIL } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 22, jsonrpc = "2.0", result = vim.NIL } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 23, jsonrpc = "2.0", result = vim.NIL } "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { ["end"] = { character = 0, line = 3 }, start = { character = 0, line = 0 } }, rangeLength = 45, text = "" } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs", version = 4 } } } "rpc.receive" { id = 25, jsonrpc = "2.0", method = "workspace/inlayHint/refresh" } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 24, jsonrpc = "2.0", result = vim.NIL } "server_request" "workspace/inlayHint/refresh" nil "server_request: found handler for" "workspace/inlayHint/refresh" "default_handler" "workspace/inlayHint/refresh" { ctx = '{\n client_id = 1,\n method = "workspace/inlayHint/refresh"\n}' } "LSP[rust-analyzer]" "client.request" 1 "textDocument/inlayHint" { range = { ["end"] = { character = 0, line = 0 }, start = { character = 0, line = 0 } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs" } } 1 "rpc.send" { id = 10, jsonrpc = "2.0", method = "textDocument/inlayHint", params = { range = { ["end"] = { character = 0, line = 0 }, start = { character = 0, line = 0 } }, textDocument = { uri = "file:///home/user/apps/neovim/bug/src/main.rs" } } } "server_request: callback result" { result = vim.NIL, status = true } "rpc.send" { id = 25, jsonrpc = "2.0", result = vim.NIL } "rpc.receive" { error = { code = -32801, message = "content modified" }, id = 7, jsonrpc = "2.0" } "rpc.receive" { error = { code = -32801, message = "content modified" }, id = 9, jsonrpc = "2.0" } "rpc.receive" { error = { code = -32801, message = "content modified" }, id = 6, jsonrpc = "2.0" } "codelens" { code = -32801, message = "content modified", = { __tostring = } } ... Panic context: > version: 0.0.0 (3cf17dc 2024-07-28) request: textDocument/inlayHint InlayHintParams { range: Range { start: Position { line: 0, character: 0, }, end: Position { line: 2, character: 1, }, }, } Invalid offset LineCol { line: 2, col: 1 } (line index length: 0) LineIndex { index: LineIndex { newlines: [], line_wide_chars: {}, len: 0, }, endings: Unix, encoding: Wide( Utf16, ), } ```
What happens here is that * There is an ongoing inlayHint request with ``` range = { ["end"] = { character = 1, line = 2 }, start = { character = 0, line = 0 } } ``` that was sent at the beginning * the user executes `ggdG`, and the change is sent via didChange * rust-analyzer processes the old inlayHint, which references the position that does not exist anymore This is odd because rust-analyzer is using some form of snapshot for global state, which would prevent such issues. So it seems either * there is some mistake in the implementation of the snapshot, e.g., shallow copy instead of deep copy or * the order of requests is not preserved.
uptudev commented 2 months ago

@tomtomjhj so it's either a race condition in the global state, causing request order to get messed up, or a copy/clone error. This checks out, as my prior fix I gave earlier only works until reboot, and even then is inconsistent, making me think my method isn't effective and the erroneous code is still in HEAD.

I'll patch my version when I get home and report back if it fixes the bug on my end as well. Thank you so much for such thorough investigation!

tomtomjhj commented 2 months ago

Updates to my comment above:

Please ignore the stuff below this line

Then you will get a similar error with slightly different contents

This is not an actual bug, and is just caused by the artificial panic I added in the above patch for rust-analyzer. It seems rust-analyzer does handle stale requests properly, and patching nvim only seems to fix the original issue.

Might be related: https://github.com/neovim/neovim/issues/27383.

I'll send PR to nvim after some more testing.

tomtomjhj commented 2 months ago

Found a more fundamental issue in nvim where it desyncs with the server when the buffer becomes empty. Please try the fix: https://github.com/neovim/neovim/pull/29904.

But this doesn't eliminate all Invalid offset LineCol { ... } errors. When you do ggdG when rust-analyzer is indexing, the inlay hint handler raises the Invalid offset error while processing an old request that references a stale position that is outside the buffer. But edits after indexing seem to work fine, so syncing is probably good. So I believe this is an actual race in rust-analyzer.

Whax commented 2 months ago

Hello,

@tomtomjhj thanks for your work. I tried your fix :)

NVIM v0.11.0-dev-522+g619d005ac
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189
Run "nvim -V1 -v" for more info

Note it happens only the first time I open the file. If I restore the code, save it again, delete, save => I don't have the problem anymore

tomtomjhj commented 2 months ago

https://github.com/rust-lang/rust-analyzer/pull/17742 fixed the remaining issue. For other requests, rust-analyzer has been correctly reporting errors due to invalid offset as "content modified" error, which is ignored by the client UI. However, inlay hint handler in the versions prior to #17742 reported it as an internal error (which is shown to the user) because inlay hint request was marked as retry-able. #17742 fixes this by marking it as not retry-able.

radutomy commented 6 days ago

I am still have this error even though I have the most recent version of rust-analyzer installed via rustup and NVIM is picking it up.

:!which rust-analyzer -v /root/.cargo/bin/rust-analyzer

:!rust-analyzer -V rust-analyzer 1.81.0 (eeb90cd 2024-09-04)

I do NOT have rust-analyzer installed via Mason:

:Mason

Language Filter: press <C-f> to apply filter

  Installed
    ◍ bash-language-server bashls
    ◍ codelldb
    ◍ lua-language-server lua_ls
    ◍ shellcheck
    ◍ shfmt
    ◍ stylua
    ◍ taplo

However, when saving a file I still get these errors (disregard the circles I drew, they're not related to this issue)

Image