Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 83 additions & 126 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,144 +1,101 @@
<p align="center">
<img width="256" height="256" src="https://user-images.githubusercontent.com/27810360/190279839-f6685b5f-4c56-41b3-b1b5-a8768cc52fb6.gif">
</p>
# rocks-tui.nvim

<div align="center">
**A Terminal User Interface (TUI) for `rocks.nvim` to enhance Neovim plugin management.**

[![APACHEv3 license](https://img.shields.io/badge/License-APACHEv2-red.svg?style=flat-square)](https://github.com/Pakrohk-DotFiles/NvPak/blob/main/LICENSE)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square)](https://github.com/Pakrohk-DotFiles/NvPak/graphs/commit-activity)
[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.8.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim)
[![Maintainer](https://img.shields.io/badge/maintainer-theMaintainer-blue?style=flat-square)](https://github.com/Pakrohk)
[![GitHub Issues](https://img.shields.io/github/issues/pakrohk-dotfiles/NvPak.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/Pakrohk-DotFiles/NvPak/issues)
`rocks-tui.nvim` (or simply `rocks-tui`) provides an interactive and visual way to manage your Neovim plugins when using the [`rocks.nvim`](https://github.com/nvim-neorocks/rocks.nvim) package manager. It aims to simplify common plugin management tasks like discovery, installation, updates, and removal, drawing inspiration from user-friendly package manager interfaces.

# What is the purpose of the NvPak project? ✨
## Features

Maybe you have tried to configure Neovim multiple times over the past few years. Neovim has undergone many changes, and every time, you had to follow new defaults to reach the minimum configuration and start writing your configuration for Neovim. The goal of the nvpak project is to provide these defaults.
- **Plugin Manager View:**
- List installed plugins with their versions and status.
- Update individual plugins or all plugins.
- Remove plugins.
- Trigger `:Rocks sync` to synchronize with your `rocks.toml`.
- Quickly view `rocks.nvim` logs.
- **Plugin Search View:**
- Search for new plugins (interactively prompts for query).
- Display search results with plugin names and descriptions.
- Install plugins directly from the search results (with optional version specification).
- **Installation Progress View:**
- Visualize the progress of plugin installations and updates.
- Shows current operation, overall progress bar, and detailed status (conceptual, relies on `rocks.nvim` providing data).
- **Configurable:**
- Customize key mappings for all TUI windows.
- Adjust basic UI elements like window borders, sizes (as ratios), and titles.
- **Built with Lua and Neovim API:** Leverages floating windows and other Neovim UI primitives.

Now you can configure only what you need by forking nvpak without any add-ons. Please note that nvpak is not a Neovim configuration and not in competition with other configurations such as NvChad or LazyVim. If you need a complete Neovim setup without any configuration, then this GitHub repository is not for you.
## Prerequisites

# Why is the name of the project NvPak? 🌟
- [Neovim](https://neovim.io/) (Version 0.8+ recommended, 0.10+ for best compatibility with underlying APIs)
- [`rocks.nvim`](https://github.com/nvim-neorocks/rocks.nvim) installed and configured in your Neovim setup.

"nv" stands for Neovim and "Pak" is derived from the Persian word "پاک" meaning "clean," which represents brightness and simplicity, contrary to complexity and disorder.
## Installation

</div>
Once this plugin is published to a repository accessible by `rocks.nvim` (e.g., LuaRocks or a community repository):

## Requirements 📋

In order to make the best use of this config, you must meet the following prerequisites.

- `neovim v0.8.0` and later versions or `neovide v0.10.3` and later Version
- `unzip`
- `curl`
- `ripgrep` or `fd` for [Fuzzy Finder Telescope](https://github.com/BurntSushi/ripgrep)
- For clipboard support:
- `xclip` or `xsel` for Xorg
- `wl-clipboard` for Wayland
- `git`
- If you are a Python developer, `pynvim`
- `bash` or `dash` for Unix-based systems
- `PowerShell v5.1` or later for Windows
- Only for Windows: `Scoop.sh`
- Install [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts) for better icon support.

### Screenshots 📷

<details>
<summary>
Show
</summary>
<br>



![full](https://user-images.githubusercontent.com/27810360/215935940-81f0b59b-9382-4915-a395-f6903f07c1a8.png)

![autocompelet](https://user-images.githubusercontent.com/27810360/215936237-96bc8604-1597-4aa9-bbfb-4709cae73016.png)

![NeoVide](https://user-images.githubusercontent.com/27810360/181910971-43f34b7f-116a-4981-a9d6-37db0c1526f1.png)

![Fuzzy Finder](https://user-images.githubusercontent.com/48873115/217238383-51c83389-ef78-414c-bdda-2896033ce389.png)

![CmdLine](https://user-images.githubusercontent.com/27810360/181955593-80e4480b-e158-4be7-abe0-0509072d1118.png)

![show error and warns details](https://user-images.githubusercontent.com/27810360/215936761-4ec5c34c-789e-426f-91a4-dca3b6b2a7d1.png)

</details>

# Installation 💻
## Unix 🐧
bash
```bash
git clone --depth 1 https://github.com/Pakrohk-DotFiles/NvPak.git ~/.config/nvim && nvim
```vim
:Rocks install your-repo-user/rocks-tui.nvim
```
## Windows 🪟
powershell
```powershell
bucket add extras
scoop install lazygit
(git clone --depth 1 https://github.com/Pakrohk-DotFiles/NvPak.git ~\AppData\Local\nvim\) -and (nvim)
(Replace `your-repo-user/rocks-tui.nvim` with the actual rock name.)

For local development or testing:
1. Clone this repository:
```sh
git clone https://github.com/your-username/rocks-tui.nvim.git somewhere/rocks-tui.nvim
```
2. Add it to your Neovim runtime path. For example, if using a packer-like structure or manually managing paths:
Ensure `somewhere/rocks-tui.nvim` is in your `&runtimepath`.

## Basic Usage

The plugin provides several commands to access its features:

- **`:RocksTUI`**: Opens the main plugin manager window. Here you can see your installed plugins and manage them.
- **`:RocksTUISearch`**: Opens the plugin search interface. Enter a query to find new plugins.
- **`:RocksTUIProgress`**: Manually opens the installation progress window. This window also attempts to open automatically during installations initiated by `rocks-tui`.
- **`:RocksTUISetup`**: Allows you to re-apply your configuration (useful for testing changes without restarting Neovim).

Refer to the help file (`:help rocks-tui`) for detailed information on key mappings within each window.

## Configuration

You can customize `rocks-tui` by calling the `setup` function in your Neovim configuration (e.g., `init.lua` or a dedicated plugin configuration file).

```lua
require('rocks-tui').setup({
-- ui = {
-- manager_window = {
-- border = "single", -- "none", "single", "double", "rounded", "solid", "shadow"
-- width_ratio = 0.75,
-- title = "My Plugin Manager"
-- },
-- search_window = {
-- border = "solid",
-- }
-- },
-- keymaps = {
-- manager_close = "<Esc>",
-- manager_refresh = "R",
-- search_install_selected = "<CR>",
-- progress_close = "<C-c>",
-- }
})
```
### Notes:

You need to have git installed first.
On Unix,nvim command-line executable should be installed. \
If it is not installed, you can install it using your system's **package manager**.\
On Windows, you need to have scoop installed first. \
Then, install lazygit by running scoop install lazygit.\
Afterwards, run the remaining commands sequentially.

The --depth 1 option of the git clone command fetches only the latest changes from the repository and does not retrieve the entire history.\
This reduces the download time.\
The \ character in Windows is used to continue a command on a new line.


# Usage: 🚀

If the software plugins are not installed automatically after the first run, follow these steps:

Run the following command inside nvim:

```
:Lazy sync
```

Restart nvim.

Enjoy!





# Contributing 🤝


If you're interested in contributing to the project, we welcome your help in fixing bugs and adding new features.\
Here's how you can get started:

Check the [Projects](https://github.com/EvolveBeyond/NvPak/projects) section to see if there are any open issues or features that you'd like to work on. \
If you have an idea for a new feature or improvement, feel free to suggest it and discuss it with the [NvPak](https://github.com/EvolveBeyond/NvPak) team.

Fork the NvPak repository to your own GitHub account.\
Make your changes and commit them to your forked repository. Please make sure to follow the project's coding standards and best practices, and write clear and concise commit messages.

Submit a pull request from your forked repository to the main NvPak repository.\
Your changes will be reviewed by the NvPak team, who may provide feedback and request changes if necessary.\
Once your changes are approved, they will be merged into the main NvPak repository and will be available to all users.

By contributing to NvPak, you'll be helping to improve the project for all users, and you'll have the opportunity to learn and collaborate with other developers.

Thank you for considering contributing to NvPak!


you can find the list of contributors on the [contributors page](https://github.com/nooob-developer/NvPak/graphs/contributors).

If `setup()` is not called, the plugin will use its default configuration.
See `:help rocks-tui-default-configuration` for the full list of default options.

## Team
<a href="https://github.com/EvolveBeyond/nvpak/graphs/contributors">
<img src="https://contrib.rocks/image?repo=EvolveBeyond/nvpak" />
</a>
## Current Status & Limitations

- **Search Functionality:** The current search results are based on placeholder data within `core.lua`. Full integration with `rocks.nvim`'s search capabilities (e.g., parsing `:Rocks search <query>` output or using a Lua API if available) is needed for actual plugin discovery.
- **Progress Visualization:** The progress UI is functional, but the data feeding into it from `core.lua` is conceptual (simulated). Real-time progress updates depend on `rocks.nvim` providing events or a detailed API for progress, or on more complex wrapping of `rocks.nvim` commands.
- **Error Handling:** Basic error handling is in place, but can be made more robust.
- **Modularity:** The plugin is designed with modularity in mind, but further refinements can always be made.

## Contributing

Contributions are welcome! If you have ideas for improvements, new features, or bug fixes, please feel free to open an issue or submit a pull request.

## License

This plugin is licensed under [LICENSE_TYPE_HERE - e.g., MIT, GPLv3]. (Developer: Please choose and add a license file).
Loading