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

feat: added icons and preview to insert_file_link and insert_link #70

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

drearondov
Copy link
Contributor

Hello, I've added icons and preview window to the insert_file_link and insert_link functions.

image

To get syntax highlighting, I added this to my Neovim config.

require("plenary.filetype").add_table {
  extension = {
    ["norg"] = "norg",
  },
}

@max397574 max397574 changed the title 💄 Added icons and preview to insert_file_link and insert_link fun… feat: added icons and preview to insert_file_link and insert_link Jul 23, 2024
lua/telescope/_extensions/neorg/insert_file_link.lua Outdated Show resolved Hide resolved
lua/telescope/_extensions/neorg/insert_file_link.lua Outdated Show resolved Hide resolved
lua/telescope/_extensions/neorg/insert_link.lua Outdated Show resolved Hide resolved
@max397574
Copy link
Collaborator

Tbh I don't see why we should add an icon there in front of the paths
(and just generally a bookmark icon there doesn't make sense for me)

I don't think the plenary thing should be necessary. Norg filetype is builtin now in core. If telescope doesn't recognize it you should open an issue there or in plenary repo.

@max397574
Copy link
Collaborator

Also please change the commit message to not include an emoji
Something like the pr title which I changed

@drearondov
Copy link
Contributor Author

Tbh I don't see why we should add an icon there in front of the paths (and just generally a bookmark icon there doesn't make sense for me)

I don't think the plenary thing should be necessary. Norg filetype is builtin now in core. If telescope doesn't recognize it you should open an issue there or in plenary repo.

I though about adding the icons, because all of the other pickers have them (like the telescope built-ins), but really it's just a cosmetic thing.

About the plenary thing, I added it in the PR because I found the "-- I couldn't get syntax highlight to work with this :(" comment in the file, and since I was making changes to the previewer I didn't want them to get dismissed because of a possible syntax highlighting issue.

@max397574
Copy link
Collaborator

well for builtin picker it might make sense to add icons because they represent the filetypes
also devicons is an optional dependency there
Here you just hardcode an icon which doesn't add additional value

@drearondov
Copy link
Contributor Author

I've applied the requested changes

  • Deleted the icons
  • Deleted the padding and reverted the prompts to it's original form
  • Removed the emoji from the commit messages

Thanks for the patience and I apologise if anything I said was rude or pretentious in any way.

@drearondov drearondov requested a review from max397574 July 24, 2024 16:43
@max397574 max397574 merged commit 0319134 into nvim-neorg:main Jul 29, 2024
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.

2 participants