Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Conversation

xiyaowong
Copy link
Contributor

  • add user configuration
  • support coc as source
  • use vim.notify instead of vim.api.nvim_notify

@xiyaowong
Copy link
Contributor Author

xiyaowong commented Oct 5, 2021

I actually prefer to use global variables(g: or vim.g.) for configuration, I think it's more convenient and easier to lazy-loading. @weilbith

@weilbith
Copy link
Owner

weilbith commented Oct 8, 2021

Sorry, to have you hanging here. I appreciate your work and enthusiasm. 🙏🏾
Some days ago I started to refactor some code to allow the extraction of protocol related stuff. The idea is to have a Lua class like object representation (kind of like it is now) for the structures the protocol defines. Independent of features for this specific plugin. And then I started to add an interface that is meant to wrap the language clients. This can be then implemented to provide the logic for the communication with the actual client implementation (e.g. NeoVim native LSP, CoC, vim-lsp, ...) and returns these standardized structures as the protocol defines. The intention is to make this code standalone and exportable into a Luarocks library or/and a utility plugin that can be used by any plugin out there that uses LSP features, but wants to be independent of which client the user uses (as now here with CoC for example).
Unfortunately I have a lot of load at work right now and this is a little more complex and I need time and piece to work on it. If I'm there that I can share it, I would love to ask you if you could implement the wrapper for the CoC client. Until then I hope everyone is fine to set their plugin managers to use this PR here.
I'm sorry that this takes longer than someone might have expected. This is a serious feature and a big topic architecture wise. Not only for this plugin. We might have an opportunity here to improve many other plugins as well (I plan to use this in my other plugins plus some I have in mind for the future).

@xiyaowong
Copy link
Contributor Author

Happy to help if i can😃

The data structures these clients return should be the same.

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