]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Set space to `<Space`> (#526)
authorPiotr Usewicz <piotr@layer22.com>
Tue, 21 Jan 2025 06:29:53 +0000 (07:29 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Jan 2025 06:29:53 +0000 (22:29 -0800)
Closes https://github.com/yegappan/lsp/issues/525

autoload/lsp/signature.vim

index ca2bed459ae302f2dc35dd4a8040117b64f55a10..a80cdac00bdacddb8900df75e96adc73bad2a7b0 100644 (file)
@@ -57,7 +57,11 @@ export def BufferInit(lspserver: dict<any>)
 
   # map characters that trigger signature help
   for ch in lspserver.caps.signatureHelpProvider.triggerCharacters
-    exe $"inoremap <buffer> <silent> {ch} {ch}<C-R>=g:LspShowSignature()<CR>"
+    var mapChar = ch
+    if ch =~ ' '
+      mapChar = '<Space>'
+    endif
+    exe $"inoremap <buffer> <silent> {mapChar} {mapChar}<C-R>=g:LspShowSignature()<CR>"
   endfor
 
   # close the signature popup when leaving insert mode