Skip to content

Commit 292708d

Browse files
Merge pull request #47 from gennaro-tedesco/fix_fzf_deprecations
fixed deprecation warnings in upstream fzf
2 parents fcc6e00 + f49b410 commit 292708d

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ require("nvim-possession").setup({
9595
-- require('nvim-tree').toggle(false, true)
9696
-- end
9797

98+
---@type possession.Hls
99+
fzf_hls = { -- highlight groups for the sessions and preview windows
100+
normal = "Normal",
101+
preview_normal = "Normal",
102+
border = "Todo",
103+
preview_border = "Constant",
104+
},
105+
---@type possession.Winopts
98106
fzf_winopts = {
99107
-- any valid fzf-lua winopts options, for instance
100108
width = 0.5,

doc/possession.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*possession.txt* For Neovim >= 0.8.0 Last change: 2023 September 12
1+
*possession.txt* For Neovim >= 0.8.0 Last change: 2024 December 18
22

33
==============================================================================
44
Table of Contents *possession-table-of-contents*
@@ -7,6 +7,7 @@ Table of Contents *possession-table-of-contents*
77
- Usage and advanced configuration|possession-usage-and-advanced-configuration|
88
- Statusline |possession-statusline|
99
- Feedback |possession-feedback|
10+
1. Links |possession-links|
1011

1112

1213

@@ -123,6 +124,14 @@ however if you really want to do so:
123124
-- require('nvim-tree').toggle(false, true)
124125
-- end
125126

127+
---@type possession.Hls
128+
fzf_hls = { -- highlight groups for the sessions and preview windows
129+
normal = "Normal",
130+
preview_normal = "Normal",
131+
border = "Todo",
132+
preview_border = "Constant",
133+
},
134+
---@type possession.Winopts
126135
fzf_winopts = {
127136
-- any valid fzf-lua winopts options, for instance
128137
width = 0.5,
@@ -134,7 +143,7 @@ however if you really want to do so:
134143
<
135144

136145

137-
🪄 AUTOMAGIC ~
146+
AUTOMAGIC ~
138147

139148
If you want to automatically load sessions defined for the current working
140149
directory at startup, specify

lua/nvim-possession/config.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,29 @@ M.autoswitch = {
1717
M.save_hook = nil
1818
M.post_hook = nil
1919

20+
---@class possession.Hls
21+
---@field normal? string hl group bg session window
22+
---@field preview_normal? string hl group bg preview window
23+
---@field border? string hl group border session window
24+
---@field preview_border? string hl group border preview window
25+
M.fzf_hls = {
26+
normal = "Normal",
27+
preview_normal = "Normal",
28+
border = "Constant",
29+
preview_border = "Constant",
30+
}
31+
32+
---@class possession.Winopts
33+
---@field border? string Any of the options of nvim_win_open.border
34+
---@field height? number Height of the fzf window
35+
---@field width? number Width of the fzf window
36+
---@field preview? table
2037
M.fzf_winopts = {
21-
hl = { normal = "Normal" },
2238
border = "rounded",
2339
height = 0.5,
2440
width = 0.25,
2541
preview = {
42+
hidden = "nohidden",
2643
horizontal = "down:40%",
2744
},
2845
}

lua/nvim-possession/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ M.setup = function(user_opts)
131131
cwd_prompt = false,
132132
file_icons = false,
133133
git_icons = false,
134-
show_cwd_header = false,
135-
preview_opts = "nohidden",
134+
cwd_header = false,
136135

137136
previewer = ui.session_previewer,
137+
hls = user_config.fzf_hls,
138138
winopts = user_config.fzf_winopts,
139139
cwd = user_config.sessions.sessions_path,
140140
actions = {

0 commit comments

Comments
 (0)