Skip to content

Commit 24e2b26

Browse files
committed
nvim: split deprecated functions
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 7e23e6b commit 24e2b26

File tree

2 files changed

+69
-66
lines changed

2 files changed

+69
-66
lines changed

nvim/api_deprecated.go

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nvim/nvim.go

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -228,52 +228,6 @@ func NewChildProcess(options ...ChildProcessOption) (*Nvim, error) {
228228
return v, nil
229229
}
230230

231-
// EmbedOptions specifies options for starting an embedded instance of Nvim.
232-
//
233-
// Deprecated: Use ChildProcessOption instead.
234-
type EmbedOptions struct {
235-
// Logf log function for rpc.WithLogf.
236-
Logf func(string, ...interface{})
237-
238-
// Dir specifies the working directory of the command. The working
239-
// directory in the current process is used if Dir is "".
240-
Dir string
241-
242-
// Path is the path of the command to run. If Path = "", then
243-
// StartEmbeddedNvim searches for "nvim" on $PATH.
244-
Path string
245-
246-
// Args specifies the command line arguments. Do not include the program
247-
// name (the first argument) or the --embed option.
248-
Args []string
249-
250-
// Env specifies the environment of the Nvim process. The current process
251-
// environment is used if Env is nil.
252-
Env []string
253-
}
254-
255-
// NewEmbedded starts an embedded instance of Nvim using the specified options.
256-
//
257-
// The application must call Serve() to handle RPC requests and responses.
258-
//
259-
// Deprecated: Use NewChildProcess instead.
260-
func NewEmbedded(options *EmbedOptions) (*Nvim, error) {
261-
if options == nil {
262-
options = &EmbedOptions{}
263-
}
264-
path := options.Path
265-
if path == "" {
266-
path = "nvim"
267-
}
268-
269-
return NewChildProcess(
270-
ChildProcessArgs(append([]string{"--embed"}, options.Args...)...),
271-
ChildProcessCommand(path),
272-
ChildProcessEnv(options.Env),
273-
ChildProcessDir(options.Dir),
274-
ChildProcessServe(false))
275-
}
276-
277231
// DialOption specifies an option for dialing to Nvim.
278232
type DialOption struct {
279233
f func(*dialOptions)
@@ -653,26 +607,6 @@ func (b *Batch) ExecLua(code string, result interface{}, args ...interface{}) {
653607
b.call("nvim_exec_lua", result, code, args)
654608
}
655609

656-
// ExecuteLua executes a Lua block.
657-
//
658-
// Deprecated: Use ExecLua() instead.
659-
func (v *Nvim) ExecuteLua(code string, result interface{}, args ...interface{}) error {
660-
if args == nil {
661-
args = []interface{}{}
662-
}
663-
return v.call("nvim_execute_lua", result, code, args)
664-
}
665-
666-
// ExecuteLua executes a Lua block.
667-
//
668-
// Deprecated: Use ExecLua() instead.
669-
func (b *Batch) ExecuteLua(code string, result interface{}, args ...interface{}) {
670-
if args == nil {
671-
args = []interface{}{}
672-
}
673-
b.call("nvim_execute_lua", result, code, args)
674-
}
675-
676610
// Notify the user with a message.
677611
//
678612
// Relays the call to vim.notify. By default forwards your message in the

0 commit comments

Comments
 (0)