Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Add roam-link company completion #15

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

alan-carroll
Copy link

For org-roam/org-roam#592

  • Add conditional to company-org-roam--get-candidates to check if
    completion is for a roam-link or not.
    If completion is for a roam-link, include in-buffer candidates for
    TITLEs that are not part of the org-roam database yet
  • Add conditional to company-org-roam--post-completion to check if
    completion is for a roam-link or not.
    If completion is for a roam-link either insert plain
    TITLE (completion inside [[roam:]] syntax) or insert complete roam
    link (org-roam-use-roam-links is t)

- Add conditional to company-org-roam--get-candidates to check if
  completion is for a roam-link or not.
  If completion is for a roam-link, include in-buffer candidates for
  TITLEs that are not part of the org-roam database yet
- Add conditional to company-org-roam--post-completion to check if
  completion is for a roam-link or not.
  If completion is for a roam-link either insert plain
  TITLE (completion inside [[roam:]] syntax) or insert complete roam
  link (org-roam-use-roam-links is t)
Copy link
Member

@jethrokuan jethrokuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM mostly, just needs the other PR cleaned up first.

company-org-roam.el Outdated Show resolved Hide resolved
(if (or (string= "roam" (org-element-property :type (org-element-context)))
org-roam-use-roam-links)
(if (or org-roam-use-roam-links
(string= "roam" (org-element-property :type (org-element-context))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the indentation looks a bit off here, my suggestion was typed in github, so I didn't get it right 😅

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be fixed in the last commit 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants