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

nvim_lsp support #4

Closed
kkharji opened this issue Oct 14, 2020 · 10 comments
Closed

nvim_lsp support #4

kkharji opened this issue Oct 14, 2020 · 10 comments
Labels
enhancement New feature or request

Comments

@kkharji
Copy link
Contributor

kkharji commented Oct 14, 2020

It would be awesome to have preview functionality. Any ideas?

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 14, 2020

It's a hard problem.

I'm now using vim-lamp with nvim-compe.
the preview feature implemented in vim-lamp side.

I thinking now to move preview-feature into nvim-compe but it is hard...

@hrsh7th hrsh7th added the enhancement New feature or request label Oct 14, 2020
@kkharji
Copy link
Contributor Author

kkharji commented Oct 14, 2020

It's a hard problem.

I'm going to look into it.

Also, @hrsh7th it would be great if we can have a feature map for nvim_lsp, that also can answer what completion nvim_lsp features can implemented with nvim-compe. I only know of preview, is there any other?

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 14, 2020

Sorry. I'm not a native English speaker... So I didn't understand what you want maybe.

completion-nvim

  • chain completion
  • opt-{in,out} filter algorithm
  • document/signature_help preview
  • automatic insert ()
  • neosnippet/ultisnips support
  • more sources than nvim-compe
  • more configuable

nvim-compe

  • well supported isIncomplete
  • well supported trigger/keyword position
  • good fuzzy matcher

@kkharji
Copy link
Contributor Author

kkharji commented Oct 14, 2020

You're English is great, you understood exactly what I meant.

  1. chain completion: .... it sounds awesome, not sure if it a priority in your case. I think it makes things more complex for the user, specially
  2. opt-{in,out} filter algorithm: .... what is that?
  3. document/signature_help preview: .... very very important
  4. automatic insert (): .... it didn't actually work for me when testing completion-nvim, but it is nonetheless something important
  5. neosnippet/ultisnips support: .... I see a lot of user use ultisnips so I think its important, for me personally I want support for norcalli/snippets.nvim if you can give me a tell me of how things work in vim-compe, I can start working on adding
    norcalli/snippets.nvim suppot
  6. more sources than nvim-compe: .... like what?

Is there any other features, specially nvim_lsp specific ?

Specking of nvim-compe:

  • can you tell me more about isIncomplete?
  • can you tell me more about trigger/keyword position?
  • Yes the fuzzy matcher is amazing, even better than what completion-nvim has.

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 14, 2020

  1. chain-completion
  • I have no plan to implement it.
  1. opt-in,opt-out filter algorithm
  • completion-nvim has let g:completion_matching_strategy that makes the ability to customize matching algorithm by the user.
  1. documentation preview
  • I have the plan to add this but it bit hard.
  1. signature_help preview
  • I have no plan to implement it (I think it should be good to implement into lsp-client instead of completion-engine)
  1. automatic insert ()
  • completion-nvim will insert () when CompletedItem's kind is function or method.
    • I have no plan to add it because it is not a Language Server Protocol way.
  • But vim-vsnip and vim-vsnip-integ provide similar behavior.
  1. neosnippet/ultisnips/snippets.nvim support
  • I have no plan to add this. sorry.
  • I think it should be implemented in separated plugin like vim-vsnip-integ.
  1. more sources than nvim-compe
  • completion-nvim has a lot of sources.
    • completion-tags
    • completion-tabnine
    • completion-treesitter
    • etc...

isIncomplete

The Language Server Protocol defines isIncomplete=true/false for the response of completion.
This can be used to determine whatever the client should send completion requests to each keypress.

completion-nvim has isIncomplete support but nvim-compe handles it better than it (cache/debounce/empty handling etc).

trigger/keyword position

It is hard to explain... (and maybe nvim-compe has a bug related to it)

@kkharji kkharji changed the title Feature(nvim_lsp): Add popup preview Feature: nvim_lsp support Oct 14, 2020
@kkharji
Copy link
Contributor Author

kkharji commented Oct 14, 2020

For 3 and 4 I will open a PR and see what I can do. For 6, I'll use vim-vsnip-integ as an example for creating a snippet source for snippets.nvim. For 7, treesitter sound something I'd love to see supported.

Thanks for clarifying things out

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 14, 2020

If you can use vim-vsnip and vim-vsnip-integ, nvim-compe already has a source for it.

@kkharji

This comment has been minimized.

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 14, 2020

snippets.nvim is super powerful than vim-vsnip because it can be customized by lua.

vim-vsnip has a benefit that it has a vim-vsnip-integ.

If you create a plugin for snippets.nvim that similar to vim-vsnip-integ, it is very useful for some of snippets.nvim users.

@kkharji
Copy link
Contributor Author

kkharji commented Oct 28, 2020

I think this issue purpose isn't clear any more, I''ll rename it and close it

@kkharji kkharji changed the title Feature: nvim_lsp support nvim_lsp support Oct 28, 2020
@kkharji kkharji closed this as completed Oct 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants