1
Fork 0

Sketch out lazy.nvim nix interface

This commit is contained in:
Matei Adriel 2023-12-02 06:04:57 +01:00
parent c54f974a8c
commit 91eb12343c
No known key found for this signature in database
5 changed files with 404 additions and 61 deletions
home/features/neovim/config/lua/my

View file

@ -1,46 +1,53 @@
local M = {}
local function importFrom(p)
return { import = p }
end
function M.setup()
require("lazy").setup("my.plugins", {
defaults = { lazy = true },
install = {
-- install missing plugins on startup. This doesn't increase startup time.
missing = true,
-- try to load one of these colorschemes when starting an installation during startup
colorscheme = { "rose-pine", "catpuccin" },
},
change_detection = {
enabled = false,
notify = false,
},
dev = {
-- Fallback to git when local plugin doesn't exist
fallback = true,
require("lazy").setup(
{ importFrom("my.plugins"), importFrom("nix.plugins") },
{
defaults = { lazy = true },
install = {
-- install missing plugins on startup. This doesn't increase startup time.
missing = true,
-- try to load one of these colorschemes when starting an installation during startup
colorscheme = { "rose-pine", "catpuccin" },
},
change_detection = {
enabled = false,
notify = false,
},
dev = {
-- Fallback to git when local plugin doesn't exist
fallback = true,
-- Directory where I store my local plugin projects
path = "~/Projects",
-- Directory where I store my local plugin projects
path = "~/Projects",
patterns = { "Mateiadrielrafael" },
},
performance = {
rtp = {
paths = {
-- Extra runtime path specified by nix
os.getenv("NVIM_EXTRA_RUNTIME") or "",
},
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
patterns = { "Mateiadrielrafael" },
},
performance = {
rtp = {
paths = {
-- Extra runtime path specified by nix
os.getenv("NVIM_EXTRA_RUNTIME") or "",
},
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
},
})
}
)
end
vim.keymap.set("n", "<leader>L", "<cmd>Lazy<cr>", { desc = "[L]azy ui" })

View file

@ -1,20 +0,0 @@
local env = require("my.helpers.env")
local M = {
"kyazdani42/nvim-tree.lua",
cmd = "NvimTreeToggle",
config = true,
cond = env.vscode.not_active() and env.firenvim.not_active(),
}
function M.init()
-- Toggle nerdtree with Control-n
vim.keymap.set(
"n",
"<C-n>",
":NvimTreeToggle<CR>",
{ desc = "Toggle [n]vim-tree" }
)
end
return M