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

Single arg use of make_position_params is deprecated in nightly #219

Open
davepgreene opened this issue Nov 29, 2024 · 0 comments
Open

Single arg use of make_position_params is deprecated in nightly #219

davepgreene opened this issue Nov 29, 2024 · 0 comments

Comments

@davepgreene
Copy link

Describe the bug
The use of make_position_params in lsp.lua with the only argument being the window id has been deprecated in favor of the caller providing the positional encoding. See neovim/neovim#31249 for details.

To Reproduce
Minimal repro (bootstrapped via LazyVim's minimal for lsp installation, etc.)

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    {
      "RRethy/vim-illuminate",
    },
  },
})

Steps to reproduce the behavior (include minimal init.vim or .vimrc):

  1. nvim -u repro.lua repro.lua
  2. Wait until lazy.nvim installs plugins
  3. Press a key that invokes a move motion
  4. Note warning position_encoding param is required in vim.lsp.util.make_position_params. Defaulting to position encoding of the first client.

Output from :IlluminateDebug

buf_should_illuminate 12 true
config {
  case_insensitive_regex = false,
  delay = 100,
  filetype_overrides = {},
  filetypes_allowlist = {},
  filetypes_denylist = { "dirbuf", "dirvish", "fugitive" },
  min_count_to_highlight = 1,
  modes_allowlist = {},
  modes_denylist = {},
  providers = { "lsp", "treesitter", "regex" },
  providers_regex_syntax_allowlist = {},
  providers_regex_syntax_denylist = {},
  under_cursor = true
}
started true
provider table: 0x7fc7ebbf94d8 lsp
`termguicolors` true

Expected behavior
No warning appears

Additional context
I filed an issue with LazyVim as the issue originally showed up for me when using Folke's illuminate extra but they seemed pretty adamant that I reported it in the wrong place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant