File tree 2 files changed +108
-0
lines changed
plugins/by-name/goto-preview
tests/test-sources/plugins/by-name/goto-preview 2 files changed +108
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ lib ,
3
+ ...
4
+ } :
5
+ lib . nixvim . plugins . mkNeovimPlugin {
6
+ name = "goto-preview" ;
7
+
8
+ maintainers = [ lib . maintainers . GaetanLepage ] ;
9
+
10
+ settingsExample = {
11
+ default_mappings = false ;
12
+ height = 30 ;
13
+ post_open_hook . __raw = ''
14
+ function(_, win)
15
+ -- Close the current preview window with <Esc> or 'q'.
16
+ local function close_window()
17
+ vim.api.nvim_win_close(win, true)
18
+ end
19
+ vim.keymap.set('n', '<Esc>', close_window, { buffer = true })
20
+ vim.keymap.set('n', 'q', close_window, { buffer = true })
21
+ end
22
+ '' ;
23
+ } ;
24
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ empty = {
3
+ plugins . goto-preview . enable = true ;
4
+ } ;
5
+
6
+ defaults = {
7
+ plugins . goto-preview = {
8
+ enable = true ;
9
+
10
+ settings = {
11
+ width = 120 ;
12
+ height = 15 ;
13
+ border = [
14
+ "↖"
15
+ "─"
16
+ "┐"
17
+ "│"
18
+ "┘"
19
+ "─"
20
+ "└"
21
+ "│"
22
+ ] ;
23
+ default_mappings = false ;
24
+ debug = false ;
25
+ opacity = null ;
26
+ resizing_mappings = false ;
27
+ post_open_hook = null ;
28
+ post_close_hook = null ;
29
+ references = {
30
+ provider = "telescope" ;
31
+ telescope = null ;
32
+ } ;
33
+ focus_on_open = true ;
34
+ dismiss_on_move = false ;
35
+ force_close = true ;
36
+ bufhidden = "wipe" ;
37
+ stack_floating_preview_windows = true ;
38
+ same_file_float_preview = true ;
39
+ preview_window_title = {
40
+ enable = true ;
41
+ position = "left" ;
42
+ } ;
43
+ zindex = 1 ;
44
+ vim_ui_input = true ;
45
+ } ;
46
+ } ;
47
+ } ;
48
+
49
+ withTelescope = {
50
+ plugins = {
51
+ web-devicons . enable = true ;
52
+ telescope . enable = true ;
53
+
54
+ goto-preview = {
55
+ enable = true ;
56
+ settings . references = {
57
+ provider = "telescope" ;
58
+ telescope . __raw = "require('telescope.themes').get_dropdown({ hide_preview = false })" ;
59
+ } ;
60
+ } ;
61
+ } ;
62
+ } ;
63
+
64
+ example = {
65
+ plugins . goto-preview = {
66
+ enable = true ;
67
+
68
+ settings = {
69
+ default_mappings = false ;
70
+ height = 30 ;
71
+ post_open_hook . __raw = ''
72
+ function(_, win)
73
+ -- Close the current preview window with <Esc> or 'q'.
74
+ local function close_window()
75
+ vim.api.nvim_win_close(win, true)
76
+ end
77
+ vim.keymap.set('n', '<Esc>', close_window, { buffer = true })
78
+ vim.keymap.set('n', 'q', close_window, { buffer = true })
79
+ end
80
+ '' ;
81
+ } ;
82
+ } ;
83
+ } ;
84
+ }
You can’t perform that action at this time.
0 commit comments