53 Commits

Author SHA1 Message Date
kiyan
6138ff7096 fix(nav-file): bufnr failure when trying to create the buffer
I'm not perfectly sure if this should be upstreamed, but seems like
passing true to bufnr `create` argument now fails.
This fixes this issue by adding a new buffer with bufadd when the buffer
does not exist in the buffer list.
2022-06-05 13:35:53 +02:00
David Aguilar
a204fc29df harpoon.ui: handle absolute paths
If the filename is an absolute path then there is no need to
prepend the path with the current directory.

Detect absolute paths and open them as-is.

This fixes harpoon when editing files through symlinks
that point to other places on the filesystem.
2022-02-04 21:40:45 -08:00
David Aguilar
cdb64582dc harpoon.ui: use vim.loop.cwd() to avoid blocking the event loop
Prefer the async API for getting the cwd.
2022-02-03 22:44:20 -08:00
Juan Alejandro Bernal
8eda89873c
fixed stylua 2022-01-13 17:39:06 -05:00
Juan Alejandro Bernal
d5031b54b5
fixed inconsistent jumping between similarly named files 2022-01-12 19:42:01 -05:00
Raafat Turki
e6b71d6586 chore: project_cleanup 2021-11-26 06:27:56 +03:00
clbrunet
031cfa6f9c fix: use <Cmd> instead of ':' in quick menus remaps
Quick menus remaps now work even if a user uses a ':' remap.
2021-11-09 08:01:32 +01:00
clbrunet
f227419697 refactor(ui): use 'number' option in quick_menu like in cmd-ui 2021-11-07 15:47:04 +01:00
Sebastian Lyng Johansen
212584d281 remove popup.nvim as dependency 2021-10-27 21:46:05 +02:00
mikatpt
70f054764b Change quit binding to use toggle_quick_menu() 2021-10-11 18:44:19 -04:00
mikatpt
132da0d247 Fix formatting 2021-10-09 18:57:08 -04:00
mikatpt
2225d62eea Add autocmd to quit menu on BufLeave 2021-10-09 13:50:27 -04:00
mikatpt
eb0fc958b4 Add convenience bindings for exiting quick menu 2021-10-07 21:03:37 -04:00
Jesse Leite
a1ce601f66 Hook up save_on_change option to menu buffer. 2021-08-05 23:13:27 -04:00
anott03
750ac2d9d5 stying via stylua 2021-06-17 14:44:03 -04:00
anott03
a0f33c9a37 moving from vim.fn to vim.api where possible
vim.fn functions are vimsciprt, while vim.api functions are lua, so api
functions tend to perform better
2021-06-17 07:36:53 -07:00
Ind1eMonk3y
cf6cb9bf05 fix(ui): Sets buffer as 'listed' when navigating
According to the documentation for `vim.fn.bufnr` (`:h bufnr`), the
created buffer will have the option 'unlisted' by default.

This means that when navigating to a file, if that file wasn't
previously open, the new buffer won't appear in buffers list.

