Closed svenXY closed 3 months ago
my config:
return {
"nvim-neorg/neorg",
ft = "norg",
version = "v7.0.0",
cmd = { 'Neorg' },
dependencies = {
{ "nvim-lua/plenary.nvim" },
{"nvim-treesitter/nvim-treesitter"},
{"pysan3/pathlib.nvim"}, -- tried it here
{"nvim-neorg/neorg-telescope"},
},
build = ":Neorg sync-parsers",
config = function()
require('neorg').setup {
load = {
["core.defaults"] = {},
["core.summary"] = {},
["core.journal"] = { },
--[[ ["core.keybinds"] = {}, ]]
["core.concealer"] = {
config = {
icon_preset = "diamond",
},
}, -- Allows for use of icons
["core.dirman"] = { -- Manage your directories with Neorg
config = {
workspaces = {
private = "~/neorg/private",
},
default_workspace = "private",
autodetect = true,
autochdir = true,
}
},
["core.completion"] = {
config = {
engine = "nvim-cmp"
}
},
["core.integrations.telescope"] = {},
["core.keybinds"] = {
config = {
hook = function(keybinds)
keybinds.remap_event("norg", "n", "<leader>nf", "core.integrations.telescope.find_linkable" )
keybinds.remap_event("norg", "n", "<leader>nw", "core.integrations.telescope.switch_workspace")
keybinds.remap_event("norg", "i", "<C-i>", "core.integrations.telescope.insert_link")
end,
},
},
},
}
local autocmd = vim.api.nvim_create_autocmd -- Create autocommand
local augroup = vim.api.nvim_create_augroup -- Create autocommand
augroup('setNorgAutocmds', { clear = true })
autocmd('BufEnter', {
group = 'setNorgAutocmds',
pattern = 'index.norg',
command = 'set autochdir',
})
autocmd('BufRead', {
group = 'setNorgAutocmds',
pattern = '*.norg',
command = 'set foldlevelstart=2 conceallevel=1',
})
autocmd('BufLeave', {
group = 'setNorgAutocmds',
pattern = 'index.norg',
command = 'set noautochdir'
})
end
}
actually just adding it as a dependency like every other plugin should work but for some reason it doesn't are you sure it's loaded? because the error indicates it isn't
:Lazy says it's loaded
what happens if you do :lua =require"pathlib"
on the commandline?
Error 13:34:03 msg_show.lua_error require"pathlib" E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'pathlib' stack traceback: [C]: in function 'require' [string ":lua"]:1: in main chunk
do you also get this just after starting neovim? or only if you previously tried to use telescope? I'd expect the latter. If so you should do it without trying telescope first and then you should get a meaningful output.
Error 13:36:25 msg_show.lua_error require"pathlib" E5108: Error executing lua ...are/nvim/lazy/pathlib.nvim/lua/pathlib/utils/watcher.lua:23: module 'nio' not found: no field package.preload['nio'] cache_loader: module nio not found cache_loader_lib: module nio not found no file './nio.lua' no file '/Users/Sven.Hergenhahn/dev_other/neovim/.deps/usr/share/luajit-2.1/nio.lua' no file '/usr/local/share/lua/5.1/nio.lua' no file '/usr/local/share/lua/5.1/nio/init.lua' no file '/Users/Sven.Hergenhahn/dev_other/neovim/.deps/usr/share/lua/5.1/nio.lua' no file '/Users/Sven.Hergenhahn/dev_other/neovim/.deps/usr/share/lua/5.1/nio/init.lua' no file './nio.so' no file '/usr/local/lib/lua/5.1/nio.so' no file '/Users/Sven.Hergenhahn/dev_other/neovim/.deps/usr/lib/lua/5.1/nio.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' ...are/nvim/lazy/pathlib.nvim/lua/pathlib/utils/watcher.lua:23: in main chunk [C]: in function 'require' ....local/share/nvim/lazy/pathlib.nvim/lua/pathlib/base.lua:5: in main chunk [C]: in function 'require' ...local/share/nvim/lazy/pathlib.nvim/lua/pathlib/posix.lua:1: in main chunk [C]: at 0x0102a9e134 [C]: in function 'require' [string ":lua"]:1: in main chunk
NVIM v0.11.0-dev-314+g724d1110b Build type: Release LuaJIT 2.1.1716656478
System-vimrc-Datei: "$VIM/sysinit.vim"
Voreinstellung für $VIM: "/Users/me/neovim/share/nvim"
well that's because a dependency of pathlib is missing add https://github.com/nvim-neotest/nvim-nio and it should work
yes, it works now, thanks
Glad I could help
FWIW, shouldn't this be added to the documentation?
I don't think so tbh not needed to describe the dependency of a dependency of the repo of which this is just an extension here even more if that only matter if people use an old version of the main repo
Hi,
I'm still using neorg v7.0.0 and keep having problems with insert_link. As soon as I use the keymap or call the command, I'm getting the following:
I already tried to add the plugin to my config, but to no avail.
Anything I can do about it except migrating to v8?