GithubHelp home page GithubHelp logo

Comments (18)

liebkne avatar liebkne commented on June 16, 2024 1

It seems space separated match style does not work too.

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

sorry for letting this linger for so long, will have a look tomorrow

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

as far as I can see, dynamic collections don't take matchers into account, which makes sense as our input must be provided in a form the dynamic backend understands. Though as a user, I'd expect to be able to preselect a list of results using ivy-restrict-to-matches and then filter that using ivy's regexp matchers. Which in fact seems to be the case, but only if candidates are plain strings (abo-abo/swiper#2168); unfortunately, ours aren't. @abo-abo: do you currently have plans to add a :filter argument to ivy-read?

from lsp-ivy.

liebkne avatar liebkne commented on June 16, 2024

@sebastiansturm

Is that mean that's a limitation of ivy? Since space-based match works in vscode while does not work in emacs.

Screen Shot 2020-06-16 at 8 55 13 AM

Screen Shot 2020-06-16 at 8 55 45 AM

Screen Shot 2020-06-16 at 8 55 54 AM


Off topic though, it would be nice to have related files info shown in the candidate list like vscode.

from lsp-ivy.

abo-abo avatar abo-abo commented on June 16, 2024

@sebastiansturm

do you currently have plans to add a :filter argument to ivy-read?

There's already a :matcher keyword.

if candidates are plain strings (abo-abo/swiper#2168); unfortunately, ours aren't.

Could you please give me a simple LSP test case that I can play around with to make S-SPC work for lsp-ivy?

However, I think it would be better for the LSP server to do the spaces-based matching and for ivy to only display the results. Similar to how counsel-rg works.

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

@sebastiansturm

do you currently have plans to add a :filter argument to ivy-read?

There's already a :matcher keyword.

oh, indeed. Not sure how I managed to miss that when I was looking for filter yesterday; thanks for the pointer!

if candidates are plain strings (abo-abo/swiper#2168); unfortunately, ours aren't.

Could you please give me a simple LSP test case that I can play around with to make S-SPC work for lsp-ivy?

there's a very minimal example included with lsp-ivy; sample-project/create_compile_commands.rb creates a compile_commands.json file so that with clangd (or ccls) you should be able to search for symbols defined within some_other_file.cpp or some_file.cpp

However, I think it would be better for the LSP server to do the spaces-based matching and for ivy to only display the results. Similar to how counsel-rg works.

yes, given @Isolet's remark I should probably have a look at what vscode is doing.

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

@sebastiansturm

Is that mean that's a limitation of ivy? Since space-based match works in vscode while does not work in emacs.

thanks, didn't know that; from a cursory glance at their github repo (symbolsQuickAccess.ts) it seems they pass the first word to the server and then use the rest for client-side filtering. Can have a look at that the coming weekend

Screen Shot 2020-06-16 at 8 55 13 AM Screen Shot 2020-06-16 at 8 55 45 AM Screen Shot 2020-06-16 at 8 55 54 AM

Off topic though, it would be nice to have related files info shown in the candidate list like vscode.

that sounds like a very useful feature too, thanks for the suggestion!

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

I opened a PR that partially addresses your request, though it does no fancy fuzzy matching, just simple string comparisons with the space-separated queries you provide. Could you check and see if that fits your needs?

from lsp-ivy.

liebkne avatar liebkne commented on June 16, 2024

@sebastiansturm The PR works quite well for me (not the original OP's request though), except some of the file info not shown.

Screen Shot 2020-06-21 at 1 23 09 PM

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

strange, could you enable lsp-log-io and post the missing candidates' uri fields please? As well as your value of (lsp-workspace-root)

from lsp-ivy.

liebkne avatar liebkne commented on June 16, 2024

The value of (lsp-workspace-root) is

Screen Shot 2020-06-21 at 7 57 58 PM

which is correct.

When I type parse args, I notice the first candidate is the parse_args in semantic_matching.py in line 200 (confirmed by RET on that candidate and the cursor jumps there), which has a [FUNC] type.

Screen Shot 2020-06-21 at 7 57 37 PM

And the output of the uri part is

Screen Shot 2020-06-21 at 7 57 02 PM

The only strange part to me is the "name" field, the variable parser is actually in line 201, and I can not find any line: 201 in buffer *lsp-log: mspyls:14807*, but the candidate for parse_args.parser has related file path shown as shown in the second image (The second candidate), while parse_args itself has not.

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

I doubt that's one of the offending matches - it specifies "kind": 13, so I assume it's one of the [Var ] items which seem to show up with correct file paths. Could you perhaps post all parse_args/parser items (or perhaps just those with "kind": 12?

from lsp-ivy.

liebkne avatar liebkne commented on June 16, 2024

Here's all the logs since the server is started until I do the first lsp-ivy with parse args: log.

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

thanks! According to your log, the parse_args function specifies no containerName, and I accidentally bound the addition of pathstr to container-name? being defined. Will push a fix shortly

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

I force-pushed the change, please have a look

from lsp-ivy.

liebkne avatar liebkne commented on June 16, 2024

@sebastiansturm Works like a charm. Thanks and sorry for hijacking the thread.

Screen Shot 2020-06-21 at 10 30 27 PM

from lsp-ivy.

sebastiansturm avatar sebastiansturm commented on June 16, 2024

thanks for your help! Will merge this then, but leave the issue open as the original request remains unaddressed

from lsp-ivy.

nbfalcon avatar nbfalcon commented on June 16, 2024

This might be solved by #24 eventually, since then we will be passing strings to ivy-read.

from lsp-ivy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.