Skip to content

Commit

Permalink
chore: make minor cleanups, update modules list line in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Sep 11, 2024
1 parent f74a3ad commit fd20230
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions lua/nxvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<path>"` to go to its location

-- Core ----------------------------------------------------------------------
{ dir = "nxvim/colorschemes", priority = 90, config = "colorschemes", eager = true },
{ dir = "nxvim/client", priority = 95, config = "client", eager = true },
Expand Down Expand Up @@ -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 ===========================================
Expand Down Expand Up @@ -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/" },
Expand All @@ -282,11 +283,11 @@ lazy.setup(modules, {

-- == [ Events ================================================================

-- Add path for easy `gf` to the config file of a plugin in `get "<plugins.pluginname">` 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,
Expand Down

0 comments on commit fd20230

Please sign in to comment.