File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 192
192
keymapsOnEvents . LspAttach =
193
193
let
194
194
mkMaps =
195
- prefix :
195
+ prefix : descPrefix :
196
196
mapAttrsToList (
197
197
key : action :
198
198
let
199
199
actionStr = action . action or action ;
200
200
actionProps = optionalAttrs ( isAttrs action ) ( removeAttrs action [ "action" ] ) ;
201
- desc =
202
- let
203
- split = splitString "." prefix ;
204
- splitlen = length split ;
205
- prefixFinal = ( elemAt split ( splitlen - 2 ) ) + " " ;
206
- optPrefix = optionalString ( splitlen > 2 ) prefixFinal ;
207
- in
208
- "Lsp " + optPrefix + actionStr ;
209
201
in
210
202
{
211
203
mode = "n" ;
214
206
215
207
options = {
216
208
inherit ( cfg . keymaps ) silent ;
217
- inherit desc ;
209
+ desc = " ${ descPrefix } ${ actionStr } " ;
218
210
} // actionProps ;
219
211
}
220
212
) ;
221
213
in
222
- mkMaps "vim.diagnostic." cfg . keymaps . diagnostic
223
- ++ mkMaps "vim.lsp.buf." cfg . keymaps . lspBuf
214
+ mkMaps "vim.diagnostic." "Lsp diagnostic" cfg . keymaps . diagnostic
215
+ ++ mkMaps "vim.lsp.buf." "Lsp buf" cfg . keymaps . lspBuf
224
216
++ cfg . keymaps . extra ;
225
217
226
218
# Enable inlay-hints
You can’t perform that action at this time.
0 commit comments