You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`dqp`| Insert a 'plain' debug line appropriate to the filetype just below the current line |`require('debugprint').debugprint()`|
84
-
|`dqP`| The same, but above the current line |`require('debugprint').debugprint({above = true})`|
85
-
|`dQP`| Prompt for a variable name, and insert a debugging line just below the current line which outputs it |`require('debugprint').debugprint({variable = true})`|
86
-
|`dQP`| The same, but above the current line |`require('debugprint').debugprint({above = true, variable = true})`|
|`dqp`| Insert a 'plain' debug line appropriate to the filetype just below the current line |`require('debugprint').debugprint()`|
98
+
|`dqP`| The same, but above the current line |`require('debugprint').debugprint({above = true})`|
99
+
|`dQP`| Insert a variable debugging line below the current line. If the cursor is on a variable name, use that, otherwise prompt for one. |`require('debugprint').debugprint({variable = true})`|
100
+
|`dQP`| The same, but above the current line |`require('debugprint').debugprint({above = true, variable = true})`|
101
+
| None by default | Always prompt for a variable name, and insert a debugging line just below the current line which outputs it |`require('debugprint').debugprint({ignore_treesitter = true, variable = true})`|
102
+
| None by default | Always prompt for a variable name, and insert a debugging line just above the current line which outputs it |`require('debugprint').debugprint({ignore_treesitter = true, above = true, variable = true})`|
87
103
88
104
These keybindings are chosen not to conflict with any standard Vim keys (or any
89
105
common plugins, at least that I'm aware of). You can disable them from being
90
-
created by setting `create_keymaps`, and map them yourself to something else if
91
-
you prefer:
106
+
created by setting `create_keymaps`, and map them yourself if you prefer:
92
107
93
108
```lua
94
109
opts= {
@@ -115,13 +130,14 @@ end)
115
130
116
131
## Other Options
117
132
118
-
`debugprint` supports the following options in its `opts` object:
133
+
`debugprint` supports the following options in its global `opts` object:
119
134
120
-
| Option | Default | Purpose |
121
-
| - | - | - |
122
-
|`create_keymaps`|`true`| Creates default keymappings - see above |
123
-
|`move_to_debugline`|`false`| When adding a debug line, moves the cursor to that line |
124
-
|`filetypes`| See below | Custom filetypes - see below |
135
+
| Option | Default | Purpose |
136
+
| - | - | - |
137
+
|`create_keymaps`|`true`| Creates default keymappings - see above |
138
+
|`move_to_debugline`|`false`| When adding a debug line, moves the cursor to that line |
139
+
|`filetypes`| See below | Custom filetypes - see below |
140
+
|`ignore_treesitter`|`false`| Never use treesitter to find a variable under the cursor, always prompt for it - overrides the same setting on `debugprint()` if set to true |
125
141
126
142
## Add Custom Filetypes
127
143
@@ -201,9 +217,6 @@ If it helps to understand these, you can look at the built-in configurations in
0 commit comments