mirror of
https://github.com/ThePrimeagen/harpoon
synced 2024-09-16 21:44:02 +02:00
feat: Make current file more prominent
This commit is contained in:
parent
8c0bb0a328
commit
41d1a0e793
1 changed files with 13 additions and 0 deletions
|
@ -77,6 +77,19 @@ function M.toggle_quick_menu()
|
|||
return
|
||||
end
|
||||
|
||||
local curr_file = utils.normalize_path(vim.api.nvim_buf_get_name(0))
|
||||
vim.cmd(
|
||||
string.format(
|
||||
"autocmd Filetype harpoon " ..
|
||||
"let path = '%s' | call clearmatches() | " ..
|
||||
-- move the cursor to the line containing the current filename
|
||||
"call search('\\V'.path.'\\$') | " ..
|
||||
-- add a hl group to that line
|
||||
"call matchadd('HarpoonCurrentFile', '\\V'.path.'\\$')",
|
||||
curr_file:gsub("\\", "\\\\")
|
||||
)
|
||||
)
|
||||
|
||||
local win_info = create_window()
|
||||
local contents = {}
|
||||
local global_config = harpoon.get_global_settings()
|
||||
|
|
Loading…
Reference in a new issue