Skip to content

Neovim API implementation for the Dart programming language

License

Notifications You must be signed in to change notification settings

smolck/dart-nvim-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 22, 2021
d592e02 · May 22, 2021

History

65 Commits
Nov 25, 2020
May 22, 2021
Nov 25, 2020
May 22, 2021
Oct 19, 2019
Oct 22, 2019
May 22, 2021
Oct 19, 2019
Nov 25, 2020
Oct 23, 2019
May 22, 2021

Repository files navigation

Build Status Pub

Dart Nvim API

Neovim API implementation for Dart, based on and inspired by neovim-lib. Still a WIP, so any feedback, contributions, etc. are greatly appreciated.

NOTE: Dart Nvim API is still in its early stages, so there are likely to be breaking API changes.

Example Usage

import 'package:dart_nvim_api/dart_nvim_api.dart';

void main(List<String> args) async {
  // Start up Neovim instance, with optional `onNotify` and `onRequest`
  // callbacks.
  // See also Nvim.child()
  var nvim = await Nvim.spawn();

  // Run Neovim ex command.
  await nvim.command("echo 'hello'");

  // Get ex command output.

  assert(await nvim.exec('echo 1 + 1', true) == '2');

  // Buffer example:
  var buf = await nvim.createBuf(true, false);
  var bufNameWithoutPath = 'some name';
  await nvim.bufSetName(buf, bufNameWithoutPath);
  var bufName = await nvim.bufGetName(buf);
  assert(bufName.contains(bufNameWithoutPath));

  // Kill Neovim when done.
  nvim.kill();
}

About

Neovim API implementation for the Dart programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published