diff --git a/.github/README.md b/.github/README.md index 2f53d9e..acfa991 100644 --- a/.github/README.md +++ b/.github/README.md @@ -180,4 +180,4 @@ This means the GPL limitations do not apply when the configuration is used witho [40]: https://github.com/kovidgoyal/kitty [50]: https://github.com/tobealive/dots/tree/tooltime/.config/kitty [60]: https://github.com/neovide/neovide/ -[70]: https://github.com/tenxsoydev/nxvim/blob/main/lua/nxvim/init.lua#L15 +[70]: https://github.com/tenxsoydev/nxvim/blob/main/lua/nxvim/init.lua#L13 diff --git a/lua/nxvim/init.lua b/lua/nxvim/init.lua index 7539e42..7728d41 100644 --- a/lua/nxvim/init.lua +++ b/lua/nxvim/init.lua @@ -10,8 +10,9 @@ vim.g.multigrid = vim.api.nvim_list_uis()[1].ext_multigrid ---@field eager? boolean ---@type string[]|NxModule[] --- tip: use `gf` over a `config` string to go to a config file|directory local modules = { + -- Tip: use `gf` over a `config = ""` to go to its location + -- Core ---------------------------------------------------------------------- { dir = "nxvim/colorschemes", priority = 90, config = "colorschemes", eager = true }, { dir = "nxvim/client", priority = 95, config = "client", eager = true }, @@ -229,6 +230,9 @@ local modules = { -- "tiagovla/scope.nvim", -- scope buffers to tabs -- "nvim-telescope/telescope-file-browser.nvim", } + +-- Problem childs that need to be loaded outside of `lazy.setup` +require("nxvim.plugins.visual-multi") -- resolves global variable settings (e.g. `vim.g.VM_map`) not working. -- ] -- == [ Transform to LazySpec Table =========================================== @@ -271,9 +275,6 @@ end -- == [ Load Setup ============================================================ --- Problem childs that need to be loaded outside of `lazy.setup` -require("nxvim.plugins.visual-multi") -- `VM_maps` config won't work otherwise afaik - lazy.setup(modules, { ui = { border = "rounded" }, dev = { path = "~/Dev/VIM/plugins/" }, @@ -282,11 +283,11 @@ lazy.setup(modules, { -- == [ Events ================================================================ --- Add path for easy `gf` to the config file of a plugin in `get "` functions above nx.au({ "BufEnter", pattern = { vim.fn.stdpath("config") .. "*/init.lua" }, callback = function() + -- Allow `gf` to the config file of a plugin in the module list above vim.opt_local.path = { ",,", vim.fn.stdpath("config") .. "/lua/nxvim/" } vim.cmd("setlocal inex=tr(v:fname,'.','/')") end,