Comments (18)
It seems space separated match style does not work too.
from lsp-ivy.
sorry for letting this linger for so long, will have a look tomorrow
from lsp-ivy.
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.
Is that mean that's a limitation of ivy
? Since space-based match works in vscode
while does not work in emacs
.
Off topic though, it would be nice to have related files info shown in the candidate list like vscode
.
from lsp-ivy.
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.
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.
Is that mean that's a limitation of
ivy
? Since space-based match works invscode
while does not work inemacs
.
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
![]()
![]()
![]()
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.
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.
@sebastiansturm The PR works quite well for me (not the original OP's request though), except some of the file info not shown.
from lsp-ivy.
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.
The value of (lsp-workspace-root)
is
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.
And the output of the uri
part is
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.
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.
Here's all the logs since the server is started until I do the first lsp-ivy
with parse args
: log.
from lsp-ivy.
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.
I force-pushed the change, please have a look
from lsp-ivy.
@sebastiansturm Works like a charm. Thanks and sorry for hijacking the thread.
from lsp-ivy.
thanks for your help! Will merge this then, but leave the issue open as the original request remains unaddressed
from lsp-ivy.
This might be solved by #24 eventually, since then we will be passing strings to ivy-read
.
from lsp-ivy.
Related Issues (20)
- lsp-ivy endgame HOT 4
- cl-position: Wrong type argument: sequencep, 0 HOT 1
- Invalid face reference error when calling `lsp-ivy-workspace-symbol` HOT 1
- ivy-avy not working with lsp-ivy-workspace-symbol HOT 1
- Error on running lsp-ivy-workspace-symbol HOT 3
- args-out-of-range in function lsp-ivy--format-symbol-match HOT 4
- Migrate to new ivy API for asynchronous completion
- Allow finding symbols in the current document HOT 7
- only the first character is highlighted in candidate list HOT 1
- lsp-ivy-workspace-symbol error: "Error processing message (wrong-number-of-arguments (1 . 1) 3)." HOT 12
- How to select multiple fields in "Generate toString()" action HOT 4
- lsp-ivy-workspace-symbol weird matching behavior
- Implement C-SPC preview in lsp-rust-analyzer--select-related-test
- Ability to navigate to a symbol by typing the symbol name. HOT 3
- lsp-ivy-workspace-symbol not correctly working with Omnisharp
- lsp-ivy should not sort the results alphabetically HOT 3
- `(wrong-type-argument sequencep 0)` in a C++ project HOT 10
- Custom faces instead of hard-coded values HOT 2
- Correct results are only visible for a short time, if you type to quickly HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-ivy.