You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 10 Version 22H2 OS Build 19045.3448 - WSL2 - Ubuntu 22.04.3 LTS
Describe the bug
neodev inconsistently calls optional override function. This occurs for all target directories that neodev would be expected to run in:
repro-neodev-inconsistencies.mp4
It is worth noting that my nvim config directory is symlinked to ~/.dotfiles/.nvim/
In every case where the override function is not called, checking :LspInfo shows that lua_ls did get attatched.
neodev still works in the standard /lua directories when the override function is not called, just not in my ~/.dotfiles/.nvim/, as one would expect.
lspconfig lua_ls settings:
lspconfig.lua_ls.setup({
capabilities=capabilities,
on_attach=on_attach,
settings= { -- custom settings for luaLua= {
-- make the language server recognize "vim" globaldiagnostics= {
globals= { "vim" },
},
hint= { enable=true },
workspace= {
-- make language server aware of runtime fileslibrary= {
[vim.fn.expand("$VIMRUNTIME/lua")] =true,
[vim.fn.stdpath("config") .."/lua"] =true,
},
checkThirdParty=false,
},
},
},
})
Just wanted to end by thanking you for making neodev! I really appreciate all the incredible plugins you've made; neodev is great too, and will be even better for me if I can fix these inconsistency issues!
Steps To Reproduce
Open neovim in a directory and wait for neodev to call its override function.
Test for snippet completion (vim.api.nvim_create...)
Expected Behavior
I assumed that once I had setup neodev, it would apply itself on every instance of nvim opening in the appropriate directories
Repro
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
'nvim-lua/plenary.nvim',
{
"folke/neodev.nvim",
config=function()
print("calling config fn")
require("neodev").setup({
override=function(root_dir, library)
print(root_dir)
ifroot_dir:find("dotfiles") thenprint("inside check")
library.enabled=truelibrary.plugins=trueendend
})
end
},
{
"neovim/nvim-lspconfig",
event= { "BufReadPre", "BufNewFile" },
dependencies= {
"hrsh7th/cmp-nvim-lsp",
{ "antosha417/nvim-lsp-file-operations", config=true },
"williamboman/mason.nvim",
"folke/neodev.nvim",
},
config=function()
locallspconfig=require("lspconfig")
localcmp_nvim_lsp=require("cmp_nvim_lsp")
-- used to enable autocompletion (assign to every lsp server config)localcapabilities=cmp_nvim_lsp.default_capabilities()
-- Change the Diagnostic symbols in the sign column (gutter)localsigns= {
Error="E ",
Warn="W ",
Hint="H ",
Info="I "
}
fortype, iconinpairs(signs) dolocalhl="DiagnosticSign" ..typevim.fn.sign_define(hl, { text=icon, texthl=hl, numhl="" })
end-- configure lua server (with special settings)lspconfig.lua_ls.setup({
capabilities=capabilities,
on_attach=on_attach,
settings= { -- custom settings for luaLua= {
-- make the language server recognize "vim" globaldiagnostics= {
globals= { "vim" },
},
hint= { enable=true },
workspace= {
-- make language server aware of runtime fileslibrary= {
[vim.fn.expand("$VIMRUNTIME/lua")] =true,
[vim.fn.stdpath("config") .."/lua"] =true,
},
checkThirdParty=false,
},
},
},
})
vim.diagnostic.config({
virtual_text=true
})
end,
},
{
"williamboman/mason.nvim",
dependencies= {
"williamboman/mason-lspconfig.nvim",
},
config=function ()
localmason=require("mason")
localmason_lspconfig=require("mason-lspconfig")
mason.setup({})
-- server names found here: https://github.com/williamboman/mason-lspconfig.nvim#available-lsp-serversmason_lspconfig.setup({
ensure_installed= {
'lua_ls',
},
automatic_installation=true,
})
end,
},
{
"hrsh7th/nvim-cmp", -- completion pluginevent="InsertEnter",
dependencies= {
-- Autocompletion
{'hrsh7th/cmp-nvim-lsp'}, -- Required
{'hrsh7th/cmp-buffer'}, -- Optional
{'hrsh7th/cmp-path'}, -- Optional
{'saadparwaiz1/cmp_luasnip'}, -- Optional
{'hrsh7th/cmp-nvim-lua'}, -- Optional-- Snippets
{'L3MON4D3/LuaSnip'}, -- Required
{'rafamadriz/friendly-snippets'}, -- Optional
},
config=function ()
localcmp=require("cmp")
localluasnip=require("luasnip")
require("luasnip.loaders.from_vscode").lazy_load()
localcmp_keymaps= {
["<Tab>"] =cmp.mapping(function(fallback)
-- This little snippet will confirm with tab, and if no entry is selected, will confirm the first itemifcmp.visible() thenlocalentry=cmp.get_selected_entry()
ifnotentrythencmp.select_next_item({ behavior=cmp.SelectBehavior.Select })
cmp.confirm()
elsecmp.confirm()
endelsefallback()
endend, {"i","s"}),
["<C-j>"] =cmp.mapping.select_next_item({ behavior=cmp.SelectBehavior.Select }),
["<C-k>"] =cmp.mapping.select_prev_item({ behavior=cmp.SelectBehavior.Select }),
["<C-l>"] =cmp.mapping.complete(), -- [L]ist recommended
["<C-b>"] =cmp.mapping.scroll_docs(-4),
["<C-f>"] =cmp.mapping.scroll_docs(4),
["<C-n>"] =cmp.config.disable,
["<C-p>"] =cmp.config.disable,
}
cmp.setup({
mapping=cmp.mapping.preset.insert(cmp_keymaps),
completion= {
completeopt="menu,menuone,preview,noselect",
},
snippet= {
expand=function(args)
luasnip.lsp_expand(args.body)
end,
},
sources=cmp.config.sources({
{ name="nvim_lsp" },
{ name="luasnip" },
{ name="buffer" },
{ name="path" }
}),
})
end
}
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
The text was updated successfully, but these errors were encountered:
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.1 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3
Operating system/version
Windows 10 Version 22H2 OS Build 19045.3448 - WSL2 - Ubuntu 22.04.3 LTS
Describe the bug
neodev inconsistently calls optional
override
function. This occurs for all target directories that neodev would be expected to run in:repro-neodev-inconsistencies.mp4
It is worth noting that my nvim config directory is symlinked to
~/.dotfiles/.nvim/
In every case where the
override
function is not called, checking:LspInfo
shows thatlua_ls
did get attatched.neodev still works in the standard
/lua
directories when theoverride
function is not called, just not in my~/.dotfiles/.nvim/
, as one would expect.lspconfig lua_ls settings:
neodev config
Just wanted to end by thanking you for making neodev! I really appreciate all the incredible plugins you've made; neodev is great too, and will be even better for me if I can fix these inconsistency issues!
Steps To Reproduce
Expected Behavior
I assumed that once I had setup neodev, it would apply itself on every instance of nvim opening in the appropriate directories
Repro
The text was updated successfully, but these errors were encountered: