Skip to content

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Aug 16, 2017

Rebase of #6162 with highlight support added. Rather than group names, I think it is better to transmit highlight than name, because that opens up for combined highlights in the future (think a builtin parser + rainbow parens as plugin).

Docs are still WIP. And needs more tests.

I also borrowed a function from #7082 for converting highlights.

@marvim marvim added the WIP label Aug 16, 2017
@bfredl bfredl force-pushed the extcmdline branch 3 times, most recently from 55bee32 to 2980f51 Compare August 19, 2017 15:51
@bfredl
Copy link
Member Author

bfredl commented Aug 19, 2017

Update: actually transmit contents of blocks. b/w for now, but could support coloring later on. Also blocks could be retransmitted from start, in case parser changed highlight of earlier code because later code.

Todo: This should also be done on redraw! as well as retransmitting nested cmdline.

@bfredl bfredl force-pushed the extcmdline branch 8 times, most recently from 7544259 to 1337ebd Compare August 27, 2017 08:27
@bfredl bfredl changed the title [WIP] external command line with colors [RFC] external command line with colors Aug 27, 2017
@bfredl
Copy link
Member Author

bfredl commented Aug 27, 2017

Marking RFC. Testing by external UI implementors would be appreciated.

@marvim marvim added RFC and removed WIP labels Aug 27, 2017
@bfredl
Copy link
Member Author

bfredl commented Aug 29, 2017

Note to self: test handling of inputsecret()

@bfredl bfredl force-pushed the extcmdline branch 2 times, most recently from 529b26f to fd2a03e Compare September 2, 2017 07:45
@bfredl bfredl force-pushed the extcmdline branch 3 times, most recently from 8cf85cc to 00e8f32 Compare September 9, 2017 13:30
@bfredl
Copy link
Member Author

bfredl commented Sep 10, 2017

@justinmk and others, what do you think of splitting of "6. Remote Uis" into its own help file? As the UI protocol gets more rich it is arguably not just "serialization" anymore, rather its own collection of features.

@justinmk
Copy link
Member

@bfredl I was hoping to put it in a new section in api.txt:

UI Events                            *api-ui-events*

or something like that. Haven't done it yet because I was also hoping it could be generated by gen_api_vimdoc.py

@bfredl
Copy link
Member Author

bfredl commented Sep 10, 2017

@justinmk I just pushed a WIP proposal. Please look at general structure, it is knowingly full of broken formatting and references...

Auto-generation would be useful, but I would have a shot at that in a separate PR. we can figure out the target structure first...

@bfredl
Copy link
Member Author

bfredl commented Sep 10, 2017

I wouldn't like api.txt to grow arbitrarily big. But we could call it api_events.txt and stuff like buffer events there too. But I still want remote_ui to span several sections (one for each "widget")

@@ -48,7 +48,7 @@ version.api_compatible API is backwards-compatible with this level
version.api_prerelease Declares the current API level as unstable >
(version.api_prerelease && fn.since == version.api_level)
functions API function signatures
ui_events UI event signatures |rpc-remote-ui|
ui_events UI event signatures |remote-ui|
Copy link
Member

@justinmk justinmk Sep 10, 2017

Choose a reason for hiding this comment

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

|ui| is sufficient. Just like we claimed |api|, we can make "UI" a single idea when communicating with users. Details about "msgpack" and "remote" don't need to be called out in most contexts.

Or |api-ui| if we really need the distinction.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree completely

most 256 different colors).
`ext_popupmenu` Externalize the popupmenu. |ui-events-popupmenu|
`ext_tabline` Externalize the tabline. |ui-events-tabline|
`ext_cmdline` Externalize the cmdline. |ui-events-cmdline|
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to keep the tags ui-ext-foo. "ext" is the token that means extensible/external widget.

Copy link
Member Author

Choose a reason for hiding this comment

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

the point was to make it in line with ui-events-grid and ui-events-mode. Or we could reverse them and have ui-events-global and then ui-events-grid, the "grid" is some sense a widget, just the most important one. When we get multi-grid support I would rather have a "set current grid" event (prefixed in every update batch) than duplicating every single grid event (alternatively, add it as a field to every event).

Copy link
Member

Choose a reason for hiding this comment

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

Maybe neither is needed: ui-grid, ui-mode, ui-tabline, ...

In all other contexts the ui- prefix is omitted, this means it's an editor feature.

==============================================================================
3. External Popupmenu Events *ui-events-popupmenu*

Only sent if `ext_popupmenu` option is set in *remote-ui-options*
Copy link
Member

Choose a reason for hiding this comment

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

