feat(editor): ":restart" command #33953

Problem:
Developing/troubleshooting plugins has friction because "restarting"
Nvim requires quitting and manually starting again. #32484

Solution:
- Implement a `:restart` command which emits `restart` UI event.
- Handle the `restart` UI event in the builtin TUI client: stop the
  `nvim --embed` server, start a new one, and attach to it.
This commit is contained in:
Sathya Pramodh
2025-06-02 18:24:17 +05:30
committed by GitHub
parent 236243029d
commit 86835b3db3
7 changed files with 206 additions and 6 deletions

View File

@@ -3368,6 +3368,12 @@ M.cmds = {
addr_type = 'ADDR_LINES',
func = 'ex_substitute',
},
{
command = 'restart',
flags = bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR, CMDWIN, LOCK_OK),
addr_type = 'ADDR_NONE',
func = 'ex_restart',
},
-- commands that start with an uppercase letter
{
command = 'Next',