@@ -70,9 +70,9 @@ Example for [`lazy.nvim`](https://github.com/folke/lazy.nvim):
70
70
return {
71
71
" andrewferrier/debugprint.nvim" ,
72
72
opts = { … },
73
- -- Dependency only needed for NeoVim 0.8
74
73
dependencies = {
75
- " nvim-treesitter/nvim-treesitter"
74
+ " echasnovski/mini.nvim" -- Needed to enable :ToggleCommentDebugPrints
75
+ " nvim-treesitter/nvim-treesitter" -- Only needed for NeoVim 0.8
76
76
},
77
77
-- Remove the following line to use development versions,
78
78
-- not just the formal releases
@@ -91,6 +91,9 @@ packer.startup(function(use)
91
91
opts = { … }
92
92
require (" debugprint" ).setup (opts )
93
93
end ,
94
+ requires = {
95
+ " echasnovski/mini.nvim" -- Needed to enable :ToggleCommentDebugPrints
96
+ }
94
97
})
95
98
…
96
99
end )
@@ -110,20 +113,22 @@ the box'. There are also some function invocations which are not mapped to any
110
113
keymappings or commands by default, but could be. This is all shown in the
111
114
following table.
112
115
113
- | Mode | Default Key / Cmd | Purpose | Above/Below Line |
114
- | ---------- | -------------------- | ------------------------------------------- | ---------------- |
115
- | Normal | ` g?p ` | Plain debug | Below |
116
- | Normal | ` g?P ` | Plain debug | Above |
117
- | Normal | ` g?v ` | Variable debug | Below |
118
- | Normal | ` g?V ` | Variable debug | Above |
119
- | Normal | None | Variable debug (always prompt for variable) | Below |
120
- | Normal | None | Variable debug (always prompt for variable) | Above |
121
- | Normal | None | Delete debug lines in buffer | - |
122
- | Visual | ` g?v ` | Variable debug | Below |
123
- | Visual | ` g?v ` | Variable debug | Above |
124
- | Op-pending | ` g?o ` | Variable debug | Below |
125
- | Op-pending | ` g?O ` | Variable debug | Above |
126
- | Command | ` :DeleteDebugPrints ` | Delete debug lines in buffer | - |
116
+ | Mode | Default Key / Cmd | Purpose | Above/Below Line |
117
+ | ---------- | --------------------------- | ------------------------------------------- | ---------------- |
118
+ | Normal | ` g?p ` | Plain debug | Below |
119
+ | Normal | ` g?P ` | Plain debug | Above |
120
+ | Normal | ` g?v ` | Variable debug | Below |
121
+ | Normal | ` g?V ` | Variable debug | Above |
122
+ | Normal | None | Variable debug (always prompt for variable) | Below |
123
+ | Normal | None | Variable debug (always prompt for variable) | Above |
124
+ | Normal | None | Delete debug lines in buffer | - |
125
+ | Normal | None | Comment/uncomment debug lines in buffer | - |
126
+ | Visual | ` g?v ` | Variable debug | Below |
127
+ | Visual | ` g?v ` | Variable debug | Above |
128
+ | Op-pending | ` g?o ` | Variable debug | Below |
129
+ | Op-pending | ` g?O ` | Variable debug | Above |
130
+ | Command | ` :DeleteDebugPrints ` | Delete debug lines in buffer | - |
131
+ | Command | ` :ToggleCommentDebugPrints ` | Comment/uncomment debug lines in buffer | - |
127
132
128
133
The keys and commands outlined above can be specifically overridden using the
129
134
` keymaps ` and ` commands ` objects inside the ` opts ` object used above during
@@ -144,6 +149,7 @@ return {
144
149
variable_above_alwaysprompt = nil ,
145
150
textobj_below = " g?o" ,
146
151
textobj_above = " g?O" ,
152
+ toggle_comment_debug_prints = nil ,
147
153
delete_debug_prints = nil ,
148
154
},
149
155
visual = {
@@ -152,6 +158,7 @@ return {
152
158
},
153
159
},
154
160
commands = {
161
+ toggle_comment_debug_prints = " ToggleCommentDebugPrints" ,
155
162
delete_debug_prints = " DeleteDebugPrints" ,
156
163
},
157
164
}
0 commit comments