Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
gorillamoe committed Aug 2, 2024
1 parent d78c93a commit 26d7603
Show file tree
Hide file tree
Showing 13 changed files with 467 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gorillamoe
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Breaking Changes 💥
labels:
- breaking-change
- title: Documentation 📚
labels:
- documentation
- title: Exciting New Features ✨
labels:
- enhancement
- title: Bug Fixes 🐛
labels:
- bug
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up env
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create Release
run: ./scripts/release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
stds.nvim = {
read_globals = { "jit" },
}

std = "lua51+nvim"

read_globals = {
"vim",
}

globals = {
"vim.g",
"vim.b",
"vim.w",
"vim.o",
"vim.bo",
"vim.wo",
"vim.go",
"vim.env",
}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version:
./scripts/set-version.sh $(VERSION)
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
<div align="center">

![tafuta logo](logo.svg)

# tafuta.nvim
A tiny 🤏🏾, wrapper around ripgrep, for making search 🔍 blazingly fast ⚡ and easy to use 👌🏾 in your favorite editor 🥰.

![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mistweaverco/tafuta.nvim?style=for-the-badge)](https://github.com/mistweaverco/tafuta.nvim/releases/latest)

[Install](#install)[Usage](#usage)

<p></p>

A tiny 🤏 wrapper around ripgrep for
making search 🔍 blazingly fast ⚡ and
easy to use 👌 in your favorite editor 🥰.

Tafuta is swahili for "search".

It allows you to search for text in your project.

<p></p>

</div>

## Install

> [!WARNING]
> Requires Neovim 0.10.0+
Via [lazy.nvim](https://github.com/folke/lazy.nvim):

### Configuration

```lua
require('lazy').setup({
-- blazingly fast ⚡ search 🔍
{
'mistweaverco/tafuta.nvim',
cmd = { "Tf" },
config = function()
-- Setup is required, even if you don't pass any options
require('tafuta').setup({
-- The user command to run the search e.g. `:Tf <query>`
user_command = "Tf",
-- rg options, a lua table of options to pass to rg
rg_options = nil,
})
end,
},
})
```

## Usage

```
:Tf <search-term>
```
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
208 changes: 208 additions & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions lua/tafuta/config/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
local M = {}

M.defaults = {
-- The user command to run the search e.g. `:Tf <query>`
user_command = "Tf",
}

M.options = {}

M.setup = function(config)
M.options = vim.tbl_deep_extend("force", M.defaults, config or {})
end

M.get = function()
return M.options
end

return M
5 changes: 5 additions & 0 deletions lua/tafuta/globals/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local M = {}

M.VERSION = "1.0.0"

return M
Loading

0 comments on commit 26d7603

Please sign in to comment.