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

WIP: Support neovim-prompt to improve denite prompt a lot! #40

Closed
wants to merge 3 commits into from

Conversation

lambdalisue
Copy link
Collaborator

@lambdalisue lambdalisue commented Oct 28, 2016

I'm making a general purpose customizable prompt in python, called neovim-prompt. The project is mainly for lista.nvim but we would like to use that in denite as well while the project supports

  • Custom mapping with keystroke like (<C-a><C-b>, but a bit different format with the current one)
  • Custom action
  • Cursor movement
  • Digraph with <C-K>
  • Special keys with <C-V>
  • Command-line history
  • Well tested

So denite would be more flexible and powerful with neovim-prompt 👍
This is WIP so it won't work but you can feel the flavour of the prompt 😄

I made this PR before I finished the work while I tried to keep existing code as much as possible so the implementation become a bit tricky.
So I would like to ask that if I should perform some refactoring to entire denite code as well to migrate neovim-prompt well or just make a bridge class like now?
Anyway we need some discussion about how should I implement the feature.

ToDo

  • Add neovim-prompt as git subtree
  • Create denite UI which use neovim-prompt
  • Support actions (<C-G> or whatever)
  • Support async feature
  • Support resume feature
  • Else?


@text.setter
def text(self, value):
self._context['input'] = value
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Check insert mode here? But context should not aware the bridge instance...



class BridgeContext(Context):
__slots__ = ('caret_locus', '_context')
Copy link
Collaborator Author

@lambdalisue lambdalisue Oct 28, 2016

Choose a reason for hiding this comment

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

Saving an entire _context is a bit too much. Context should hold a minimum information to restore the status to reduce the memory usage. But...

@@ -9,7 +9,7 @@

if not find_loader('vim'):
import neovim
from denite.ui.default import Default
from denite.ui.bridge import Bridge
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be changed in future release because denite will have custom UI support. That said, should neovim-prompt be a separate package rather built into denite core?

Copy link
Collaborator Author

@lambdalisue lambdalisue Oct 29, 2016

Choose a reason for hiding this comment

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

Oops. Sorry I should have said that the new implementation will be an official UI while Shougo want to focus to produce more denite specific features and he don't want to pay attention to develop prompt part of the denite (at least for now).

@lambdalisue
Copy link
Collaborator Author

I close this and re-open a new one.

@lambdalisue lambdalisue deleted the support-neovim-prompt branch November 25, 2016 08:00
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