Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Add "all" matching strategy #163

@aca

Description

@aca

Is your feature request related to a problem? Please describe.
While I was developing LSP, I tried to implement completion which is searchable by description(detail in lsp spec).
But with current match strategy, fuzzy, exact, substring, this plugin matcher filters the completion item.

--> request #20: textDocument/completion: {"textDocument":{"uri":"file:///home/rok/zettelkasten/fa9766e6.md"},"position":{"character":4,"line":10}}
<-- result #20: textDocument/completion: [{"label":"asd","detail":"completion test","insertText":"asd"}]

image

Describe the solution you'd like
Add all match function like this.

local function all_match(prefix, word)
  return true
end

local matching_strategy = {
  all = all_match,
  fuzzy = fuzzy_match,
  substring = substring_match,
  exact = exact_match
}

I haven't looked at how other server provides completion.
But If LSP already has it's own way of matching strategy, I believe there should be an option for this plugin to not to filter the completion items. Correct me if I'm wrong.

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