Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smolck/dart-nvim-api
Neovim API implementation for the Dart programming language
https://github.com/smolck/dart-nvim-api
dart dart-nvim-api neovim-api
Last synced: 11 days ago
JSON representation
Neovim API implementation for the Dart programming language
- Host: GitHub
- URL: https://github.com/smolck/dart-nvim-api
- Owner: smolck
- License: mit
- Created: 2019-10-19T17:21:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-22T20:35:56.000Z (over 3 years ago)
- Last Synced: 2024-10-01T09:18:55.967Z (about 1 month ago)
- Topics: dart, dart-nvim-api, neovim-api
- Language: Dart
- Homepage:
- Size: 103 KB
- Stars: 33
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/smolck/dart-nvim-api.svg?branch=master)](https://travis-ci.org/smolck/dart-nvim-api)
[![Pub](https://img.shields.io/pub/v/dart_nvim_api.svg)](https://pub.dartlang.org/packages/dart_nvim_api)
# Dart Nvim APINeovim API implementation for [Dart](dart.dev), based on and inspired by [neovim-lib](https://github.com/daa84/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
```dart
import 'package:dart_nvim_api/dart_nvim_api.dart';void main(List 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();
}
```