Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:RustLsp ssr: Cannot find delimiter ==>> #104

Closed
adaszko opened this issue Dec 20, 2023 · 5 comments · Fixed by #106
Closed

:RustLsp ssr: Cannot find delimiter ==>> #104

adaszko opened this issue Dec 20, 2023 · 5 comments · Fixed by #106
Assignees
Labels
bug Something isn't working

Comments

@adaszko
Copy link

adaszko commented Dec 20, 2023

Neovim version (nvim -v)

v0.9.4

Operating system/version

macOS

Output of :checkhealth rustaceanvim

rustaceanvim: require("rustaceanvim.health").check()
Checking for Lua dependencies
- OK [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) installed.
Checking external dependencies
- OK rust-analyzer: found rustup 1.26.0 (5af9b9484 2023-04-05)
- OK Cargo: found cargo 1.74.0
- OK rustc: found rustc 1.74.0 (79e9716c9 2023-11-13) (Homebrew)
- OK debug adapter: found codelldb
Checking config
- OK No errors found in config.
Checking for conflicting plugins
- OK No conflicting plugins detected.

How to reproduce the issue

  1. Create a Rust project with this code:
fn bar(x: usize) -> usize {
    return x + 321;
}

fn baz(y: usize) -> usize {
    return y - 321;
}

fn main() {
    let foo = bar(123);
    println!("Hello, world! {}", foo);
}
  1. Execute: :RustLsp ssr bar($a) ==>> baz($a)

Expected behaviour

bar(123) gets replaced with baz(123).

Actual behaviour

Error executing vim.schedule lua callback: ...inpac/opt/rustaceanvim/lua/rustaceanvim/commands/ssr.lua:13: Could not execute request to server: Parse error: Cannot find delimiter `=
=>>`
stack traceback:
        [C]: in function 'error'
        ...inpac/opt/rustaceanvim/lua/rustaceanvim/commands/ssr.lua:13: in function 'handler'
        ...w/Cellar/neovim/0.9.4/share/nvim/runtime/lua/vim/lsp.lua:1393: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

The minimal config used to reproduce this issue.

Default config should trigger the issue.
@adaszko adaszko added the bug Something isn't working label Dec 20, 2023
@adaszko
Copy link
Author

adaszko commented Dec 20, 2023

I never could get this feature working with rust-tools either, so the bug might likely got inherited from it.

Also: SSR works under VSCode with rust-analyzer.

@adaszko adaszko changed the title RustLsp ssr errors out RustLsp ssr: Cannot find delimiter ==>> Dec 20, 2023
@adaszko adaszko changed the title RustLsp ssr: Cannot find delimiter ==>> :RustLsp ssr: Cannot find delimiter ==>> Dec 20, 2023
@adaszko adaszko changed the title :RustLsp ssr: Cannot find delimiter ==>> :RustLsp ssr: Cannot find delimiter ==>> Dec 20, 2023
@mrcjkb mrcjkb self-assigned this Dec 20, 2023
@mrcjkb
Copy link
Owner

mrcjkb commented Dec 20, 2023

Thanks for reporting 😄

I have a fix in the pipeline.

@adaszko
Copy link
Author

adaszko commented Dec 20, 2023

🚀 🚀 🚀 😄

@mrcjkb
Copy link
Owner

mrcjkb commented Dec 20, 2023

tty

@mrcjkb mrcjkb linked a pull request Dec 20, 2023 that will close this issue
@adaszko
Copy link
Author

adaszko commented Dec 20, 2023

Fantastic! Works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants