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

1Password Sidebar!!!!! #50

Merged
merged 37 commits into from
Sep 7, 2022
Merged

1Password Sidebar!!!!! #50

merged 37 commits into from
Sep 7, 2022

Conversation

@mrjones2014
Copy link
Owner Author

#49 is still kinda big issue, not sure how to solve it. everything else is good though.

@mrjones2014
Copy link
Owner Author

@tsyroid mind giving this a spin?

@mrjones2014
Copy link
Owner Author

mrjones2014 commented Sep 7, 2022

Some specific things to test:

  • Does the sidebar open/close properly?
  • Try opening a buffer while cursor is in sidebar -- does the sidebar properly move the opened buffer to a new window?
  • Try creating a split inside the sidebar -- does the split open to the next non-sidebar buffer? (should only have one sidebar window at a time)
  • Do the keymappings work? (described here in the README.md updates)
  • Are you able to customize the keybindings, sidebar sections, and width via the config?
  • Are you able to override the highlighting groups? (groups described in README.md updates)

@tsyroid
Copy link

tsyroid commented Sep 7, 2022

Test results (so far...)
#1 (above): Yes, usually. I had one occasion of unexpected behavior but I can't remember the steps I did to trigger it. Going to consider this an 'operator error' until I can recreate.
#2: Usually. Once I opened a new buffer (:e init.lua; with cursor in sidebar) and it opened the file in the sidebar (wrong!). Tried to recreate but I can't ATM. I can recreate the following error consistently: with cursor in sidebar, type command :e. Opens a new buffer in sidebar (wrong!).
#3: Yes.
#4: ? Your link to the README.md (keymappings) is bust. I don't see any sidebar specific keymaps anywhere. Is this what you're referring to?

@mrjones2014
Copy link
Owner Author

@mrjones2014
Copy link
Owner Author

:e issue fixed.

@tsyroid
Copy link

tsyroid commented Sep 7, 2022

#4: Keymaps work from sidebar. But I have a niggle. When I open a note for editing (in 1Password app), cursor should land in the item I want to edit, not the search bar. Don't know if you can control this or not. Suggest you add a default keymap that toggles sidebar, cuz that's the most common thing I'm going to do regarding your sidebar (go?).
#2: Confirm resolved.
#5: Yes, I can successfully reconfigure sidebar.

@mrjones2014
Copy link
Owner Author

When I open a note for editing (in 1Password app), cursor should land in the item I want to edit, not the search bar.

For me, the cursor lands in the item title field of the edit view 🤔

But this isn't something I can control from the Neovim/CLI side.

Suggest you add a default keymap that toggles sidebar

I personally don't like it when plugins handle global keymappings, I prefer to handle these in my own config so keymappings can all be defined in the same place -- currently this is only defining keymappings local to the sidebar buffer.

I can add a recommended sidebar toggle keymap to the README.md though.

@tsyroid
Copy link

tsyroid commented Sep 7, 2022 via email

@mrjones2014
Copy link
Owner Author

Huh, somehow my README.md changes about the sidebar highlight groups got lost, I've added them back. Basically, can you override the highlight groups by running :hi OpSidebarHeader guifg=blue ctermfg=blue for all the highlight groups and see the colors change in the sidebar:

  • OpSidebarHeader - the section header text
  • OpSidebarItem - the text for items under a section header
  • OpSidebarFavoriteIcon - the star icon used for the 'Favorites' section header
  • OpSidebarIconDefault - all other icons in the sidebar (e.g. item category icons)

@tsyroid
Copy link

tsyroid commented Sep 7, 2022 via email

@mrjones2014
Copy link
Owner Author

Once I opened a new buffer (:e init.lua; with cursor in sidebar) and it opened the file in the sidebar (wrong!). Tried to recreate but I can't ATM.

I figured this out -- it happens when you immediately open the sidebar before anything else because I'm getting the "previous window" on open, and in this case there is no "previous window" because you've only seen one window so far. It's fixed now.

Going to merge this then, thanks for testing! 🎉🌮

@mrjones2014 mrjones2014 merged commit b2fe546 into master Sep 7, 2022
@mrjones2014 mrjones2014 deleted the mrj/42/sidebar branch September 7, 2022 12:44
@mrjones2014 mrjones2014 mentioned this pull request Sep 13, 2022
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.

1Password Sidebar
2 participants