Skip to content

a meta package manager for neovim that manages lsp, formatter, linter, and any package you can think of

License

Notifications You must be signed in to change notification settings

ingenarel/metapack.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ever installed plugins using mason and thought "Hmm... I wish I could just use my system package manager for this too" Well say no more my dear cause metapack.nvim is here!

YouTube Video

What metapack.nvim is:

metapack.nvim isn't a plugin manager. It's a meta plugin manager. It doesn't install the plugins directly. Instead, it first tries to use your system package manager, if it can, then it tries to install it from that. And if it doesn't, it tries to use mason as fallback

Usage:

Using lazy.nvim:
    {
        "ingenarel/metapack.nvim",
        dependencies = {
            {
                "williamboman/mason.nvim", -- optional if you want mason support
                config = true,
            },
            {
                "ingenarel/smart-term.nvim", -- terminal plugin that i made to use with my other plugins
                config = true,
            },
            {
                "ingenarel/luix.nvim", --optional if you want nix support
            },
            {
                "ingenarel/luse.nvim", --optional if you want gentoo use flags support
            }
        },
        config = function()
            require("metapack").setup{
                ensure_installed = {
                    --lsp
                    "pyright", -- package could be string for simple use
                    "clangd",
                    {
                        gentoo {"lua-language-server", mason = true},
                        arch = { "lua-language-server-git", aur = true, execName = "lua-language-server" }
                        default = "lua-language-server"
                    },
                    --[[ tables should have a default name for the package
                    you can specify os based configs too,
                    available values are:
                        gentoo
                        arch
                        debian (should work on most debian based distros)
                        nixos
                    the OS is set by reading /etc/os-release

                    available values for each table are:
                        the first item should be the name of the package
                        mason: if it should be installed with mason
                        portage: if it should be installed with mason
                        pacman: if it should be installed with mason
                        aur: if it should be installed with an aur helper
                        nix: if it should be installed with nix
                        execName: the executable name
                    --]]
                    "bash-language-server",
                    "termux-language-server",
                    "ltex-ls",
                    "yaml-language-server",
                    --lsp
                    --dap
                    "codelldb",
                    "debugpy",
                    --dap
                    --formatter
                    "black",
                    "stylua",
                    "clang-format",
                    "beautysh",
                    --formatter
                }
            }
        end,
    }

You can take a look at my current setup here

Tips:

Using doas

Metapack works with sudo when trying to interact with your package manager. But it can also use doas.

    require("metapack").setup{
        ensure_installed =(
            {
                --packages
            },
            doas = true
        }

UI:

Main Menu Packages

NOTE: The images might not be the accurate representation of the current UI, since it's heavily in development

There is currently a work in progress UI, you can call it in two different ways:

Use the command:

    :Metapack

Or call the Lua function

    require("metapack.utils.ui.draw").showUI()

Current package manager support:

GOALS:

Implement these package managers:
  • building from source
  • cargo
  • dnf
  • luarocks
  • npm
  • pip
  • scoop
  • apt
  • yay
  • pacman
  • paru
Implement these features
  • Specifying:

    • version
    • commit hash
    • operating system / Linux distro
    • package manager
  • Features:

    • A logger for managing, cleaning, deleting and updating packages.
    • Actually implement the cleaning, deleting and updating thing
    • Work with gentoo USE flags some stuff in gentoo, like codelldb and clang-format, are not separate packages, but instead they are USE flags in the clang package

TODOS:

  • add cleanup functions

About

a meta package manager for neovim that manages lsp, formatter, linter, and any package you can think of

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published