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

symbols-view rolling fixes #861

Merged

Conversation

savetheclocktower
Copy link
Contributor

Better to keep two different PRs here than try to shoehorn these fixes into the Tree-sitter rolling PR. This one should also land in time for 1.114.

@claytonrcarter
Copy link
Contributor

I was using symbols view today and kept wanting for toggle-file-symbols to copy the current selection (if any) into the finder @ toggle, in the same way that toggle-file-finder and toggle-buffer-finder do. Is it in-scope for this PR to make a feature request, or should I file an FR issue?

@savetheclocktower
Copy link
Contributor Author

I was using symbols view today and kept wanting for toggle-file-symbols to copy the current selection (if any) into the finder @ toggle, in the same way that toggle-file-finder and toggle-buffer-finder do. Is it in-scope for this PR to make a feature request, or should I file an FR issue?

Ah, I was unaware of that setting in fuzzy-finder. It's a fine idea, but the thing I ought to be doing is having Symbols View: Go To Declaration try to act on buffer symbols instead of project symbols when there are no providers of the latter. That way you could just put your cursor on something, jump to its definition in the same file, then jump back to where you were.

@claytonrcarter
Copy link
Contributor

that setting in fuzzy-finder

Oof. You know, I did go looking to see if there was a setting controlling this, but I totally overlooked that one. I'll move this out to an FR issue, since it doesn't feel relevant for a fix PR.

act on buffer symbols instead of project symbols when there are no providers of the latter

Oh, that would explain why it wasn't working for me! 😄

Specifying the icon via the `(#set! symbol.icon "foo")` predicate was having no effect.
…that can happen if the broker is destroyed before the providers.
This should result in _lots_ more icons in the symbols list.
When enabled, will use the selected text in your editor as the search query in the symbols list.

Prefers an empty string if the setting is disabled, or if the editor selection spans more than one buffer line.
@savetheclocktower savetheclocktower linked an issue Jan 29, 2024 that may be closed by this pull request
1 task
@savetheclocktower savetheclocktower marked this pull request as ready for review February 9, 2024 17:52
@savetheclocktower
Copy link
Contributor Author

OK, I don't see myself adding any new stuff before 1.114, so this one's ready for review.

@DeeDeeG
Copy link
Member

DeeDeeG commented Feb 15, 2024

I see you're interested in this landing for 1.114, but I feel at least as under-qualified to review this as I am for the tree-sitter stuff. If there's no one else to review it I can see what I can do between now and tomorrow evening in my timezone when Release day usually kicks off.

@savetheclocktower
Copy link
Contributor Author

I'll ask around in Discord about it. You've done more than your fair share.

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks great to me!
Overall it's full of fantastic stuff:

  • Better iconography resolution (Although I hate that it has to be duplicated between symbols-view and symbols-provider-tree-sitter but understand that's the best way for now)
  • Better documentation in the type file, which is extremely helpful if we need to point any more community package maintainers there
  • Brand new feature of auto querying your selected text, which I love
  • And obviously loads more safety mechanisms, lots more nullish assignment, which I'm always a fan of.

The only thing really here that struck me as odd is the manual assignment of order in the configuration schema, not that this is a bad thing, I've just personally never seen it done, honestly made me do a double take lol, but no problem there.

Otherwise, I'm not the most qualified to review the new query file changes, but I'll happily trust you on those, since well your wrote them all originally.

Plus we have tests that seem to provide full coverage on everything here, so I'll happily say lets ship it!

@savetheclocktower
Copy link
Contributor Author

The only thing really here that struck me as odd is the manual assignment of order in the configuration schema, not that this is a bad thing, I've just personally never seen it done, honestly made me do a double take lol, but no problem there.

Without it, your properties are sorted alphabetically. Less than ideal!

@savetheclocktower savetheclocktower merged commit 114a724 into pulsar-edit:master Feb 15, 2024
103 checks passed
@savetheclocktower savetheclocktower deleted the symbols-view-fixes branch February 15, 2024 05:29
// symbol kinds:
//
// https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#symbolKind
function iconForTag(tag) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same need on my generic-lsp package, maybe we can think about movint this to the atom.ui namespace API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't be opposed to that. Ideally, we figure out how to set a good default and allow the user to override it somehow.

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

Successfully merging this pull request may close these issues.

[Feature Request] Add "prefill form" setting to symbols-view
5 participants