Skip to content

Commit 3748a2f

Browse files
committed
initial import
0 parents  commit 3748a2f

File tree

16 files changed

+663
-0
lines changed

16 files changed

+663
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
insert_final_newline = true
5+
indent_style = space
6+
indent_size = 2
7+
charset = utf-8
8+
9+
[Makefile]
10+
indent_style = tab
11+

.github/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
changelog:
3+
exclude:
4+
labels:
5+
- ignore-for-release
6+
categories:
7+
- title: Breaking Changes 💥
8+
labels:
9+
- breaking-change
10+
- title: Documentation 📚
11+
labels:
12+
- documentation
13+
- title: Exciting New Features ✨
14+
labels:
15+
- enhancement
16+
- title: Bug Fixes 🐛
17+
labels:
18+
- bug
19+
- title: Dependencies 📦
20+
labels:
21+
- dependencies

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Release
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v[0-9]+.[0-9]+.[0-9]+'
8+
jobs:
9+
create-release:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: Set up env
18+
run: |
19+
VERSION=${GITHUB_REF_NAME#v}
20+
echo "VERSION=$VERSION" >> $GITHUB_ENV
21+
- name: Create Release
22+
run: ./scripts/release.sh
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.luacheckrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
stds.nvim = {
2+
read_globals = { "jit" },
3+
}
4+
5+
std = "lua51+nvim"
6+
7+
read_globals = {
8+
"vim",
9+
}
10+
11+
globals = {
12+
"vim.g",
13+
"vim.b",
14+
"vim.w",
15+
"vim.o",
16+
"vim.bo",
17+
"vim.wo",
18+
"vim.go",
19+
"vim.env",
20+
}

.yamllint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
extends: default
3+
rules:
4+
truthy:
5+
check-keys: false

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gorillamoe

CODE_OF_CONDUCT.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community includes using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting an individual maintainer on:
59+
60+
### GitHub
61+
62+
- @gorillamoe
63+
64+
> (at `GitHub username` + `@github.com`).
65+
66+
### Discord
67+
68+
- gorillamoe
69+
70+
All complaints will be reviewed and investigated and will result in a response that
71+
is deemed necessary and appropriate to the circumstances. The project team is
72+
obligated to maintain confidentiality with regard to the reporter of an incident.
73+
Further details of specific enforcement policies may be posted separately.
74+
75+
Project maintainers who do not follow or enforce the Code of Conduct in good
76+
faith may face temporary or permanent repercussions as determined by other
77+
members of the project's leadership.
78+
79+
## Attribution
80+
81+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
82+
available at [https://contributor-covenant.org/version/1/4][version]
83+
84+
[homepage]: https://contributor-covenant.org
85+
[version]: https://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contributing to diffconflicts.nvim
2+
3+
Thanks for checking out diffconflicts.nvim!
4+
We're excited to hear and learn from you.
5+
6+
We've put together the following guidelines to
7+
help you figure out where you can best be helpful.
8+
9+
## Table of Contents
10+
11+
0. [Types of contributions we're looking for](#types-of-contributions-were-looking-for)
12+
0. [Ground rules & expectations](#ground-rules--expectations)
13+
0. [How to contribute](#how-to-contribute)
14+
0. [Style guide](#style-guide)
15+
1. [Documentation](#documentation)
16+
2. [Code](#code)
17+
0. [Setting up your environment](#setting-up-your-environment)
18+
0. [Community](#community)
19+
20+
## Types of contributions we're looking for
21+
22+
There are many ways you can directly contribute to diffconflicts.nvim:
23+
24+
- Feature requests
25+
- Bug reports
26+
- Code contributions
27+
- Writing or editing documentation
28+
29+
## Ground rules & expectations
30+
31+
Before we get started,
32+
here are a few things we expect from you (and that you should expect from others):
33+
34+
- Be kind and thoughtful in your conversations around this project.
35+
We all come from different backgrounds and projects,
36+
which means we likely have different perspectives on "how open source is done."
37+
Try to listen to others rather than convince them that your way is correct.
38+
- diffconflicts.nvim is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
39+
By participating in this project, you agree to abide by its terms.
40+
- Please ensure that your contribution passes all tests if you open a pull request.
41+
If there are test failures, you will need to address them before we can merge your contribution.
42+
- When adding content, please consider if it's widely valuable.
43+
Please don't add references or links to things you or your employer have created,
44+
as others will do so if they appreciate it.
45+
46+
## How to contribute
47+
48+
If you'd like to contribute,
49+
start by searching through the [pull requests](https://github.com/mistweaverco/diffconflicts.nvim/pulls) to
50+
see whether someone else has raised a similar idea or question.
51+
52+
If you don't see your idea listed, and you think it fits into the goals of this guide, open a pull request.
53+
54+
## Style guide
55+
56+
### Documentation
57+
58+
If you're writing documentation,
59+
see the [style guide](./docs/.vale/styles) (which uses [vale](https://vale.sh)) to
60+
help your prose match the rest of the documentation.
61+
62+
### Code
63+
64+
When writing code,
65+
please follow these configurations:
66+
67+
- [stylua](./stylua.toml)
68+
- [luacheck](./.luacheckrc)
69+
- [EditorConfig](./.editorconfig)
70+
- [yaml-lint](./.yamllint.yaml)
71+
72+
Most of them are automatically checked by the CI,
73+
so you don't need to worry about them.
74+
75+
## Community
76+
77+
Discussions about the diffconflict.snvim take place on:
78+
79+
- This repository's [Issues](https://github.com/mistweaverco/diffconflicts.nvim/issues) and
80+
[Pull Requests](https://github.com/mistweaverco/diffconflicts.nvim/pulls) sections
81+
- The [mistwieaverco discord server](https://mistweaverco.com/discord)
82+
83+
Anybody is welcome to join these conversations.
84+
85+
Wherever possible,
86+
don't take these conversations to private channels,
87+
including contacting the maintainers directly.
88+
89+
Keeping communication public means everybody can benefit and learn from the conversation.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025+ mistweaverco
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<div align="center">
2+
3+
![diffconflicts logo](assets/logo.svg)
4+
5+
# diffconflicts.nvim
6+
7+
[![Made with love](assets/badge-made-with-love.svg)](https://github.com/mistweaverco/diffconflicts.nvim/graphs/contributors)
8+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/mistweaverco/diffconflicts.nvim?style=for-the-badge)](https://github.com/mistweaverco/diffconflicts.nvim/releases/latest)
9+
[![License](https://img.shields.io/github/license/mistweaverco/diffconflicts.nvim?style=for-the-badge)](./LICENSE)
10+
[![GitHub issues](https://img.shields.io/github/issues/mistweaverco/diffconflicts.nvim?style=for-the-badge)](https//:github.com/mistweaverco/diffconflicts.nvim/issues)
11+
[![Discord](assets/badge-discord.svg)](https://mistweaverco.com/discord)
12+
13+
[Requirements](#requirements)[Installation](#installation)[Usage](#usage)
14+
15+
<p></p>
16+
17+
A Neovim plugin for resolving merge conflicts.
18+
19+
Make resolving merge conflicts in Neovim a breeze.
20+
21+
<p></p>
22+
23+
</div>
24+
25+
## Requirements
26+
27+
- Neovim 0.10+
28+
- Git 2.25+ (for `git mergetool` support)
29+
30+
## Installation
31+
32+
Use your favorite plugin manager to install `diffconflicts.nvim`.
33+
34+
For example, with [Lazy](https://github.com/folke/lazy.nvim):
35+
36+
```lua
37+
{
38+
"mistweaverco/diffconflicts.nvim",
39+
opts = {
40+
-- Optional configuration
41+
commands = {
42+
-- Command to open the diff conflicts view, default is "DiffConflicts"
43+
-- set to nil to disable the command
44+
diff_conflicts = "DiffConflicts",
45+
-- Command to show the history of conflicts, default is "DiffConflictsShowHistory"
46+
-- set to nil to disable the command
47+
show_history = "DiffConflictsShowHistory",
48+
-- Command to resolve conflicts with history, default is "DiffConflictsWithHistory"
49+
-- set to nil to disable the command
50+
with_history = "DiffConflictsWithHistory",
51+
},
52+
}
53+
}
54+
```
55+
56+
Configure Git to use this plugin as a merge-tool:
57+
58+
```sh
59+
git config --global merge.tool diffconflicts
60+
git config --global mergetool.diffconflicts.cmd 'nvim -c DiffConflicts "$MERGED" "$BASE" "$LOCAL" "$REMOTE"'
61+
git config --global mergetool.diffconflicts.trustExitCode true
62+
git config --global mergetool.keepBackup false
63+
```
64+
65+
## Usage
66+
67+
To resolve merge conflicts, run:
68+
69+
```sh
70+
git mergetool
71+
```
72+
73+
This will open the conflicting file in Neovim with the `diffconflicts.nvim` plugin enabled.
74+
You can also manually open a file and then run the command:
75+
76+
```vim
77+
:DiffConflicts
78+
```
79+
80+
This will open the current file in diff mode with the conflicts highlighted.
81+
82+
The left side shows the resolution,
83+
the right side shows the differences between the branches.
84+
85+
So all you need to do is edit the left side to resolve the conflicts.

0 commit comments

Comments
 (0)