*ui-options*. Let's move away from remote- prefix except where it's absolutely needed.

@bfredl bfredl force-pushed the extcmdline branch 2 times, most recently from 4f982b4 to ddb5da2 Compare October 26, 2017 07:43
typically used to indicate a pending state, like right after Ctrl-V.
if shift is true the text after the cursor should be shifted,
otherwise it should overshadow the char at the cursor.
Should be hidden at next cmdline_char
Copy link
Member

Choose a reason for hiding this comment

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

@bfredl should cmdline_char be cmdline_pos?

(Just let me know; I'll fix it during merge)

@justinmk justinmk mentioned this pull request Oct 28, 2017
@justinmk justinmk merged commit f640ae0 into neovim:master Oct 29, 2017
justinmk added a commit that referenced this pull request Oct 29, 2017
@justinmk justinmk removed the RFC label Oct 29, 2017
justinmk added a commit to justinmk/neovim that referenced this pull request Nov 8, 2017
FEATURES:
0e873a3 Lua(Jit) built-in neovim#4411
5b32bce Windows: `:terminal` neovim#7007
7b0ceb3 UI/API: externalize cmdline neovim#7173
b67f58b UI/API: externalize wildmenu neovim#7454
b23aa1c UI: 'winhighlight' neovim#6597
17531ed UI: command-line coloring (`:help input()-highlight`) neovim#6364
244a1f9 API: execute lua directly from the remote api neovim#6704
45626de API: `get_keymap()` neovim#6236
db99982 API: `nvim_get_hl_by_name()`, `nvim_get_hl_by_id()` neovim#7082
dc68538 menu_get() function neovim#6322
9db42d4 :cquit : take an error code argument neovim#7336
9cc185d job-control: serverstart(): support ipv6 neovim#6680
1b7a9bf job-control: sockopen() neovim#6594
6efe84a clipboard: fallback to tmux clipboard neovim#6894
6016ac2 clipboard: customize clipboard with `g:clipboard` neovim#6030
3a86dd5 ruby: override ruby host via `g:ruby_host_prog` neovim#6841
16cce1a debug: $NVIM_LOG_FILE neovim#6827
0cba3da `:checkhealth` built-in, validates $VIMRUNTIME neovim#7399

FIXES:
105d680 TUI: more terminals, improve scroll/resize neovim#6816
cb912a3 :terminal : handle F1-F12, other keys neovim#7241
619838f inccommand: improve performance neovim#6949
04b3c32 inccommand: Fix matches for zero-width neovim#7487
60b1e8a inccommand: multiline, other fixes neovim#7315
f1f7f3b inccommand: Ignore leading modifiers in the command neovim#6967
1551f71 inccommand: fix 'gdefault' lockup neovim#7262
6338199 API: bufhl: support creating new groups neovim#7414
541dde3 API: allow K_EVENT during operator-pending
8c732f7 terminal: adjust for 'number' neovim#7440
5bec946 UI: preserve wildmenu during jobs/events neovim#7110
c349083 UI: disable 'lazyredraw' during ui_refresh. neovim#6259
51808a2 send FocusGained/FocusLost event instead of pseudokey neovim#7221
133f8bc shada: preserve unnamed register on restart neovim#4700
1b70a1d shada: avoid assertion on corrupt shada file neovim#6958
9f534f3 mksession: Restore tab-local working directory neovim#6859
de1084f fix buf_write() crash neovim#7140
7f76986 syntax: register 'Normal' highlight group neovim#6973
6e7a8c3 RPC: close channel if stream was closed neovim#7081
85f3084 clipboard: disallow recursion; show hint only once neovim#7203
8d1ccb6 clipboard: performance, avoid weird edge-cases neovim#7193
01487d4 'titleold' neovim#7358
01e53a5 Windows: better path-handling, separator (slash) hygiene neovim#7349
0f2873c Windows: multibyte startup arguments neovim#7060

CHANGES:
9ff0cc7 :terminal : start in normal-mode neovim#6808
032b088 lower priority of 'cursorcolumn', 'colorcolumn' neovim#7364
2a3bcd1 RPC: Don't delay notifications when request is pending neovim#6544
023f67c :terminal : Do not change 'number', 'relativenumber' neovim#6796
1ef2d76 socket.c: Disable Nagle's algorithm on TCP sockets neovim#6915
6720fe2 help: `K` tries Vim help instead of manpage neovim#3104
7068370 help, man.vim: change "outline" map to `gO` neovim#7405
@justinmk justinmk mentioned this pull request Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui-extensibility UI extensibility, events, protocol, externalized UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants