neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.36k stars 956 forks source link

Unaligned signatureHelp on snippet expansion #831

Closed oblitum closed 5 years ago

oblitum commented 5 years ago

Result from CocInfo

versions

vim version: NVIM v0.4.0-890-ged24a297e node version: v11.15.0 coc.nvim version: 0.0.68 term: tmux-256color platform: linux

Error messages

Output channel: prettier

Output channel: snippets

Output channel: languageserver.ccls

18:40:11 ccls           initialize.cc:271 I initialize in directory /home/francisco/Projects/yuzu-canary with uri file:///home/francisco/Projects/yuzu-canary
18:40:11 ccls           initialize.cc:294 I initializationOptions: {"compilationDatabaseCommand":"","compilationDatabaseDirectory":"","cache":{"directory":"/tmp/ccls","format":"binary","hierarchicalPath":false,"retainInMemory":2},"capabilities":{"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[]},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"clang":{"excludeArgs":[],"extraArgs":[],"pathMappings":[],"resourceDir":""},"client":{"hierarchicalDocumentSymbolSupport":true,"linkSupport":true,"snippetSupport":true},"codeLens":{"localVariables":true},"completion":{"caseSensitivity":2,"detailedLabel":true,"dropOldRequests":true,"duplicateOptional":true,"filterAndSort":true,"include":{"blacklist":[],"maxPathSize":30,"suffixWhitelist":[".h",".hpp",".hh",".inc"],"whitelist":[]},"maxNum":100},"diagnostics":{"blacklist":[],"onChange":1000,"onOpen":0,"onSave":0,"spellChecking":true,"whitelist":[]},"highlight":{"largeFileSize":2097152,"lsRanges":false,"blacklist":[],"whitelist":[]},"index":{"blacklist":[],"comments":2,"initialNoLinkage":false,"initialBlacklist":[],"initialWhitelist":[],"maxInitializerLines":5,"multiVersion":0,"multiVersionBlacklist":[],"multiVersionWhitelist":[],"name":{"suppressUnwrittenScope":false},"onChange":false,"parametersInDeclarations":true,"threads":0,"trackDependency":2,"whitelist":[]},"request":{"timeout":5000},"session":{"maxNum":10},"workspaceSymbol":{"caseSensitivity":1,"maxNum":1000,"sort":true},"xref":{"maxNum":2000}}
18:40:11 ccls           initialize.cc:323 I use -resource-dir=/usr/lib/clang/8.0.0
18:40:11 ccls           initialize.cc:356 I workspace folder: /home/francisco/Projects/yuzu-canary/
18:40:11 ccls              project.cc:397 I loaded /home/francisco/Projects/yuzu-canary/compile_commands.json
18:40:11 ccls           initialize.cc:381 I start 8 indexers
18:40:11 ccls           initialize.cc:389 I dispatch initial index requests
18:40:11 preamble     sema_manager.cc:734 I create session for /home/francisco/Projects/yuzu-canary/src/yuzu/bootmanager.cpp
...

Describe the bug

SignatureHelp argument alignment is correct when typing signatureHelp triggers, but it isn't great after a snippet expansion, it seems random.

Reproduce the bug

Screenshots

After snippet expansion (random)

screencast-1

After trigger (correct)

screencast-2

chemzqm commented 5 years ago

Align works with cursor position, so it's expected, it's not possible to guarantee the align works perfect when using vim's alogrithms to break the lines.

oblitum commented 5 years ago

ok :-/

chemzqm commented 5 years ago

I've improved the position, should work most of time.

oblitum commented 5 years ago

@chemzqm thx. Looks much better now.