Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve vimgrep support by trying to guess result column #492

Open
kantord opened this issue Jan 3, 2024 · 0 comments
Open

improve vimgrep support by trying to guess result column #492

kantord opened this issue Jan 3, 2024 · 0 comments

Comments

@kantord
Copy link
Owner

kantord commented Jan 3, 2024

While a --vimgrep flag exists now to provide some level of compatibility with tools that depend on the vimgrep format, it is hardcoded to assume that all results are on column 0.

While it is not possible to get a column number for results from vector embeddings, some heuristics could be applied

  • If the query interpreted as a regular expression matches a part of the result line, the beginning of the match could be the match column
  • if there is a partial match (for example a matching word, except for stopwords) that could be used to calculate the result match
  • Otherwise the first alphanumeric character could be used
  • If all else fails, fall back to 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant