You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally, to invoke the plugin launch nvim and run:
59
-
60
-
:VundleInstall
44
+
While these plugins can be installed locally, the easiest thing to do is to
45
+
run them from the repl, as described above. Simply use `lein repl` from the
46
+
plugin project's root directory.
61
47
62
48
#### Simple Plugin
63
49
64
-
:call RunSamplePluginSimple()
50
+
```
51
+
:call RunSamplePluginSimple()
52
+
```
65
53
66
54
#### Count Plugin
67
55
68
56
This plugin stays running, and maintains state. Additionally, it shows how
69
57
plugins are actually servers, which Neovim can make requests to via
70
58
rpcrequest().
71
59
72
-
:echo SamplePluginCount() ;; repeat!
60
+
```
61
+
:echo SamplePluginCount()
62
+
```
63
+
64
+
#### Socket Repl Plugin
65
+
66
+
TODO
73
67
74
68
## Future
75
69
76
70
### Tighter Integration with Neovim
77
71
78
-
Neovim's strategy for [remote plugins](http://neovim.io/doc/user/remote_plugin.html#remote-plugin) says that it's ok to create a remote plugins as "arbitrary programs that communicate directly with the high-level Nvim API and are called via [msgpack-rpc]". That's exactly what the included sample-plugin does (utilizing neovim-client).
72
+
Neovim's strategy for [remote plugins](http://neovim.io/doc/user/remote_plugin.html#remote-plugin) says that it's ok to create a remote plugins as "arbitrary programs that communicate directly with the high-level Nvim API and are called via [msgpack-rpc]". That's exactly what the included sample-plugin does (utilizing neovim-client).
79
73
80
74
However, it goes on to outline a better approach, utilizing a "plugin host". While neovim-client could potentially fill that role, considerably more work is needed.
81
75
82
-
The bottom line is this works, and possibly using ClojureScript w/ node.js, it could be fast too!
83
-
84
-
### Leiningen Template
85
-
86
-
A Leiningen template for a Neovim plugin, using neovim-client, and including
87
-
the necessary VimScript hooks.
88
-
89
-
### Stop Using lein run
90
-
91
-
Using a VimScript hook, Neovim calls `lein run` to launch the plugin. This isn't
92
-
really Leiningen's job, but it's convenient for a few reasons:
76
+
### Performance
93
77
94
-
* Single script to distribute, rather than clojure.jar, plugin jar, etc.
95
-
* Makes it easy for a plugin user to modify it - just edit .clj source.
78
+
Individual plugins can be distributed as jars using AOT compilation, as is the
79
+
case for the socket repl plugin. Additionally, porting this client library to Clojurescript would facilitate a fast startup time, via Node.
0 commit comments