New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document workflow for local plugin development #317
document workflow for local plugin development #317
Conversation
a34a3f8
to
371d549
Compare
This should probably be in Though I wonder if recommending a dedicated vimrc is a bit overblown. Most plugin managers can add a explicit path, or one could just
in the normal |
Though I do think the readme should have a self-contained quick start sample. |
371d549
to
a8fdfda
Compare
Moved.
I think that you don't understand my use case: I want to invoke my plugin while being in my upstream git repository using Also please advise me on what I should do in order to get this PR merged. |
docs/usage/remote-plugins.rst
Outdated
symlinking it. | ||
The easiest way to do this is to create a dedicated vimrc file just for sake of | ||
development of your plugin. If you are in a root of the git repo with the | ||
plugin, consider creating this vimrc file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rather verbose, it could be 1 sentence.
For local plugin development, it's a good idea to use an isolated vimrc:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, I wanted to be precise. Will shorten.
docs/usage/remote-plugins.rst
Outdated
let &runtimepath.=','.escape(expand('<sfile>:p:h'), '\,') | ||
|
||
It will append your current work directory to the runtime path so neovim is | ||
able to find and load your plugin. You can now invoke neovim: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"neovim" is spell "Nvim" in technical resources (i.e., almost everywhere except the website).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I did s/neovim/Neovim/g
to match rest of the doc.
I fail to see what is "crippling" with adding the main repository directly to the runtime paths. This is how I manage all developed plugins, and instead use branches to switch between "stable" and "development" if needed, just as with all other vcs managed projects. I even "cripple" my rtp with a pure test rplugin which does crazy stuff in methods, because if a method is not called, a remote plugin by design does nothing. To be clear I'm not against adding any text for this usecase, but is shouldn't be worded as the "desirable" or "easiest" for local development. |
Sounds like a good idea to describe in detail in the document (or maybe
I agree this an easier approach. Personally I don't work like this - I instead |
a8fdfda
to
9e8a9d0
Compare
The CI failure is unrelated:
ping, what do I have to do in order to get this merged? |
@@ -98,7 +98,7 @@ | |||
# Add any paths that contain custom static files (such as style sheets) here, | |||
# relative to this directory. They are copied after the builtin static files, | |||
# so a file named "default.css" will overwrite the builtin "default.css". | |||
html_static_path = ['_static'] | |||
html_static_path = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why did you delete the _static
dir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you are not using it and is causing warnings during build of documentation:
WARNING: html_static_path entry u'docs/_static' does not exist
docs/usage/remote-plugins.rst
Outdated
.. code-block:: console | ||
|
||
:scriptnames | ||
1: ~/path/tp/your/plugin-git-repo/vimrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be ~/path/to/...
I guess, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
Fixes neovim#316 Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
``` WARNING: html_static_path entry u'docs/_static' does not exist docs/usage/remote-plugins.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. ``` Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
9e8a9d0
to
61af8a8
Compare
Updated. |
|
||
If you are working on your plugin locally, it may be desirable to run the | ||
plugin from a git repository directly without the need of installing or | ||
symlinking it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of thing does not need to be spelled out in extreme detail, we have to assume some basic level of familiarity with software development. So we really need to keep the documents concise, to avoid reader fatigue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be honest, this is something I prefer myself: having documentation as clear as possible. I don't like when I have to read between the lines and figure out details myself the hard way (such as, how do I make nvim pick up my plugin from $PWD
?).
I completely understand if you don't prefer this style and I have no problem adapting. That's why we do these pull requests and reviews, right?
|
||
.. code-block:: console | ||
|
||
$ cat vimrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The $
makes copy-pasting commands really annoying. Even if it's ambiguous, it's generally not a problem. And it confuses Windows users.
merged, thanks. Made some edits for brevity. |
Thanks Justin! I hope it will help some nvim-plugin-devs newbies (such as myself). |
This release adds support for Python 3.7 which now is in beta. `async` is a keyword in python3.7, and it should be replaced with `async_` when used as a keyword argument to API methods. `async` is still supported with python 2.7 and 3.6 for the moment, but considered deprecated. Also, integration with the in-process lua interpreter in Nvim is now supported. Changes since 0.2.4: * debcde0 clean up remote object implementation (#313) * e880fe7 Guidelines for local plugin development (#317) * 1ab98e8 Update the working directory on DirChanged for legacy plugins (#296) * d53415d Fix SyntaxError in py3.7: use `async_` instead of `async` (#274) * b65f62d Use `pytest` as `nosetests` are not longer maintained (#266) * d9aed96 Support using lua functions. `buf.update_higlights` as an internal example (#325)
Fixes #316