Commit Graph

190 Commits

Author SHA1 Message Date
Lewis Russell
22b762ed66 Remove uses of loadstring + doc tweaks 2021-05-02 10:08:02 +01:00
Lewis Russell
69118e7d5b Add _get_config() to expose the config.
Resolves #167
2021-05-01 10:47:26 +01:00
Lewis Russell
9a1ef8e0dd Move require('gitsigns.diff') 2021-04-25 17:01:45 +01:00
Lewis Russell
445c7d54d8 Change style of requires from / to . 2021-04-25 16:52:12 +01:00
Lewis Russell
1240c16a3e Refactor debug functions 2021-04-25 10:56:38 +01:00
Lewis Russell
dc0f6d895b Add config.attach_to_untracked
Resolves #68
2021-04-24 16:59:51 +01:00
Lewis Russell
50c5122c84 Add config.preview_config
Used to customise the preview window.

Resolves #159
2021-04-24 16:59:41 +01:00
Lewis Russell
d30167b9c5 Don't place signs if all sign attrs are disabled
Fixes #163
2021-04-24 16:35:36 +01:00
Lewis Russell
14e56e1949 Disable jit when running internal diff.
Resolves #166
2021-04-24 16:25:20 +01:00
Lewis Russell
a5ec3bcca2 Hunk: Add field 'vend' (visual end) 2021-04-22 17:17:48 +01:00
Lewis Russell
fb44ad1d27 Add missing not 2021-04-20 20:47:46 +01:00
Lewis Russell
33bf5c4a6d Don't attach to non-loaded buffers
Fixes #161
2021-04-20 20:30:28 +01:00
Lewis Russell
acf06a24aa Use plenary's async_void 2021-04-20 16:01:08 +01:00
Lewis Russell
1fd587f7e6 Remove some newly broken sign speculation logic
https://github.com/neovim/neovim/pull/12323 means we can no longer see
placed signs on deleted lines.
2021-04-19 09:37:17 +00:00
Lewis Russell
8b2b54de22 Unglobal the command completion function 2021-04-16 17:03:55 +00:00
Lewis Russell
ef9da62883 Improve sign speculation
Fixes #158
2021-04-16 17:08:19 +01:00
Lewis Russell
2191b5ea17 Abort index handler when there is no cache
Fixes #138
2021-04-16 11:08:48 +01:00
windwp
87a12bddd0 fix: git sub module path
it will broken with
fugitive:///home/wind/projects/abcdef/.git/modules/web-components//198faedae29cd87cc8f839e22d347e6c6e0ce17f/src/app/index.html
2021-04-15 09:07:59 +01:00
windwp
56bd673932 don't display fugitive sign on diff mode 2021-04-15 09:07:59 +01:00
August Masquelier
3c7be5b6fa Support git builds from source. 2021-04-14 14:15:47 +00:00
Lewis Russell
adcc3cd927 Show correct signs on fugitive revision buffers
Fixes #143
2021-04-14 13:34:30 +01:00
Lewis Russell
8f4230809f Speculate signs before running diff 2021-04-13 22:29:36 +01:00
Lewis Russell
7ee92f88bf Some hunk related refactoring 2021-04-13 12:31:23 +01:00
Lewis Russell
7c493175f3 Show signs in fugitive revision buffers
Resolves #143
2021-04-13 12:31:23 +01:00
Lewis Russell
33bda75591 update signs in on_reload callback 2021-04-12 19:28:48 +01:00
Lewis Russell
2882d32cd5 Format how cache is dumped 2021-04-12 19:16:15 +01:00
Lewis Russell
126decc4ea Fix git object creation 2021-04-12 19:16:15 +01:00
Lewis Russell
6f67398c58 Fix reset_buffer() 2021-04-12 19:16:15 +01:00
Lewis Russell
7667121978 Implement on_reload buffer event callback
Should workaround unwanted cache invalidations. See #138, #139
2021-04-12 12:42:19 +01:00
Lewis Russell
dddd7b3f1e Add support for yadm
Resolves #83
2021-04-10 19:33:35 +01:00
Lewis Russell
b5222fa439 Refactor git commands to be more OOP (take 2) 2021-04-10 15:05:29 +01:00
Lewis Russell
f11dc80ec4 Revert "Refactor git commands to be more OOP"
This reverts commit 718d61b712.
2021-04-10 09:34:31 +01:00
Lewis Russell
dbd4c8a87d Refactor git commands to be more OOP 2021-04-10 00:17:19 +01:00
Lewis Russell
50d012e1da Preview: don't set winhl if there is no border 2021-04-06 22:31:04 +01:00
Tomáš Kallup
618601d2dc Implemented stage_buffer and reset_buffer_index
This allow users to run `lua require"gitsigns".stage_buffer()` to stage
all changes in a buffer and `lua require"gitsigns".reset_buffer_index()` to
unstage all changes in a buffer.

Added `ensure_file_in_index` to make sure files are tracked before
staging hunks.
Added `clear_status` to status, to clear only modifications (added,
changed, removed)

Added tests for `stage_buffer` and `reset_buffer_index`

Closes: #127
2021-04-06 10:51:27 +01:00
Lewis Russell
98305f725d Preview: Add border and use minimal style
- I nvim doesn't yet have border support, then gitsigns should fallback to
opening a window without a border.

- Also fix #126
2021-04-05 09:49:10 +01:00
Daniel Bylinka
bf2c9d4bfe Preview: Set tabstop before calculating width
Add comment
2021-04-04 22:45:53 +01:00
Lewis Russell
36184e5a58 Fix: Don't error on untracked files with blame
Fixes #123
2021-04-04 21:50:02 +01:00
Lewis Russell
9113de1ed5 Preview: Calculate width properly...again
Fixes #120
2021-04-04 09:58:42 +01:00
Lewis Russell
8589791bfe async: Refactor await_main() 2021-04-04 00:46:41 +01:00
Lewis Russell
16cb69e08f Simplified async type checking 2021-04-04 00:42:35 +01:00
Lewis Russell
468fa4e4bc Preview: Calculate width properly
Fixes #120
2021-04-04 00:42:35 +01:00
Jacqueline Askins
c5c9169966 Unset cursorline in hunk preview 2021-04-03 23:35:52 +01:00
Lewis Russell
907c4bdd65 Remove debug message 2021-04-03 18:48:43 +01:00
Lewis Russell
d103fdbfcf Rename function 2021-04-02 18:07:26 +01:00
Lewis Russell
cc84d61760 Refactor sign define/place logic 2021-04-02 18:07:26 +01:00
Lewis Russell
62c43b59e3 Spring cleaning 2021-04-02 18:07:26 +01:00
Lewis Russell
7deca6c47f Migrate to plenary's async lib 2021-04-02 18:07:26 +01:00
Lewis Russell
f672604407 Cleanup some type annotations 2021-04-02 18:07:26 +01:00
Lewis Russell
654e16b6ff Feature: Add blame info as virtual text
- Enable with config.current_line_blame.
- Customise formatting with config.current_line_blame_formatter.
2021-04-01 12:34:48 +01:00