Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devel to prepare for next release #130

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
27d7982
Update FUNDING.yml
polarmutex Nov 8, 2023
d939981
chore: nixify
polarmutex Nov 8, 2023
3e4c1f4
ci: add luarocks release uploader
polarmutex Nov 17, 2023
b6f0631
chore: Create LICENSE
polarmutex Nov 17, 2023
9d7fdbb
feat: v2 refactor
polarmutex Nov 7, 2023
a43c4ac
chore: mv test repo to spec dir
polarmutex Nov 8, 2023
3d49f01
feat: add ability to run luarocks non nix
polarmutex Nov 8, 2023
a1f8d43
test: add git ops tests
polarmutex Nov 8, 2023
2415a4d
chore: fix stylua
polarmutex Nov 9, 2023
a815ede
chore: luachecks
polarmutex Nov 9, 2023
2a2c92a
refactor: stylua fixes and start to build from core
polarmutex Nov 10, 2023
b8724f3
refactor: config
polarmutex Nov 11, 2023
fdd0a09
ci: add commit-lint workflow
Dec 28, 2023
3ebddeb
ci: switch to vusted for testing
Dec 28, 2023
e31db85
chore: add name to commit-lint
Dec 28, 2023
625005d
ci: add plenary install
Dec 28, 2023
88bbd7e
chore: refactor tests to hopefully pass
Dec 28, 2023
7faefb5
refactor: lost code
Dec 29, 2023
906ba52
refactor: basic switch working
Dec 29, 2023
da59fb3
ci: add test for switching normal repo
Dec 29, 2023
79f9f82
refactor: create worktree
Dec 30, 2023
fc3c4f2
refactor: delete worktree
Dec 30, 2023
3a1eacf
refactor: delete worktree
Dec 30, 2023
6494af8
refactor: add back in telescope
Jan 4, 2024
ee1030d
ci: add windows-latest test
Jan 4, 2024
8408e07
fix: add hook to update current buffer on switch
Jan 22, 2024
36091e6
docs: initial readme update
Jan 22, 2024
e445e86
refactor: to plenary test and other
Feb 5, 2024
f37e1a2
refactor: final rework
Jul 18, 2024
24381c8
docs: update plugin help docs
Jul 18, 2024
53e0c32
ci: add busted test to nix check
Jul 18, 2024
68630ea
ci: add bused tests
Jul 18, 2024
008d862
ci: add type-check
Jul 18, 2024
77f2355
ci: add style check
Jul 18, 2024
238d5d0
ci: add dependabot.yml
Jul 18, 2024
253a445
ci: add convential commit checker
Jul 18, 2024
0ff9f71
ci: add luarocks release
Jul 18, 2024
03e6aad
Merge pull request #5 from polarmutex/v2
polarmutex Jul 18, 2024
c176894
docs: update readme
Jul 18, 2024
126288d
docs: update changelog
Jul 18, 2024
93f5afc
fix: telescope display error
Aug 7, 2024
9b5136b
docs: update changelog
Aug 7, 2024
604ab2d
fix: can't delete worktree using c-d
morland96 Jul 31, 2024
0250182
docs: add telescope config to docs
Jul 18, 2024
500629d
fix: fix invalid get() invocation for builtin hooks
elsesiy Jul 31, 2024
f26b2c0
DOCS: Suggest a default hook config
rossvold Aug 29, 2024
3ded2f3
feat: Set --track when creating worktree, if there is an upstream
rbmarliere Jul 21, 2024
6e1fa15
feat: Enable user to get "out" of a worktree
rbmarliere Jul 27, 2024
df917be
fix: Rename create_worktree to telescope_create_worktree
rbmarliere Jul 21, 2024
dc831e5
fix: Add telescope_create_worktree mappings from the worktree picker
rbmarliere Jul 21, 2024
e95debf
fix: Use non conflicting keymap for delete_worktree
rbmarliere Jul 22, 2024
60d2d45
fix: Use refname:short as format in Git.has_branch
rbmarliere Sep 19, 2024
ef6cafb
fix: Only asks to track an upstream if the selected branch is not remote
rbmarliere Sep 19, 2024
1463ced
fix: Disambiguate remote branches
rbmarliere Sep 19, 2024
2d390f6
fix: Add completion messages
rbmarliere Sep 19, 2024
d0b6e13
feat: Enable user to delete branch after deleting a worktree
rbmarliere Sep 19, 2024
32bbd79
fix: Close prompt only if worktree_path is not nil in switch_worktree
rbmarliere Sep 19, 2024
2438f94
feat: Enable user to create detached worktree
rbmarliere Sep 21, 2024
f8bdd13
feat: Add prefix and branch name as default for worktree path
Oct 30, 2024
9fbec0f
Fix: add early returns to buffer switch hook
tvsfx Sep 3, 2024
2d14d27
chore(test): fix tests
Oct 30, 2024
bac72c2
chore(stylua): fix styling
Oct 30, 2024
edd16a7
chore(ci): add commitlint
Oct 30, 2024
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
13 changes: 13 additions & 0 deletions .busted
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return {
_all = {
coverage = false,
lpath = 'lua/?.lua;lua/?/init.lua',
lua = 'nlua',
},
default = {
verbose = true,
},
tests = {
verbose = true,
},
}
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake . -Lv
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: theprimeagen
github: polarmutex
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
57 changes: 0 additions & 57 deletions .github/workflows/ci.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Reference: https://commitlint.js.org/guides/ci-setup
name: Commitlint

