* Fix some small doc issues
* doc: fixup
* doc: fixup
* Fix lint and rebase
* Remove bad advice
* Ugh, stupid mpack files...
* Don't let people include these for now until they specifically want to
* Prevent duplicate tag
This makes it possible to restore the working directory of :terminal
buffers when reading those buffers from a session file.
Fixes#11288
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* scripts/vim-patch.sh: factor out _set_tokens_and_tags
This allows for caching `$tokens` and `$vim_commit_tags`, which will
become relevant with the next commit adding
`list_missing_previous_vimpatches_for_patch`.
- make parameters_doc a dict intead of a list
BEFORE:
"parameters_doc": [
{
"buffer": "Buffer handle, or 0 for current buffer"
}
],
AFTER:
"parameters_doc": {
"buffer": "Buffer handle, or 0 for current buffer"
},
- make "return", "seealso", lists instead of strings
Changes the generated msgpack result values in the runtime/doc/*.mpack
files to be formatted like this (instead of being formatted like Vim help text):
[
'nvim_win_get_var': {
'signature': 'nvim_win_get_var({window}, {name}, {err})',
'parameters': [('Window', 'window'), ('String', 'name'), ('Error *', 'err')],
'parameters_doc': [{'window': 'Window handle, or 0 for current window', 'name': 'Variable name'}],
'doc': ['Gets a window-scoped (w:) variable'],
'return': ['Variable value'],
'seealso': []
}
},
...
]
The following script is cut out from vim-patch.sh:
```sh
#!/usr/bin/env bash
BASENAME=vim-patch.sh
printf "\nInstructions:
To port one of the above patches to Neovim, execute this script with the patch revision as argument and follow the instructions, e.g.
'%s -p v8.0.1234', or '%s -P v8.0.1234'
NOTE: Please port the _oldest_ patch if you possibly can.
You can use '%s -l path/to/file' to see what patches are missing for a file.
" "${BASENAME}" "${BASENAME}" "${BASENAME}"
```
The code itself should be correct, but shellcheck 0.7.0 says:
```
In /tmp/test.sh line 5:
printf "\nInstructions:
^-- SC2183: This format string has 2 variables, but is passed 3 arguments.
```
We also had a problem before that a `%s` was added, but the accompanying
argument to printf was forgotten. Using a heredoc is less error-prone, since we
insert variables directly.
Judging class definitions in the form "string.find (line, '=% s * class% (')"
must force writing class definitions in this format, but such a mechanism is Absent.
Also, Lua has no formal class in the language specification, and implements inheritance with setmetadable.
To detect this, we should have a parser for it, not a simple regular expression.
Convenient for API clients who want to reuse the API docs in their own
docs. Could be used e.g. to eliminate nvim.net's own doxygen parser:
3a736232a4/src/NvimClient.APIGenerator/Docs
TODO: currently the result values are formatted as Vim help docs. We
should change the values to have structure, something like this:
[{
'nvim_win_get_var': [
'line1,
'line2',
[ 'item1', 'item2', ... ]
],
'nvim_win_set_var': [
...
],
...
}]
close#11296
Avoid noise during builds:
> fatal: No annotated tags can describe '417449f468c4ba186954f6295b3338fb55ee7b4a'.
> However, there were unannotated tags: try --tags.
This might be useful in general, but is expected to not happen - and
falling back is OK then. The fallback command would still display
errors then.
It also uses `--first-parent`, which is important for when a release
branch gets merged back.
* Fix/keep massaging git-describe result
Ref: https://github.com/neovim/neovim/pull/11117#issuecomment-536416223
* build: revisit generation of version from Git
Fixes "make clean && make", where "auto/versiondef.h" would be missing
since b18b84d - because BYPRODUCTS are apparently removed when cleaning.
This includes the following improvements/changes:
- do not run git-describe during CMake's configure phase just for
reporting
- do not print with changed Git version (too noisy, simplifies code)
* Move to src/nvim (included before config) for easier flow
* fallback to describe always, write empty include file
* update_version_stamp.lua: use prefix always