Skip to content

Completion on user-defined functions doesn't work. #27

Closed

Description

@hifall

While completion on built-in functions like paste seems to work, completion on user-defined functions doesn't seem so.

For example, if I define a function like addcustom, and later I enter 'addcu' expecting addcustom to be in the completion candidate list, it's not.

Activity

  1. randy3k commented on Aug 27, 2018

    @randy3k
    Member

    Ya, it is supported in v0.2.4.

  2. randy3k commented on Aug 27, 2018

    @randy3k
    Member

    Ai, there are actually a few bugs in v0.2.4. Please install the current master and try again.
    I will publish another release in a week.

  3. hifall commented on Aug 27, 2018

    @hifall
    Author

    So glad to see that this feature will be improved soon.

    Awesome stuff! 👍

  4. randy3k commented on Aug 27, 2018

    @randy3k
    Member

    Actually, I just picked up the development today, langauageserver has not been updated for a while.

  5. hifall commented on Aug 27, 2018

    @hifall
    Author

    I see.

    I think this project definitely brings much value to many members of the R community. It certainly does to me.

  6. hifall commented on Sep 10, 2018

    @hifall
    Author

    Now that 0.2.5 is released, is this supposed to be fixed?

  7. randy3k commented on Sep 10, 2018

    @randy3k
    Member

    It has not yet submitted to CRAN because CRAN was off. You need to install it via GitHub for now.

  8. hifall commented on Sep 10, 2018

    @hifall
    Author

    Okay. I will wait until it's on CRAN then.

  9. randy3k commented on Sep 11, 2018

    @randy3k
    Member

    V0.2.5 is out

  10. hifall commented on Sep 11, 2018

    @hifall
    Author

    Doesn't seem working for me -- still unable to see a user-defined function appear in the completion list.

  11. randy3k commented on Sep 11, 2018

    @randy3k
    Member

    It works for me. Note that the server only caches user functions when a file is opened or saved.

    screen shot 2018-09-11 at 10 07 23 am

  12. hifall commented on Sep 12, 2018

    @hifall
    Author

    I see.

    But why this limitation (the server only caches user functions when a file is opened or saved)? Other language servers I have worked on don't require this.

    Is it possible/does it make sense to make it in-memory as well?

  13. randy3k commented on Sep 12, 2018

    @randy3k
    Member

    It is partly because R is unfortunately too slow. And a more economical reason is to save cpu power. Caching functions on the fly requires a lot of cpu power (related to R being slow). It is particularly important for laptop users.

    With that said, it is totally possible to make a setting to allow online caching. I am not a big fan of it and I would still recommend users turning it off, even if it exists, to save battery life.

  14. renkun-ken commented on Sep 10, 2019

    @renkun-ken
    Member

    It would be expensive at the moment to cache workspace symbols on every key stroke. I'm wondering if it makes sense and if it's possible to cache every N seconds, something like cache interval option?

  15. renkun-ken commented on Dec 9, 2019

    @renkun-ken
    Member

    1e1c74d should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions