This repository was archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
This repository was archived by the owner on Jul 6, 2024. It is now read-only.
bug: vim.iter is not found after https://github.com/neovim/neovim/pull/23303 #153
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Did you check docs and existing issues?
- I have read all the neodev.nvim docs
- I have searched the existing issues of neodev.nvim
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.10.0-dev-216+g4720f4379
Operating system/version
MacOS 13.1
Describe the bug
It won't complete methods on vim.iter
after this PR: neovim/neovim#23303
Before this, it would work correctly. Probably because it is a module now as well as a function. I also noticed that vim.version
also don't work which is the example in the PR of another module and function.
Steps To Reproduce
Use the repro-config and open a file lua file and try to get completion for vim.iter
or vim.version
.
Expected Behavior
I would expect it to complete all the functions on vim.iter
. Both the functions vim.iter.filter
, vim.iter.map
and all the others vim.iter({ 1, 2, 3 }):each(...)
etc...
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"neovim/nvim-lspconfig",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"L3MON4D3/LuaSnip",
"folke/neodev.nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
local cmp = require("cmp")
require("cmp").setup({
sources = {
{ name = "nvim_lsp" },
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-d>"] = cmp.mapping.scroll_docs(4),
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-Space>"] = cmp.mapping.complete({}),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
})
require("neodev").setup({})
local lspconfig = require("lspconfig")
-- example to setup lua_ls and enable call snippets
lspconfig.lua_ls.setup({
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
},
},
})
smjonas
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working