{"action":"created","issue":{"url":"https://api.github.com/repos/company-mode/company-mode/issues/509","repository_url":"https://api.github.com/repos/company-mode/company-mode","labels_url":"https://api.github.com/repos/company-mode/company-mode/issues/509/labels{/name}","comments_url":"https://api.github.com/repos/company-mode/company-mode/issues/509/comments","events_url":"https://api.github.com/repos/company-mode/company-mode/issues/509/events","html_url":"https://github.com/company-mode/company-mode/pull/509","id":153169190,"number":509,"title":"Add option to company-yasnippet whether candidates are merged with other backends","user":{"login":"mola-T","id":16771961,"avatar_url":"https://avatars.githubusercontent.com/u/16771961?v=3","gravatar_id":"","url":"https://api.github.com/users/mola-T","html_url":"https://github.com/mola-T","followers_url":"https://api.github.com/users/mola-T/followers","following_url":"https://api.github.com/users/mola-T/following{/other_user}","gists_url":"https://api.github.com/users/mola-T/gists{/gist_id}","starred_url":"https://api.github.com/users/mola-T/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mola-T/subscriptions","organizations_url":"https://api.github.com/users/mola-T/orgs","repos_url":"https://api.github.com/users/mola-T/repos","events_url":"https://api.github.com/users/mola-T/events{/privacy}","received_events_url":"https://api.github.com/users/mola-T/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-05T05:15:23Z","updated_at":"2016-05-05T08:49:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/company-mode/company-mode/pulls/509","html_url":"https://github.com/company-mode/company-mode/pull/509","diff_url":"https://github.com/company-mode/company-mode/pull/509.diff","patch_url":"https://github.com/company-mode/company-mode/pull/509.patch"},"body":"Many people are using this:\r\n\r\n    ;; https://github.com/syl20bnr/spacemacs/pull/179\r\n    (defvar company-mode/enable-yas t\r\n      \"Enable yasnippet for all backends.\")\r\n\r\n    (defun company-mode/backend-with-yas (backend)\r\n      (if (or (not company-mode/enable-yas)\r\n              (and (listp backend) (member 'company-yasnippet backend)))\r\n          backend\r\n        (append (if (consp backend) backend (list backend))\r\n                '(:with company-yasnippet))))\r\n\r\n    (setq company-backends (mapcar #'company-mode/backend-with-yas company-backends))\r\n\r\nI think there should be a choice whether the yas completion should replace the original completion."},"comment":{"url":"https://api.github.com/repos/company-mode/company-mode/issues/comments/217105277","html_url":"https://github.com/company-mode/company-mode/pull/509#issuecomment-217105277","issue_url":"https://api.github.com/repos/company-mode/company-mode/issues/509","id":217105277,"user":{"login":"mola-T","id":16771961,"avatar_url":"https://avatars.githubusercontent.com/u/16771961?v=3","gravatar_id":"","url":"https://api.github.com/users/mola-T","html_url":"https://github.com/mola-T","followers_url":"https://api.github.com/users/mola-T/followers","following_url":"https://api.github.com/users/mola-T/following{/other_user}","gists_url":"https://api.github.com/users/mola-T/gists{/gist_id}","starred_url":"https://api.github.com/users/mola-T/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mola-T/subscriptions","organizations_url":"https://api.github.com/users/mola-T/orgs","repos_url":"https://api.github.com/users/mola-T/repos","events_url":"https://api.github.com/users/mola-T/events{/privacy}","received_events_url":"https://api.github.com/users/mola-T/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T08:49:02Z","updated_at":"2016-05-05T08:49:02Z","body":"@dgutov \r\nFor example, I have a backend setting like this \r\n\r\n    (company-capf :with company-yasnippet)\r\n\r\nIf I type `def`\r\n`company-capf` provides completion for `defun` while `company-yasnippet` also provides expansion for `defun`. Since both of them use the key `defun`, the duplication is resolved, and only the `company-yasnippet` expansion is provided to the frontend.\r\n\r\nBy adding the space, `defun` and `defun ` do not count as duplication. So, both of them are provided to the frontend."}}