antonk52 / basics-language-server

Buffer, path, and snippet completions
MIT License
53 stars 0 forks source link

FR: add `keyword_length` and `max_item_count` settings #3

Open chrisgrieser opened 1 week ago

chrisgrieser commented 1 week ago

cmp has two useful options, which I think are particularly useful for the buffer source, but could also of use for the other suggestion types:

antonk52 commented 1 week ago

Before I go into detail I want to highlight that a direct comparison of cmp and basics_ls is not fare as cmp is a completion engine that can perform many operation over the completions from multiple sources and basics_ls is a language server that can only provide completions and it is up to completion engine to sort/filter/hide the completions.

Initially I aimed at having a feature parity with what cmp currently offers but then found that some of it is unattainable from a language server alone. This includes both suggestions. Let me elaborate.

Let's say we are in a file where when typing on a new line f we have completions foo/foobar/foobarbaz/foobarbazzoo.

PS:

  1. I am totally with you that buffer completions are rather cumbersome as there can be too many of them
  2. Big thanks for trying it out and creating all the issues