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

E116: Incompatible with traces.vim: Invalid arguments for function dictwatcherdel #35

Closed
fnune opened this issue May 14, 2023 · 9 comments
Labels
bug Something isn't working third-party issue

Comments

@fnune
Copy link

fnune commented May 14, 2023

Here's my setup:

-- using lazy.nvim
return {
  "smjonas/inc-rename.nvim",
  dependencies = { "stevearc/dressing.nvim" },
  config = function()
    local inc_rename = require("inc_rename")
    inc_rename.setup({ input_buffer_type = "dressing" })

    vim.keymap.set("n", "<leader>rn", function()
      return ":IncRename " .. vim.fn.expand("<cword>")
    end, { expr = true })
  end,
}

The keybinding puts me in command mode with :IncRename theword, but:

  1. No inc rename UI is visible in the buffer
  2. I get the following error message once I hit enter:
[inc-rename] An error occurred in the preview function. Please report this error here: https://github.com/smjonas/inc-rename.nvim/issues:
E116: Invalid arguments for function dictwatcherdel

Additionally, it leaves me in a weird state where I have to hit Ctrl-C for the error message to go away.

Neovim version:

 ~/.dotfiles => nvim --version
NVIM v0.9.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
@smjonas
Copy link
Owner

smjonas commented May 15, 2023

Thanks for reporting! Two questions:

  • In which file did you run the :IncRename command? Was your cursor placed on an LSP identifier? Feel free to add a screenshot.
  • What is the active language server for the buffer? Please tell me the output of :LspInfo.

@fnune
Copy link
Author

fnune commented May 18, 2023

Here are some screenshots:

image
image
image

Tried TS as well:
image

Output of :LspInfo in Python:

 Press q or <Esc> to close this window. Press <Tab> to view server doc.
 
 Language client log: /home/fausto/.local/state/nvim/lsp.log
 Detected filetype:   python
 
 3 client(s) attached to this buffer: 
 
 Client: pyright (id: 1, bufnr: [1, 44])
 	filetypes:       python
 	autostart:       true
 	root directory:  /home/fausto/Development/company
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/pyright-langserver --stdio
 
 Client: ruff_lsp (id: 2, bufnr: [1, 44])
 	filetypes:       python
 	autostart:       true
 	root directory:  /home/fausto/Development/company
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/ruff-lsp
 
 Client: null-ls (id: 3, bufnr: [1, 44, 77])
 	filetypes:       javascript, typescriptreact, typescript, vue, javascriptreact, python, go, lua, sh, json, sql, less, css, scss, sass, org, markdown, cpp, cs, c, proto, java, cuda, html, handlebars, yaml, markdown.mdx, jsonc, graphql, rust
 	autostart:       false
 	root directory:  /home/fausto/Development/company
 	cmd:             <function>
 
 2 active client(s) not attached to this buffer: 
 
 Client: tsserver (id: 4, bufnr: [77])
 	filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx
 	autostart:       true
 	root directory:  Running in single file mode.
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/typescript-language-server --stdio
 
 Client: eslint (id: 5, bufnr: [77])
 	filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx, vue, svelte, astro
 	autostart:       true
 	root directory:  Running in single file mode.
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/vscode-eslint-language-server --stdio
 
 Configured servers list: bashls, clangd, lua_ls, ruff_lsp, rust_analyzer, sqlls, taplo, tsserver, pyright, yamlls, jsonls, eslint

Output of :LspInfo in TS:

 Press q or <Esc> to close this window. Press <Tab> to view server doc.
 
 Language client log: /home/fausto/.local/state/nvim/lsp.log
 Detected filetype:   typescriptreact
 
 3 client(s) attached to this buffer: 
 
 Client: null-ls (id: 3, bufnr: [1, 44, 77])
 	filetypes:       javascript, typescriptreact, typescript, vue, javascriptreact, python, go, lua, sh, json, sql, less, css, scss, sass, org, markdown, cpp, cs, c, proto, java, cuda, html, handlebars, yaml, markdown.mdx, jsonc, graphql, rust
 	autostart:       false
 	root directory:  /home/fausto/Development/company
 	cmd:             <function>
 
 Client: tsserver (id: 4, bufnr: [77])
 	filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx
 	autostart:       true
 	root directory:  /home/fausto/Development/company/packages/company-app-frontend
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/typescript-language-server --stdio
 
 Client: eslint (id: 5, bufnr: [77])
 	filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx, vue, svelte, astro
 	autostart:       true
 	root directory:  /home/fausto/Development/company/packages/company-app-frontend/src
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/vscode-eslint-language-server --stdio
 
 2 active client(s) not attached to this buffer: 
 
 Client: pyright (id: 1, bufnr: [1, 44])
 	filetypes:       python
 	autostart:       true
 	root directory:  /home/fausto/Development/company
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/pyright-langserver --stdio
 
 Client: ruff_lsp (id: 2, bufnr: [1, 44])
 	filetypes:       python
 	autostart:       true
 	root directory:  /home/fausto/Development/company
 	cmd:             /home/fausto/.local/share/nvim/mason/bin/ruff-lsp
 
 Configured servers list: bashls, clangd, lua_ls, ruff_lsp, rust_analyzer, sqlls, taplo, tsserver, pyright, yamlls, jsonls, eslint

@smjonas smjonas added the bug Something isn't working label May 19, 2023
@smjonas
Copy link
Owner

smjonas commented May 19, 2023

I was able to reproduce the error using your Nvim config, however I have no idea which plugin might be causing this. You could use binary search to disable a set of plugins until the variable is renamed, i.e. the highlights are shown - unfortunately, I don't have time for this :) (A bisect feature for lazy.nvim would be nice for this btw).

@fnune
Copy link
Author

fnune commented May 19, 2023

When you say "your Nvim config", do you mean what I pasted in here or my full config from my dotfiles? 😅

Sorry, didn't want you to go into so much trouble. I might have some time to help debug further this weekend.

@smjonas
Copy link
Owner

smjonas commented May 19, 2023

I meant your Nvim config (https://github.com/fnune/dotfiles/tree/master/neovim/.config/nvim). Thanks for looking into this!

@fnune
Copy link
Author

fnune commented May 21, 2023

Found it! The incompatible plugin is https://github.com/markonm/traces.vim

Disabling it fixes this issue.

Sorry to have prompted you to spend your time on this. At least it's some documentation here.

@fnune fnune changed the title E116: Invalid arguments for function dictwatcherdel E116: Incompatible with traces.vim: Invalid arguments for function dictwatcherdel May 21, 2023
@fnune fnune closed this as completed May 21, 2023
@smjonas
Copy link
Owner

smjonas commented May 21, 2023

I'm glad you found the issue!

Sorry to have prompted you to spend your time on this. At least it's some documentation here.

No worries at all, it was a valid bug report :)

@twnaing
Copy link

twnaing commented Nov 25, 2023

I also experienced the same issue.

Spent better part of an hour to work. Glad I found this.

It is a known issue now.

@smjonas
Copy link
Owner

smjonas commented Nov 25, 2023

I also experienced the same issue.

@twnaing Glad you found this issue. I will add a check whether traces.vim is installed to warn other users of this incompatibility

@smjonas smjonas reopened this Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working third-party issue
Projects
None yet
Development

No branches or pull requests

3 participants