on: [pull_request]

jobs:
commitlint:
runs-on: ubuntu-latest
name: Commitlint
steps:
- name: Run commitlint
uses: opensource-nepal/commitlint@v1
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
push:
tags:
- "*"
pull_request:

jobs:
luarocks-release:
runs-on: ubuntu-latest
name: LuaRocks upload
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fail if changelog entry does not exist
if: startsWith(github.ref, 'refs/tags/')
run: grep -q "${{ github.ref_name }}" CHANGELOG.md
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v7
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
detailed_description: |
A plugin that helps to use git worktree operations, create, switch, and delete in neovim.
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
bodyFile: "CHANGELOG.md"
allowUpdates: true
20 changes: 20 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
name: Style checking
on:
pull_request: ~
push:
branches:
- main

jobs:
stylua:
name: stylua
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check lua/
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: tests
on:
pull_request: ~
push:
branches:
- main

jobs:
build:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
neovim_version: ["nightly", "stable"]

steps:
- uses: actions/checkout@v4
- name: Run tests
uses: nvim-neorocks/nvim-busted-action@v1
with:
nvim_version: ${{ matrix.neovim_version }}
19 changes: 19 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Type Check
on:
pull_request: ~
push:
branches:
- main

jobs:
build:
name: Type Check Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Type Check Code Base
uses: mrcjkb/lua-typecheck-action@v1
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.zshrc.bak
.direnv
.pre-commit-config.yaml
minimal.vim
result
9 changes: 9 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
globals = {
'vim',
'describe',
'it',
'before_each',
'after_each',
'assert',
'async',
}
1 change: 1 addition & 0 deletions .luarc.json
6 changes: 6 additions & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 4
quote_style = "AutoPreferSingle"
call_parentheses = "NoSingleTable"
collapse_simple_statement = "Never"
106 changes: 106 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
## [2.0.1] - 2024-08-07

### Fix

- Telescope display error

## [2.0.0] - 2024-07-18

### Chore

- Mv test repo to spec dir
- Fix stylua
- Luachecks
- Add name to commit-lint
- Refactor tests to hopefully pass

### Ci

- Add commit-lint workflow
- Switch to vusted for testing
- Add plenary install
- Add test for switching normal repo
- Add windows-latest test
- Add busted test to nix check
- Add bused tests
- Add type-check
- Add style check
- Add dependabot.yml
- Add convential commit checker
- Add luarocks release

### Docs

- Initial readme update
- Update plugin help docs
- Update readme
- Update changelog

### Feat

- V2 refactor
- Add ability to run luarocks non nix

### Fix

- Add hook to update current buffer on switch

### Refactor

- Stylua fixes and start to build from core
- Config
- Lost code
- Basic switch working
- Create worktree
- Delete worktree
- Delete worktree
- Add back in telescope
- To plenary test and other
- Final rework

### Test

- Add git ops tests

## [1.0.0] - 2023-11-17

### Fix

- Typo in README.md

### Chore

- Renamed :w to wip.lua
- Removed file
- Nixify
- Create LICENSE

### Ci

- Add luarocks release uploader

### Feat

- *(delete)* Allowed for deleting the buffer
- *(worktree-swap)* Better swapping and sane defaults
- *(create)* If rebase fails, we don't stop the creation process
- *(switch)* Clear jumps on switch. Can be configured
- *(status)* Added a status line printer
- *(readme)* Effectively correct
- *(on_tree_change)* Better interfacing with on_tree_change
- *(set_push)* Push so I can push with Git push

### Feta

- *(first-commit)* It "sorta" works.

### Fix

- *(indenting)* Tree shitter to the rescue
- *(status)* Status was 8 / 7 at some point.
- *(create_worktree)* Allows for worktree to also create the branch.
- Pass opts to git_worktrees
- Always return absolute git dir
- Merge mistake to prevent errors
- :Telescope git_worktree

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 PolarMutex

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
.PHONY: lint
lint:
luacheck ./lua

# GIT_WORKTREE_NVIM_LOG=fatal
.PHONY: test
test:
GIT_WORKTREE_NVIM_LOG=fatal nvim --headless --noplugin -u tests/minimal_init.vim -c "PlenaryBustedDirectory tests/ { minimal_init = './tests/minimal_init.vim' }"
# minimal.vim is generated when entering the flake, aka `nix develop`
nvim --headless -u minimal.vim -c "lua require('plenary.test_harness').test_directory('.', {minimal_init='minimal.vim'})"

.PHONY: wintest
wintest:
vusted --output=gtest -m '.\plenary\lua\?.lua' -m '.\plenary\lua\?\?.lua' -m '.\plenary\lua\?\init.lua' ./lua
Loading
Loading