This fix set the buffer to be 'listed' when navigating.
2021-05-12 00:46:29 +02:00
ThePrimeagen
2374c696d3 chore(lint): ... so much of it 2021-05-11 10:50:53 -06:00
ThePrimeagen
0572fa81d3 fix(ui): Navigation with enter on menu 2021-05-11 10:11:46 -06:00
Asbjørn Håland
09440052d7 feat(ui): navigate to mark on enter 2021-05-10 17:18:37 +02:00
Raigo Jerva
375ce5a311
formatting with stylua 2021-05-04 11:01:39 +03:00
Raigo Jerva
140d1ca109
adjust log levels
- set every function call to trace, logs in between as bebug
2021-05-03 21:45:24 +03:00
Raigo Jerva
1d65f6a888
address various comments 2021-05-03 21:23:07 +03:00
Raigo Jerva
a6e8a63520
update
- update readme
- revert nonfunctional changes in term.lua
- promote log level for next and previous commands
- make env var more important than vim.g
2021-05-02 10:52:00 +03:00
Raigo Jerva
c245041e21
revert nonfunctional changes 2021-05-02 10:04:00 +03:00
Raigo Jerva
e06d8f1aea
adjust log levels
- promote direct interactions to info
- demote local functions to trace
2021-04-29 21:10:21 +03:00
Raigo Jerva
350c7feea4
update logging for init and mark 2021-04-29 00:02:09 +03:00
Raigo Jerva
0b61951167
Merge remote-tracking branch 'upstream/master' into logging-and-various 2021-04-28 12:44:16 +03:00
Raigo Jerva
02f4e77111
Add further logging, fix callbacks
The callbacks are in a nested table, so they weren't actually called. If
there aren't more events then callbacks for "changed" don't need to be
nested in the callbacks table. Alternatively emitChanged() could take an
event name: emit("changed") and run callbacks for a specific event or
take a table of events and run for all, emit({"changed", "navigate"}).
2021-04-28 12:07:32 +03:00
Raigo Jerva
8a4c443145
Add logging 2021-04-27 20:40:47 +03:00
Ind1eMonk3y
4a83cc866d Enhance cursor offset saving/restoring 2021-04-27 04:11:51 +02:00
Raigo Jerva
760ba07a77
remove print statement to a nonexistent value 2021-04-14 23:11:42 +03:00
ThePrimeagen
272e1c8ac4 fix(lint): Removed some lint 2021-04-14 07:55:11 -06:00
ThePrimeagen
c90596bb71
Merge pull request #50 from A-Daneel/master
fix(ui): menusave now gets called on menu toggle
2021-04-14 07:51:22 -06:00
Peter Sabel (Zabel)
59bb920a67 fix(ui): menusave now gets called on menu toggle
Not sure if this is the proper way to solve this.
But my moving the son_menu_save call into the closing if-loop it will
get properly called on when closing the menu with toggle_quick_menu().

I think merging this change will resolve issue #49.
2021-04-14 14:25:39 +02:00
ThePrimeagen
4548a7a3c9 feat(worktree): harpoon now works well with worktrees 2021-04-07 14:42:36 -06:00
Jesse Leite
d207c4cd84 Merge branch 'master' of https://github.com/ThePrimeagen/harpoon into customize-menu-window-yayaya 2021-03-24 10:11:09 -04:00
Jesse Leite
c015ae5b5e Add ability to customize menu window. 2021-03-24 01:44:18 -04:00
ThePrimeagen
d5229fb085 feat(offsets): Harp**n offsets 2021-03-23 10:56:19 -06:00
ThePrimeagen
1158df026f feat(filename): Filename is now an object with row-col offset 2021-03-23 10:36:40 -06:00
ThePrimeagen
0e23b5653e
Merge pull request #39 from asbjornhaland/write_quick_menu
feat(ui): add BufWriteCmd to handle ":w" in quick menu
2021-03-23 09:03:51 -06:00
Asbjørn Håland
d0f4ad1e18 fix(ui): set nomodified then modified is set - ensures you always can close the quick_menu 2021-03-23 15:49:06 +01:00
Asbjørn Håland
01996f45f6 fix(ui): set the quick_menu initially to not modified 2021-03-22 19:01:13 +01:00
Asbjørn Håland
c413edb1e8 feat(ui): delete quick_menu buffer on hidden 2021-03-22 18:48:12 +01:00
Bhanuka
0280f8be12 Added nav_next and nav_prev functions
This allows to cycle through the harpoon marks list
2021-03-21 13:53:16 +05:30
Asbjørn Håland
5e3b5e39f7 feat(ui): add BufWriteCmd to handle ":w" in quick menu
Fix #36
2021-03-18 21:08:25 +01:00
Asbjørn Håland
91ffa8ac68 feat(mark)!: add set_current_at
BREAKING CHANGE:
- filter_nulls(list) renamed to filter_empty_string(list)
- swap(a, b) removed
- trim() removed
- promote() removed
- promote_to_front() removed
- remove_nils() removed
- shorten_list() removed

Fix #10
2021-03-16 22:12:42 +01:00
ThePrimeagen
6655cd9238
Merge pull request #26 from brandoncc/set-filetype-for-menu
Set filetype for quick menu
2021-03-15 09:46:31 -06:00
Brandon Conway
df9050d40f Save changes when closing menu 2021-03-14 21:52:08 -07:00
Brandon Conway
46e6d1f254 Set filetype for quick menu 2021-03-14 19:24:10 -07:00