Commit Graph

904 Commits

Author SHA1 Message Date
Justin M. Keyes
6565adcbff
build(lint): commit linter #15725
Example test failure:

    $ nvim -es +"lua require('scripts.lintcommit')._test()"
    [ FAIL ]: expected=true, got=false
        input: ":no type before colon 1"
    [ FAIL ]: expected=true, got=false
        input: "ci: tab after colon"

Example main({trace=true}) output:

    $ nvim -es +"lua require('scripts.lintcommit').main()"
    run: { "git", "branch", "--show-current" }
    run: { "git", "merge-base", "origin/master", "master" }
    run: { "git", "merge-base", "upstream/master", "master" }
    run: { "git", "rev-list", "89db07556dbdce97c0c150ed7e47d80e1ddacad3..master" }
    run: { "git", "show", "-s", "--format=%s", "d2e6d2f5fc93b6da3c6153229135ba2f0b24f8cc" }
    Invalid commit message: "buildlint): commit linter #15620"
        Commit: d2e6d2f5fc93b6da3c6153229135ba2f0b24f8cc
        Invalid commit type "buildlint)". Allowed types are:
        { "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "test", "chore", "vim-patch" }
        See also:
            https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md#commit-messages
            https://www.conventionalcommits.org/en/v1.0.0/
2021-09-19 12:57:57 -07:00
Justin M. Keyes
2aa662568a build(lint): commit linter #15620 2021-09-19 11:06:47 -07:00
dundargoc
65572c719a
build(lint): commit linter #15620 2021-09-19 09:27:08 -07:00
Justin M. Keyes
2e8103475e
Merge #15585 refactor: move vim.lsp.diagnostic to vim.diagnostic
## Overview

- Move vim.lsp.diagnostic to vim.diagnostic
- Refactor client ids to diagnostic namespaces
- Update tests
- Write/update documentation and function signatures

Currently, non-LSP diagnostics in Neovim must hook into the LSP subsystem. This
is what e.g. null-ls and nvim-lint do. This is necessary because none of the
diagnostic API is exposed separately from the LSP subsystem.

This commit addresses this by generalizing the diagnostic subsystem beyond the
scope of LSP. The `vim.lsp.diagnostic` module is now simply a specific
diagnostic producer and primarily maintains the interface between LSP clients
and the broader diagnostic API.

The current diagnostic API uses "client ids" which only makes sense in the
context of LSP. We replace "client ids" with standard API namespaces generated
from `nvim_create_namespace`.

This PR is *mostly* backward compatible (so long as plugins are only using the
publicly documented API): LSP diagnostics will continue to work as usual, as
will pseudo-LSP clients like null-ls and nvim-lint. However, the latter can now
use the new interface, which looks something like this:

```lua
-- The namespace *must* be given a name. Anonymous namespaces will not work with diagnostics
local ns = vim.api.nvim_create_namespace("foo")

-- Generate diagnostics
local diagnostics = generate_diagnostics()

-- Set diagnostics for the current buffer
vim.diagnostic.set(ns, diagnostics, bufnr)
```

Some public facing API utility methods were removed and internalized directly in `vim.diagnostic`:

* `vim.lsp.util.diagnostics_to_items`

## API Design

`vim.diagnostic` contains most of the same API as `vim.lsp.diagnostic` with
`client_id` simply replaced with `namespace`, with some differences:

* Generally speaking, functions that modify or add diagnostics require a namespace as their first argument, e.g.

  ```lua
  vim.diagnostic.set({namespace}, {bufnr}, {diagnostics}[, {opts}])
  ```

   while functions that read or query diagnostics do not (although in many cases one may be supplied optionally):

   ```lua
   vim.diagnostic.get({bufnr}[, {namespace}])
   ```

* We use our own severity levels to decouple `vim.diagnostic` from LSP. These
  are designed similarly to `vim.log.levels` and currently include:

  ```lua
  vim.diagnostic.severity.ERROR
  vim.diagnostic.severity.WARN
  vim.diagnostic.severity.INFO
  vim.diagnostic.severity.HINT
  ```

  In practice, these match the LSP diagnostic severity levels exactly, but we
  should treat this as an interface and not assume that they are the same. The
  "translation" between the two severity types is handled transparently in
  `vim.lsp.diagnostic`.

* The actual "diagnostic" data structure is: (**EDIT:** Updated 2021-09-09):

  ```lua
  {
    lnum = <number>,
    col = <number>,
    end_lnum = <number>,
    end_col = <number>,
    severity = <vim.diagnostic.severity>,
    message = <string>
  }
  ```

This differs from the LSP definition of a diagnostic, so we transform them in
the handler functions in vim.lsp.diagnostic.

## Configuration

The `vim.lsp.with` paradigm still works for configuring how LSP diagnostics are
displayed, but this is a specific use-case for the `publishDiagnostics` handler.
Configuration with `vim.diagnostic` is instead done with the
`vim.diagnostic.config` function:

```lua
vim.diagnostic.config({
    virtual_text = true,
    signs = false,
    underline = true,
    update_in_insert = true,
    severity_sort = false,
}[, namespace])
```

(or alternatively passed directly to `set()` or `show()`.)

When the `namespace` argument is `nil`, settings are set globally (i.e. for
*all* diagnostic namespaces). This is what user's will typically use for their
local configuration. Diagnostic producers can also set configuration options for
their specific namespace, although this is generally discouraged in order to
respect the user's global settings. All of the values in the table passed to
`vim.diagnostic.config()` are resolved in the same way that they are in
`on_publish_diagnostics`; that is, the value can be a boolean, a table, or
a function:

```lua
vim.diagnostic.config({
    virtual_text = function(namespace, bufnr)
        -- Only enable virtual text in buffer 3
        return bufnr == 3
    end,
})
```

## Misc Notes

* `vim.diagnostic` currently depends on `vim.lsp.util` for floating window
  previews. I think this is okay for now, although ideally we'd want to decouple
  these completely.
2021-09-16 14:23:42 -07:00
Gregory Anders
d140d3bd33
fix(docs): ignore _*.lua files from auto doc generation #15678 2021-09-16 10:49:11 -07:00
Gregory Anders
a5bbb932f9 refactor: move vim.lsp.diagnostic to vim.diagnostic
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).

More discussion at [1].

[1]: https://github.com/neovim/neovim/pull/15585
2021-09-15 14:09:47 -06:00
Christian Clason
c58a667e57 chore(vim-patch): add doc/vim9.txt to unwanted files 2021-09-10 13:20:11 +02:00
Gregory Anders
a422f2136a
docs(gen_vimdoc.py): ignore health.lua files #15614 2021-09-09 18:28:12 -07:00
Dundar Göc
9367aee62d ci: ensure all PRs are up to date with master before attempting squash
This is to ensure unrelated authors don't get credited.
2021-08-15 12:38:05 +02:00
James McCoy
084b28bec8
Merge pull request #15367 from jamessan/release-fixes
Clean up release handling
2021-08-14 21:22:13 -04:00
James McCoy
f027c5e1e4
build: update appdata.xml version in release commit
Adding the version we just released in the "version bump" commit is
useless, since that means the actual release only reports the old
version.

Closes #15362

[skip ci]
2021-08-13 23:32:10 -04:00
dundargoc
222cd43222
ci: comment from bot is more helpful in case of conflict (#15359)
Also change PR title to follow conventional commits convention.
2021-08-13 15:58:31 +02:00
dundargoc
ce172d8d4a
ci: fix typo squasher by changing trigger to "pull_request_target" (#15357)
The "pull_request" trigger only enables read-access for forks,
"pull_request_target" is required if a fork is to be a trigger. Also
changed the python script to reflect this change.
2021-08-13 15:18:15 +02:00
dundargoc
7dbbd5d8b1
ci: create GitHub Action that squashes all typo PRs into a single PR (#15041)
The action adds all pull-request authors (and Marvim) as a co-author to the
newly created PR and also links to the closed PRs.
2021-08-09 15:21:50 +02:00
zeertzjq
545e05d2fe
chore(vim-patch.sh): replace hub with gh (#15162) 2021-08-03 19:52:48 +02:00
Dundar Göc
9f6989d551 chore: PVS/V1042 - ignore warning globally.
V1042 is a warning that a file has a copyleft license, which is an
irrelevant warning to open-source projects.
2021-07-17 17:27:17 +02:00
Matthieu Coudron
389cbe63bf chore: add log hander to gen_vimdoc
so it actually dumps output.
Plus a description of what it does in the argparser.
2021-07-10 17:55:45 +02:00
dundargoc
e8247bc739
lint (#14941)
Fix SC2155 error, found by shellcheck v0.7.2.

https://github.com/koalaman/shellcheck/wiki/SC2155
2021-07-01 12:37:03 -04:00
Daniel Steinberg
fe10a4e555
Open funcs_data.mpack in binary mode. (#14944)
"b" flag is required to read binary files on Windows. 
https://www.lua.org/pil/21.2.2.html
2021-06-30 18:17:48 -04:00
Daniel Steinberg
99a4152a4b
fix: Remove [RFC] from PR subject in vim-patch.sh (#14917)
As of PR #10383, CONTRIBUTING.md says '[RFC] is assumed by default'. As
of PR #11656, CONTRIBUTING.md says '**do not** put "RFC" in the PR
title'.
2021-06-28 20:40:00 -04:00
Jan Edmund Lazo
a72dfec855
release.sh: use stdin for release commit message (#14832)
v0.5.0 has too many commits since v0.4.0.
"git commit -m" triggers "Argument list too long" error.
2021-06-16 22:58:54 -04:00
Mathias Fussenegger
2bdd553c9e feat(lsp): Add codelens support 2021-06-14 21:45:14 +02:00
James McCoy
cf714bf418
vim-patch.sh -m: Ignore changes to version.c
[skip ci]
2021-05-19 22:50:05 -04:00
James McCoy
86d35bef13
fix(vim-patch.sh -m): Show all commits touching a file, not just the first
[skip ci]
2021-05-19 22:50:05 -04:00
TJ DeVries
27da5511a0
docs: Treesitter (#13260)
* doc & fixes: Generate treesitter docs

* fixup to treesitter-core

* docs(treesitter): fix docs for most functions

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2021-05-01 08:19:48 -04:00
James McCoy
794a287846
fix(pvscheck): Switch URL to pvs-studio.com
[skip ci]
2021-04-29 20:04:29 -04:00
Matthieu Coudron
e55c27fc6e more generic shebang for lua2dox_filter
previous one was not working/ or use /bin/sh
2021-03-04 15:44:40 +01:00
Matthieu Coudron
513ac58043 fix: section_name must be a dict {filename:name}
else it was triggering an error during regeneration of the files.
2021-03-04 15:44:40 +01:00
Jan Edmund Lazo
4a1a86a2be
vim-patch.sh: remove unsupported files (#13570)
Add files listed in https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim#na-not-applicable-patches.
2021-02-03 18:53:27 -05:00
Jan Edmund Lazo
f3c242c13c
vim-patch:8.1.1241: Ex command info contains confusing information
Problem:    Ex command info contains confusing information.
Solution:   When using the NOTADR flag use ADDR_OTHER for the address type.
            Cleanup code using NOTADR.  Check for errors in
            create_cmdidxs.vim.  Adjust Makefile to see the errors.
b731689e85

Use Lua's "assert()" to make an invalid command definition
a compilation error.

Misc changes:

Remove 'RESTRICT' flag.
Neovim does not support "restricted" mode
since commit 7777532ceb.

TODO:
Do not generate files before Lua assertions
so that CMake always runs the generator script
if the previous build has an invalid command definition.
2021-01-01 04:30:55 -05:00
notomo
93ba977793 docs: add check_textlock attribute 2020-12-16 21:57:24 +09:00
James McCoy
2b594b9c81
Use vX.Y.Z-dev+{git-describe} for development versions 2020-12-06 21:01:11 -05:00
TJ DeVries
f75be5e9d5
lsp: vim.lsp.diagnostic (#12655)
Breaking Changes:
- Deprecated all `vim.lsp.util.{*diagnostics*}()` functions.
    - Instead, all functions must be found in vim.lsp.diagnostic
    - For now, they issue a warning ONCE per neovim session. In a
      "little while" we will remove them completely.
- `vim.lsp.callbacks` has moved to `vim.lsp.handlers`.
    - For a "little while" we will just redirect `vim.lsp.callbacks` to
      `vim.lsp.handlers`. However, we will remove this at some point, so
      it is recommended that you change all of your references to
      `callbacks` into `handlers`.
    - This also means that for functions like |vim.lsp.start_client()|
      and similar, keyword style arguments have moved from "callbacks"
      to "handlers". Once again, these are currently being forward, but
      will cease to be forwarded in a "little while".
- Changed the highlight groups for LspDiagnostic highlight as they were
  inconsistently named.
    - For more information, see |lsp-highlight-diagnostics|
- Changed the sign group names as well, to be consistent with
  |lsp-highlight-diagnostics|

General Enhancements:
- Rewrote much of the getting started help document for lsp. It also
  provides a much nicer configuration strategy, so as to not recommend
  globally overwriting builtin neovim mappings.

LSP Enhancements:
- Introduced the concept of |lsp-handlers| which will allow much better
  customization for users without having to copy & paste entire files /
  functions / etc.

Diagnostic Enhancements:
- "goto next diagnostic" |vim.lsp.diagnostic.goto_next()|
- "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()|
    - For each of the gotos, auto open diagnostics is available as a
      configuration option
- Configurable diagnostic handling:
    - See |vim.lsp.diagnostic.on_publish_diagnostics()|
    - Delay display until after insert mode
    - Configure signs
    - Configure virtual text
    - Configure underline
- Set the location list with the buffers diagnostics.
    - See |vim.lsp.diagnostic.set_loclist()|
- Better performance for getting counts and line diagnostics
    - They are now cached on save, to enhance lookups.
    - Particularly useful for checking in statusline, etc.
- Actual testing :)
    - See ./test/functional/plugin/lsp/diagnostic_spec.lua
- Added `guisp` for underline highlighting

NOTE: "a little while" means enough time to feel like most plugins and
plugin authors have had a chance to refactor their code to use the
updated calls. Then we will remove them completely. There is no need to
keep them, because we don't have any released version of neovim that
exposes these APIs. I'm trying to be nice to people following HEAD :)

Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
2020-11-12 22:21:34 -05:00
James McCoy
088161a945
pvs: Exclude xdiff from analysis and comment munging 2020-11-10 10:00:25 -05:00
James McCoy
65993c444a
Use the free PVS-Studio license
As of release 7.10, PVS Studio requires a license, even for the "check
me" comment based analyzing.
2020-11-10 09:42:28 -05:00
Thomas Vigouroux
3eb241d831
bundle: move tree-sitter as a bundled dep
fixup! bundle: move tree-sitter as a bundled dep

fixup! bundle: move tree-sitter as a bundled dep
2020-11-03 10:39:35 +01:00
Jan Edmund Lazo
442ad4bb63
fixup! rename: user_funcs -> userfunc 2020-11-01 13:22:52 -05:00
Jan Edmund Lazo
5db836bbca
fixup! eval.c: factor out eval/funcs.c #11828 2020-11-01 13:21:33 -05:00
Jan Edmund Lazo
ff11247837
fixup! refactor: move session functions to ex_session.c 2020-11-01 12:17:39 -05:00
Jan Edmund Lazo
074745d924
Fix shellcheck error SC2155
Close https://github.com/neovim/neovim/pull/11765
2020-10-15 22:51:19 -04:00
Daniel Hahler
82b09bc9d2
scripts/vim-patch.sh: include --shortstat with -m 2020-10-15 22:51:19 -04:00
James McCoy
ec057d40f3
Download emoji-data from UNIDATA/ 2020-10-04 11:50:29 -04:00
TJ DeVries
4a2618c817
doc: Add docs for uri functions (#12887) 2020-09-14 09:12:17 -04:00
James McCoy
b163a89925
vim-patch.sh: Fix PR subject with multiple patches 2020-09-04 08:46:46 -04:00
Justin M. Keyes
c2662210b5
docs, remove 'guifontset' #11708
- remove redundant autocmd list
  This "grouped" list is useless, it only gets in the way when searching
  for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes #11960
- options: remove 'guifontset'. Why:
  - It is complicated and is used by almost no one.
  - It is unlikely to be implemented by Nvim GUIs (complicated to parse,
    specific to Xorg...).
2020-08-31 00:51:35 -07:00
Patrice Peterson
9d9edebceb gen_vimdoc: Allow to keep intermediary output 2020-08-23 13:48:27 +02:00
Patrice Peterson
ac05343a10 Add docs for most vim.lsp methods
Most of the lsp.log will be addressed in a separate PR.
2020-08-23 13:48:25 +02:00
jnozsc
44cbf288ec
script: simplify python version check (#12672) 2020-07-24 22:42:25 +02:00
TJ DeVries
7b529e7912
doc: fix scripts and regenerate (#12506)
* 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
2020-07-02 07:09:17 -04:00
Thomas Vigouroux
6b949211a0 treesitter: update runtime
Update to 81d533d2d1b580fdb507accabc91ceddffb5b6f0.
2020-06-03 21:33:34 +02:00
Thomas Vigouroux
662688817b treesitter: enhance script and add README
The script now updates a `treesitter_commit_sha.txt` file to keep track
of which commit/branch/tag we're at.
2020-06-02 23:13:42 +02:00
Thomas Vigouroux
f5fbe8e3b5 treesitter: add update script and update runtime
Update treesitter runtime to : 9a82dcc666d06617cbab3061467075019fae0b0d
2020-06-02 23:13:42 +02:00
Poh Zi How
ed815c61fd
vim-patch.sh: fix bash version-check message #12398 2020-05-31 10:27:05 -07:00
James McCoy
c37d9fa3da
Merge pull request #11764 from blueyed/vim-patch-usage 2020-05-15 10:45:10 -04:00
James McCoy
fdedaa7226
Merge pull request #12081 from xylix/bash-version-check 2020-04-21 22:35:31 -04:00
Kerkko Pelttari
f47e574c87 Apply suggestions from code review
Improve error message for unsupported bash version, use double square bracket operator

Co-Authored-By: Daniel Hahler <github@thequod.de>
2020-04-07 10:43:17 +03:00
Kerkko Pelttari
d26a66a2b3 Check for bash version in vim-patch.sh 2020-04-06 09:59:25 +03:00
James McCoy
dc7f59e04b
vim-patch.sh: Fix creation of commit list for PR review
[ci skip]
2020-03-31 22:40:33 -04:00
Daniel Hahler
1dc5e5ae9b doc 2020-01-26 15:20:51 +01:00
Daniel Hahler
20f5f44883 set -u before return
Follow up to a4d21f059.
2020-01-26 15:07:44 +01:00
Daniel Hahler
f755370682 scripts/vim-patch.sh: add -m to usage
Ref: https://github.com/neovim/neovim/pull/11514#issuecomment-569476828
2020-01-26 14:51:14 +01:00
Chris LaRose
c6ff23d7a0 terminal: absolute CWD in term:// URI #11289
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>
2020-01-26 00:24:42 -08:00
Jan Edmund Lazo
4c152be726
fixup! fixup! vim-patch.sh: list related missing Vim patches [ci skip] #11514 2020-01-19 10:05:23 -05:00
Justin M. Keyes
9231684986
doc [ci skip] #11656 2020-01-12 23:41:55 -08:00
Jan Edmund Lazo
a4d21f0592 vim-patch.sh: fix for bash 4.3 or older #11700 2020-01-11 12:09:54 -08:00
Justin M. Keyes
0dcf4bd3eb gen_vimdoc.py: rename mode to target 2019-12-31 15:39:17 -08:00
Justin M. Keyes
b112fe828f gen_vimdoc.py: generate LSP docs 2019-12-31 08:06:48 -08:00
Justin M. Keyes
c24f8f46b4 gen_vimdoc.py: sort by name 2019-12-30 03:31:32 -08:00
Justin M. Keyes
b81547ce6d gen_vimdoc.py: better handling of inline (non-block) nodes 2019-12-30 03:12:24 -08:00
Justin M. Keyes
27b678f577 gen_vimdoc.py: fix deprecated check 2019-12-30 00:15:49 -08:00
Jan Edmund Lazo
81a0d10f13
fixup! vim-patch.sh: list related missing Vim patches [ci skip] #11514 2019-12-29 18:34:04 -05:00
Daniel Hahler
5f1aec5abd Fix scripts/vim-patch.sh for Bash 4.3
Ref: https://github.com/neovim/neovim/pull/11514#issuecomment-568780231
2019-12-25 13:03:16 +01:00
Daniel Hahler
34abe8fd23 vim-patch.sh: list related missing Vim patches [ci skip] #11514
* 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`.
2019-12-24 08:15:18 +01:00
Daniel Hahler
2e280dac7d gen_vimdoc.py: lint #11593 2019-12-23 07:08:49 +01:00
Justin M. Keyes
781c708c27
Merge #11396 'gen_vimdoc.py: mpack result' [ci skip] 2019-12-22 05:40:31 +01:00
Justin M. Keyes
9ea7aeb308 gen_vimdoc.py: rename for clarity
- render_para => fmt_node_as_vimhelp
- Inline parse_parblock() in fmt_node_as_vimhelp()
2019-12-21 20:36:00 -08:00
Justin M. Keyes
4657819e80 gen_vimdoc.py: mpack: collect functions in 1 dict
All Nvim API, core Vimscript, and core Lua functions are globally
unique, so there is no need for per-module nested dicts.

BEFORE (generated mpack structure):
    [
      {
        "buffer.c": {
          "nvim__buf_stats": { ... },
          ...
        },
        "window.c": {
          "nvim_win_close": { ... },
          ...
        },
        ...
      }
    ]

AFTER (generated mpack structure):
    [
      {
        "nvim__buf_stats": {
          ...
        },
        "nvim_buf_attach": {
          ...
        },
        "nvim_tabpage_set_var": {
          ...
        },
        "nvim_ui_attach": {
          ...
        },
        "nvim_win_close": {
          ...
        }
      }
    ]
2019-12-21 20:36:00 -08:00
Justin M. Keyes
f968dad3bf gen_vimdoc.py: fix "seealso", "xrefs"
- Also fix xrefs ("Deprecated" section)
- Fix "Deprecated" rendering by a weird hack (see comment).
- Eliminate unnecessary use of render_para()
2019-12-21 20:36:00 -08:00
Justin M. Keyes
62e365f577 gen_vimdoc.py: mpack: exclude deprecated functions
The `mpack` variable was a tuple, which manifests as an array in the
generated msgpack structure.
- Removes noise from the mpack data (deprecated functions are
  deprecated).
- Eliminates 1 level of nesting.

BEFORE:
    [
      {
        "buffer.c": [
          {
            "nvim__buf_stats": { ... },
            ...
          },
          {
            "buffer_del_line": { ... },
            ...
          },
        ],
        ...
      }
    ]

AFTER:
    [
      {
        "buffer.c": {
          "nvim__buf_stats": { ... },
          ...
        },
        ...
    ]
2019-12-21 20:36:00 -08:00
Justin M. Keyes
481da1ce40 gen_vimdoc.py: fix mpack generator
- 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
2019-12-21 20:36:00 -08:00
Justin M. Keyes
01adb81c55 gen_vimdoc.py: DRY 2019-12-21 20:36:00 -08:00
Brian Wignall
001e69cd46 doc: fix typos
close #11459
2019-11-27 22:47:25 -08:00
Justin M. Keyes
f460bae441 release.sh [ci skip] 2019-11-24 17:53:33 -08:00
Justin M. Keyes
af53a0c012
doc: Lua [ci skip] #11378
- Rework :help lua-commands
- Rename if_lua.txt => lua.txt
2019-11-17 19:06:59 -08:00
smolck
4bd7881fce [scripts/gen_vimdoc.py] Generate better-formatted mpack
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': []
            }
        },
        ...
    ]
2019-11-15 20:00:13 -06:00
Marco Hinz
9fb278ddea
vim-patch.sh: multiline printf -> heredoc (#11351)
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.
2019-11-08 20:47:58 +01:00
Marco Hinz
2ba212e8c2
vim-patch.sh: add missing argument
[skip ci]
2019-11-08 15:18:01 +01:00
Justin M. Keyes
3e21d49836 Merge #11319 'inccommand: fix issues with modifiers and prompting' 2019-11-05 17:34:21 -08:00
erw7
90981f5861 update_version_stamp.lua: Use NUL on Windows #11323 2019-11-02 04:54:59 +09:00
Hirokazu Hata
f9da267373
scripts/lua2dox.lua: Remove class declaration block
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.
2019-10-27 11:58:28 +09:00
Justin M. Keyes
6d8fe9b3f4 lint 2019-10-26 16:21:22 -07:00
smolck
46bde66147 gen_vimdoc.py: dump API docs to msgpack #11296
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
2019-10-26 15:31:15 -07:00
Daniel Hahler
c5c06665ed
scripts/vim-patch.sh: lazily update Vim source (#11207)
This gets done only initially, for `-l`, and when a commit cannot be found.

Also provide more compact instructions with `-l` / `show_vimpatches`.
2019-10-16 15:44:38 +02:00
Daniel Hahler
5cf6beb221 scripts/vim-patch.sh -l: display commit subjects
Closes https://github.com/neovim/neovim/pull/11182.
2019-10-13 23:14:33 +02:00
Daniel Hahler
6768c43e21 update_version_stamp: redirect stderr on first try, --first-parent #11186
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.
2019-10-10 01:38:15 -07:00
Daniel Hahler
30ae60e7ca
Fix/revisit git-describe enhancement (#11124)
* 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
2019-10-02 03:45:59 +02:00
Daniel Hahler
b18b84df5e
build: run git-describe for dev version during build (#11117)
This avoids invoking CMake after a new commit, which might take 15s on
some systems.

Skipped on CMake < 3.2.0 (missing BYPRODUCTS support).

Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2019-09-30 00:10:29 +02:00
Justin M. Keyes
8f3d0276ee release.sh [ci skip] 2019-09-15 23:08:40 -07:00
Justin M. Keyes
3195637252 release.sh [ci skip] 2019-09-15 16:35:22 -07:00
Justin M. Keyes
2e0e592ea2 release.sh: bump nvim.appdata.xml 2019-09-14 17:54:16 -07:00
Justin M. Keyes
456f1d4bdd doc: |api-fast| [ci skip] 2019-09-09 10:52:12 -07:00
Daniel Hahler
d000f02bc0
vim-patch.sh: fix "unbound variable" error with Bash < 4.4 [ci skip] (#10917)
Ref: https://github.com/neovim/neovim/pull/10888#issuecomment-526774032
2019-09-03 10:12:02 +02:00
Daniel Hahler
e03a4f965e
scripts/vim-patch.sh: massage args for git-log [ci skip] (#10888)
Replace "src/nvim/" => "src/".
Replace ".*/.vim-src/" => "".

This allows to use tab completion based on existing files in Neovim's
source, or via .vim-src.

Previously you would have to typically remove the "nvim/" part manually
yourself.
2019-08-30 16:46:29 +02:00
Justin M. Keyes
87140f234a Merge #10646 'vim-patch: runtime patches' 2019-08-01 16:43:14 +02:00
Justin M. Keyes
5342342426 runtime: move matchit.vim to /pack/dist/opt/
Align matchit.vim with upstream Vim. We don't want to maintain a fork of
matchit.vim; our small changes should be sent to
https://github.com/chrisbra/matchit
2019-08-01 15:43:53 +02:00
Daniel Hahler
213b6b5c28
vim-patch: handle tags, pass through git-log options (#10140)
* scripts/vim-patch.sh: fall back to "origin" for remote

Without this, it would fail e.g. with a locally cloned repo of Neovim.

* scripts/vim-patch.sh: assign_commit_details: handle tags  [ci skip]

- Handle "v" prefix from Vim tags.
- Exit in case of error therein already.

* -l/-L: pass through git-log options  [ci skip]

This allows for only listing missing patches for a given Vim file:

> scripts/vim-patch.sh -L src/edit.c
2019-07-30 07:45:59 +02:00
Daniel Hahler
d7b04ae7a7 py: flake8 fixes 2019-07-29 22:14:23 +02:00
Daniel Hahler
97ce776e7b scripts: autopep8 2019-07-29 22:14:23 +02:00
Ihor Antonov
dd94165f4e pvscheck.sh: Remove --verbose flag #10473
pvscheck.sh gives error:
    Flag could not be matched: verbose
2019-07-12 11:36:19 +02:00
Disconnect3d
c515b5c1f1 scripts/stripdecls.py #10458
Remove the `only_static = False` which clobbers the `--static`
CLI argument.
2019-07-09 20:06:52 +02:00
Daniel Hahler
b74da2ff3e vim-patch.sh: git-for-each-ref: use strip [ci skip] #10169
- It is a synonym for lstrip, which works with older Git versions also
  (2.7.4, Ubuntu Xenial).
- exit in case of errors from git-foreach-ref
- msg_err: echo to stderr

Ref: https://github.com/neovim/neovim/pull/10165#issuecomment-500164356
2019-06-09 16:13:06 +02:00
Daniel Hahler
a2bb63c182 vim-patch.sh: improve performance with -l [ci skip] #10165
Down to < 1s now also (without get_vim_sources).
2019-06-09 16:01:18 +02:00
Daniel Hahler
b398b1eedd vim-patch.sh: use --no-backup-if-mismatch [ci skip] #10156 2019-06-08 15:06:16 +02:00
Daniel Hahler
766657320a vim-patch.sh: improve patching [ci skip] #10154
(fuzz, unified, exit)

Fixes https://github.com/neovim/neovim/issues/10143
2019-06-08 14:42:17 +02:00
Daniel Hahler
bf16b14f46 vim-patch.sh: improve performance #10137
`vim-patch.sh -L`: down to ~0.5s from ~85s.
`vim-patch.sh -l`: down to ~6s from ~90s.

    % diff old new:
    193c193
    <   • v8.0.1366
    ---
    >   • v8.0.1367
    354d353
    <   • v8.0.1738

This is due to duplicate tags for Vim commits
(https://github.com/vim/vim/issues/4510):

  - vim/vim@1ad022a9b: tagged as v8.0.1367, v8.0.1366
  - vim/vim@5d69da462: tagged as v8.0.1739, v8.0.1738
2019-06-08 14:18:35 +02:00
Daniel Hahler
25ec0c8805 vim-patch.sh: fix shellcheck issues [ci skip] #10138 2019-06-08 14:02:30 +02:00
Justin M. Keyes
4769deb36a
doc #10017
- gen_vimdoc.py: fancy "bullet"
- rework `:help channel-callback`
- rename `:help buffered` to `:help channel-buffered`
2019-05-25 10:00:41 +02:00
Justin M. Keyes
e628c011bf gen_vimdoc.py: support lua/shared.lua module [ci skip] 2019-05-19 17:30:20 +02:00
KillTheMule
b102c11e38 gen_vimdoc.py: get Lua docs via lua2dox.lua #9740 2019-05-18 22:01:14 +02:00
Douglas 'dopessoa' Pessoa
aa610690bf genappimage.sh: migrate to linuxdeploy #10027
generate_type2_appimage is unmaintained, and lacks a way to rename the appimage file.

fix #9893
2019-05-18 20:38:19 +02:00
Justin M. Keyes
c11e618133 gen_vimdoc.py: support <pre> preformatted text [ci skip] 2019-05-01 00:18:49 +02:00
Justin M. Keyes
c1887f465d gen_vimdoc.py: skip "Parameters" header if all excluded 2019-04-22 21:24:46 +02:00
Daniel Hahler
49ca20aaf3 vim-patch.sh: perf, readability #9044
closes #9044
2019-04-12 00:28:02 +02:00
Justin M. Keyes
27cd1e07ed doc [ci skip]
- README.md: Removed waffle.io because that service is shutting down.
2019-04-08 03:42:21 +02:00
Justin M. Keyes
281c011d44 gen_help_html.py [ci skip] 2019-03-27 00:50:38 +01:00
Justin M. Keyes
bec4066033 gen_vimdoc.py: render nested lists, etc [ci skip]
- render_node() is now the main rendering function: it traverses a node
  and builds the Vim help text recursively.
- render_para() is weird and ugly, it is the entry-point for rendering
  the help text for one docstring'd function.
2019-03-26 21:33:06 +01:00
Billy Su
8ba484ab69 vim-patch.sh: mention URL for hub tool #9659
closes #9659
2019-03-02 03:26:11 +01:00
Justin M. Keyes
cd64f5abd4 gen_api_vimdoc.py: Do not wrap on hyphens, long words
- Any long symbol is intentional and should never be hardwrapped.
- Vim help tags are often hyphenated, and hardwrapping on hyphens breaks
  the Vim help syntax parser.
2019-01-26 20:38:14 +01:00
Justin M. Keyes
c70c8b607f doc [ci skip] #9478
- Lua
- developer guidelines
- MAINTAIN.md
- TUI: cleanup
- TUI: mention Windows terminfo builtins
- cleanup if_pyth, redirect python-bindeval tag

Helped-by: Björn Linse <bjorn.linse@gmail.com>
Helped-by: erw7 <erw7.github@gmail.com>
2019-01-26 20:38:14 +01:00
Justin M. Keyes
f2cc9e8826 pvscheck.sh: set --sourcetree-root [ci skip]
Reverts previous experiment. PVS root is working correctly, one can
observe this in the PVS-studio.err file, for example:

    /usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:51:1: warning: V677 ...
    /usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:132:1: warning: V677 ...
    ./src/nvim/fileio.c:1382:1: warning: V1026 ...
    ./src/nvim/fileio.c:1388:1: warning: V1026 ...

The "./src/nvim/…" paths are correctly rooted, yet PVS somehow still
thinks it should analyze "/usr/local/clang-7.0.0/…".

See also: https://stackoverflow.com/q/44906903
2019-01-19 22:13:58 +01:00
Justin M. Keyes
391f0c1ce7 pvscheck.sh: do not set --sourcetree-root [ci skip]
System headers should be ignored by PVS, but somehow aren't.
See also: https://stackoverflow.com/q/44906903
2019-01-19 13:04:32 +01:00
Justin M. Keyes
e8137d263e pvscheck.sh: ignore stddef.h
This system header should be ignored by PVS.
See also: https://stackoverflow.com/q/44906903
2019-01-18 02:43:42 +01:00
Justin M. Keyes
0d66cdc6f9
pvscheck.sh: Fix download URL #9500
- old URL redirects to https://www.viva64.com/en/pvs-studio-download/
- page now contains tgz files for macOS and Linux; the pattern must
  match only the Linux URL
2019-01-14 00:23:28 +01:00
Justin M. Keyes
61ec31cde1 release.sh 2019-01-13 15:21:24 +01:00
erw7
a4076e5dcf win/TUI: fix text overrides line numbers #9474
fixes #9461
2019-01-09 10:40:02 +01:00
Justin M. Keyes
c8e78abaf9 pvscheck.sh: Skip install if dir exists 2019-01-08 01:30:46 +01:00
Justin M. Keyes
292b1790c8 release.sh: Format issue-numbers in descriptions [ci skip] 2019-01-04 06:03:47 +01:00
Justin M. Keyes
e22bf529c1 release.sh: fix exclusion pattern [ci skip]
grep support of "\s" pattern is unreliable.
2019-01-04 06:03:37 +01:00
Justin M. Keyes
725da1feeb
Merge #9401 from justinmk/pr-win-erw7 2018-12-30 23:54:23 +01:00
pierre
92806827a9 appimage: Include metadata #9320
closes #9320
closes #9128
2018-12-30 23:02:40 +01:00
Justin M. Keyes
dba69a1d3b update_terminfo.sh: NOLINT data arrays 2018-12-28 23:52:03 +01:00
Justin M. Keyes
959df5d8a5 update_terminfo.sh: Use printf instead of echo 2018-12-28 23:52:03 +01:00
Justin M. Keyes
c1015121ec Merge 'upstream/master' into pr-win-erw7 2018-12-27 22:49:44 +01:00
erw7
6c62f7b715 win/TUI: builtin terminfos for cygwin, conemu, et al. 2018-12-27 22:39:54 +01:00
erw7
6060301558 win/TUI: SetConsoleMode() to override libuv #9094
Use uv_set_vterm_state() to override libuv's guess.
See https://github.com/libuv/libuv/pull/1873/ for discussion.

This commit uses a terminal-detection approach based on
GetProcessImageFileNameW(...), which will be reverted in the following
commit. The approach was intended to handle the case of running in
winpty (:terminal), but we will add $NVIM env var for that.

Also add some support for ConEmu, cygwin.
2018-12-27 22:35:59 +01:00
erw7
cb76a8a95f genappimage: Unset $ARGV0 at invocation #9376
AppImage sets $ARGV0 which breaks zsh.
Hack around this in our appimage.

fixes #9341
ref https://github.com/AppImage/AppImageKit/issues/852

[ci skip]
2018-12-19 06:30:58 +01:00
Justin M. Keyes
bc132ae123
runtime/syntax: Fix highlighting of augroup contents (#9328)
Comparing `vimCommand` from Vim's runtime/syntax/vim.vim, one can see
that "augroup" and similar commands are conspicuously missing. They are
handled specially (`vimAugroupKey`, `vimAutoCmd`).

Excluding them from the generated `vimCommand` keyword list, fixes their
highlighting.

closes #9327
2018-12-08 01:16:58 +01:00
Justin M. Keyes
452cadb85a scripts/gen_help_html.py
Adapted from https://github.com/c4rlo/vimhelp/
License: MIT
2018-11-28 03:48:06 +01:00
Jan Edmund Lazo
59ded3ef29 vim-patch: add matchit doc
matchit doc is named 'pi_matchit.txt'.
2018-11-12 12:36:40 -05:00
Jan Edmund Lazo
dec38601c5 vim-patch: rename path to check_colors.vim 2018-11-12 12:36:40 -05:00
Jan Edmund Lazo
89621464fc vim-patch: move test_urls.vim out of runtime/
Rename it to check_urls.vim, similar to check-includes.py.
2018-11-12 12:36:40 -05:00
Justin M. Keyes
2ee4ce0639 doc: merge sponsor.txt into intro.txt
Also mention how to donate to Nvim.

closes #8603
2018-11-05 22:45:48 +01:00
Justin M. Keyes
afd1d412fa auevents.lua: keep events in alphabetical order 2018-10-22 01:30:29 +02:00
Justin M. Keyes
c05982cf35 vim-patch.sh: Skip Vim screen-dump files 2018-10-05 09:51:38 +02:00
Daniel Hahler
c2f337ce97 vim-patch.sh: use --ff with git-pull
I have `merge.ff = no` in my Git config to not use fast-forward merges
by default, but when updating the Vim sources it should not cause a
merge commit.

[ci skip]
2018-09-30 21:05:26 +02:00
Justin M. Keyes
8872fce120 vim-patch.sh: Also check for .git/ directory
In the case of nested repos, such as when "neovim/" repo contains
"neovim/.vim-src/" repo,
    git rev-parse --show-toplevel
returns the fullpath to the "neovim/" repo, which failed the condition.

ref #8875
ref c05d7153d3
2018-08-21 08:37:49 +02:00
James McCoy
c05d7153d3 vim-patch.sh: Use git-rev-parse to check repo (#8875)
Explicitly checking for the .git/ directory doesn't work in various
situations (e.g., git-worktree).

[ci skip]
2018-08-20 17:41:00 +02:00
Jan Edmund Lazo
6aefae8c4e terminfo: add header guard, stdint.h for int8_t (#8848)
Lint fixes for single-include test.
2018-08-11 16:06:57 +02:00
Marco Hinz
ceeca24205
terminfo: add scripts/update_terminfo.sh
This script updates the built-in terminfo entries.

[skip ci]
2018-08-10 14:58:23 +02:00
James McCoy
68411dc189
vim-patch.sh: Fix replacement which converts #1234 to vim/vim#1234
Noticed in cb7bdf5f, where the script incorrectly converted `#ifdef` to
`vim/vim#ifdef`.

[skip ci]
2018-08-09 20:10:41 -04:00
Jason Felice
c7efc6047d vim-patch.sh: Pass directory name to find (#8830)
BSD/Mac find requires directory names before arguments.
2018-08-09 01:56:55 +02:00
Peter Hodge
7ab27eeb53 DOC: add support for intro sections in api docs 2018-07-25 15:07:13 +10:00
Justin M. Keyes
0615450688 gen_api_vimdoc.py: add whitespace before "~" 2018-07-18 13:38:06 +02:00
James McCoy
35b269f51f
vim-patch.sh: Unwrap commit messages when reviewing PRs
Longer summary lines for commits may be wrapped when downloading the
commit from GitHub.  Unwrapping the lines ensures they can be compared
with the raw Vim commits.

The difference before and after this patch using:

  ./scripts/vim-patch.sh -r 8684

Before:

  ✘ Wrong commit message.
    Expected:
  vim-patch:8.0.1464: completing directory after :find does not add slash

  Problem:    Completing directory after :find does not add slash.
  Solution:   Adjust the flags for globpath(). (Genki Sky)
  vim/vim@8a37b03
    Actual:
  vim-patch:8.0.1464: completing directory after :find does not
   add slash

  Problem:    Completing directory after :find does not add slash.
  Solution:   Adjust the flags for globpath(). (Genki Sky)

After:

  ✔ Found expected commit message.

[ci skip]
2018-07-10 19:54:44 -04:00
James McCoy
44a284d71c vim-patch.sh: review_commit: Fix regex for vim version
067bb1e9f changed the commit format to include a brief description in
the summary line of the commit.
2018-07-09 13:55:21 -04:00
James McCoy
56af2f8c5f vim-patch.sh: Use single quotes to avoid doubling backslashes 2018-07-09 13:51:13 -04:00
James McCoy
85d5bf81b9
gen_api_vimdoc: Make executable and change #! to python3 2018-06-29 18:46:05 -04:00
James McCoy
c8af12d0fa vim-patch: Replace shell variables in printf with formatted args
This ensures that special characters in the variables are not
interpreted as escapes/format characters in the printf string, as was
seen with upstream patch 8.0.0615.

    $ ./scripts/vim-patch.sh -p 8.0.0615
    Updating Vim sources: /$HOME/src/neovim/.vim-src
    ✔ Updated Vim sources.
    ✔ Found Vim revision 'bf15b8d78b22661db8b19d662b62bb9a061cdd37'.
    Creating patch...
    Pre-processing patch...
    ✔ Saved patch to '/$HOME/src/neovim/vim-8.0.0615.patch'.

    Fetching 'origin/master'.
    ✔ From https://github.com/neovim/neovim
     * branch                master     -> FETCH_HEAD

    Creating new branch 'vim-8.0.0615' based on 'origin/master'.
    ✔ Switched to a new branch 'vim-8.0.0615'
    Branch 'vim-8.0.0615' set up to track remote branch 'master' from 'origin'.

    Creating empty commit with correct commit message.
    ./scripts/vim-patch.sh: line 40: printf: `w': invalid format character
    ✔ [vim-8.0.0615 db7fbb016] vim-patch:8.0.0615: using ./scripts/vim-patch.sh: line 44: printf: `w': invalid format character
    ✘ [vim-8.0.0615 db7fbb016] vim-patch:8.0.0615: using

[ci-skip]
2018-06-19 10:20:48 -04:00
Justin M. Keyes
fa2ad305e3 version bump 2018-06-11 10:58:54 +02:00
Justin M. Keyes
44c6deb91a NVIM v0.3.0
FEATURES:
3cc7ebf810 #7234 built-in VimL expression parser
6a7c904648 #4419 implement <Cmd> key to invoke command in any mode
b8363283fa #7679 'startup: treat stdin as text instead of commands'
58b210e114 :digraphs : highlight with hl-SpecialKey #2690
7a13611ba2 #8276 'startup: Let `-s -` read from stdin'
1e71978cf0 events: VimSuspend, VimResume #8280
1e7d5e8cdf #6272 'stdpath()'
f96d99ad11 #8247 server: introduce --listen
e8c39f72fd #8226 insert-mode: interpret unmapped META as ESC
98e7112390 msg: do not scroll entire screen (#8088)
f72630b784 #8055 let negative 'writedelay' show all redraws
5d2dd2ebe2 win: has("wsl") on Windows Subsystem for Linux #7330
a4f6cec7a3 cmdline: CmdlineEnter and CmdlineLeave autocommands (#7422)
207b7ca4bc #6844 channels: support buffered output and bytes sockets/stdio

API:
f85cbea725 #7917 API: buffer updates
418abfc9d0 #6743 API: list information about all channels/jobs.
36b2e3f743 #8375 API: nvim_get_commands
273d2cd5d5 #8329 API: Make nvim_set_option() update `:verbose set …`
8d40b3617c #8371 API: more reliable/descriptive VimL errors
ebb1acb3c0 #8353 API: nvim_call_dict_function
9f994bb699 #8004 API: nvim_list_uis
34057045be #7520 API/UI: forward option updates to UIs
911b1e49ab #7821 API: improve nvim_command_output

WINDOWS OS:
9cefd83cc7 #8084, #8516 build/win: support MSVC
ee4e1fd8ec win: Fix reading content from stdin (#8267)

TUI:
ffb8904913 #8309 TUI: add support for mouse release events in urxvt
8d5a46e77b #8081 TUI: implement "standout" attribute
60716371e9 TUI: support TERM=konsole-256color
67848c0b91 #7653 TUI: report TUI info with -V3 ('verbose' >= 3)
3d0ee17c91 TUI/rxvt: enable focus-reporting
d109f5645b #7640 TUI: 'term' option: reflect effective terminal behavior

FIXES:
ed6a113804 #8273 'job-control: avoid kill-timer race'
4e02f1ab87 #8107 'jobs: separate process-group'
451c48a092 terminal: flush vterm output buffer on pty output #8486
5d6732ff09 :checkhealth fixes #8335
53f11dcfc7 #8218 'Fix errors reported by PVS'
d05712fbe7 inccommand: pause :terminal redraws (#8307)
51af911a27 inccommand: do not execute trailing commands #8256
84359a467f terminal: resize to the max dimensions (#8249)
d49c1dda8b #8228 Make vim_fgets() return the same values as in Vim
60e96a45b4 screen: winhl=Normal:Background should not override syntax (#8093)
0c59ac1a2c #5908 'shada: Also save numbered marks'
ba87a2cde7 cscope: ignore EINTR while reading the prompt (#8079)
b1412dc412 #7971 ':terminal Enter/Leave should not increment jumplist'
3a5721e91b TUI: libtermkey: force CSI driver for mouse input #7948
6ff13d78b7 #7720 TUI: faster startup
1c6e956079 #7862 TUI: fix resize-related segfaults
a58c9094db #7676 TUI: always hide cursor when flushing, never flush buffers during unibilium output
303e1df13f #7624 TUI: disable BCE almost always
249bdb07dd #7761 mark: Make sure that jumplist item will not have zero lnum
6f41ce0260 #7704 macOS: Set $LANG based on the system locale
a043899ba2 #7633 'Retry fgets on EINTR'

CHANGES:
ad60927d09 #8304 default to 'nofsync'
f3f1970597 #8035 defaults: 'fillchars'
a6052c7307 #7984 defaults: sidescroll=1
b69fa866db #7888 defaults: enable cscopeverbose
7c4bb23ff3 defaults: do :filetype stuff unless explicitly "off"
2aa308c685 #5658 'Apply :lmap in macros'
8ce6393048 terminal: Leave 'relativenumber' alone (#8360)
e46534b423 #4486 refactor: Remove maxmem, maxmemtot options
131aad953c win: defaults: 'shellcmdflag', 'shellxquote' #7343
c57d315963 #8031 jobwait(): return -2 on interrupt also with timeout
6452831cf9 clipboard: macOS: fallback to tmux if pbcopy is broken #7940
300d3651e2 #7919 Make 'langnoremap' apply directly after a map
ada1956206 #7880 'lua/executor: Remove lightuserdata'

INTERNAL:
de0a9548f7 #7806 internal statistics for list impl
dee78a4095 #7708 rewrite internal list impl
2018-06-11 00:46:49 +02:00
Justin M. Keyes
53f11dcfc7
Merge #8218 'Fix errors reported by PVS'
closes #4983
2018-04-27 09:25:02 +02:00
ZyX
4ce8521ee4 pvscheck: Disable V011 warning 2018-04-22 20:54:17 +03:00
ZyX
cb3bb0becb pvscheck: Add --update switch 2018-04-17 01:44:11 +03:00
ZyX
57c66bc168 pvscheck: Remove outputs before running plog-converter
plog-converter behaviour is not the best one when creating fullhtml report and
directory already exists: it puts report inside an existing directory. Not sure
what exactly it does if inside exists as well, but if I am not mistaking report
will not be created.
2018-04-17 01:37:58 +03:00
Justin M. Keyes
f19db1b9ba remove scripts/run-api-tests.exp
Usage of this script was removed 0c2ec77ae0.
2018-04-11 00:56:36 +02:00
ZyX
6b84f7813c pvscheck: Also provide source tree root to plog-converter 2018-04-02 00:16:22 +03:00
ZyX
65d0b8ed32 pvscheck: Also produce fullhtml reports 2018-04-02 00:15:31 +03:00
ZyX
7eceac218e pvscheck: Make realdir work with nonexistent directories 2018-04-02 00:07:05 +03:00
Justin M. Keyes
f8d2aef4f2 vim-patch.sh: remove blank line before URL
This "stacks" better in squashed PRs, etc.
2018-03-24 23:08:40 +01:00
James McCoy
4e5e6506b5
pvscheck: Ignore exit code of pvs-studio-analyzer
Since its typically non-zero, the script immediately exits instead of
converting the binary log into useful formats.
2018-03-11 18:01:44 -04:00
James McCoy
9dc3cc2c68
genappimage: Include update information for releases/nightlies
This will allow users to use AppImageUpdate to update their AppImage.
It requires publishing the created zsync file alongside the appimage
file for the releases.
2018-03-09 20:49:26 -05:00
James McCoy
e1f27cdb4c
genappimage: Create a type 2 AppImage 2018-03-09 20:49:26 -05:00
James McCoy
b0d08998f5
genappimage: Use AppImage/AppImages repo to avoid redirects 2018-03-09 20:49:24 -05:00
Giuseppe
d53aa0e94f vim-patch.sh: more colorful #8115 2018-03-09 00:58:12 +01:00
Marco Hinz
a98736b9c0
scripts: fix shebang of shadacat.py [ci skip] 2018-03-04 02:52:23 +01:00
Justin M. Keyes
b67ce84c45 vim-patch.sh: delete *.orig files 2018-02-11 15:27:55 +01:00
Justin M. Keyes
e69a71427c vim-patch.sh: remove --posix from patch invocation
This was supposed to avoid creating *.orig. It doesn't do that, and
worse, it also seems to prevent new files from being created.
2018-02-11 15:27:47 +01:00
Daniel Hahler
0d548b73ef scripts/vim-patch.sh: continue when patching with -P fails (#7790)
The `set -e` caused the script to stop in case `patch` fails, but it is
better to continue giving instructions.
2017-12-30 14:15:51 +01:00
Justin M. Keyes
7773bbd098 vimpatch.lua: automate version.c
Invoke it like this:

    VIM_SOURCE_DIR=~/neovim/.vim-src/ nvim -i NONE -u NONE --headless +'luafile ./scripts/vimpatch.lua' +q
2017-12-27 12:30:55 +01:00
Justin M. Keyes
903ed09a61 vim-patch.sh: extract list_vimpatch_tokens()
Use streams instead of for-loop (20x speedup for list_vimpatch_tokens).
2017-12-26 04:00:18 +01:00
Justin M. Keyes
973bd10a12 vim-patch.sh: introduce -V 2017-12-26 04:00:18 +01:00
Justin M. Keyes
fe60fa9faa doc
vim-patch:8.0.1206: no autocmd for entering or leaving the command line
(commit a4f6cec7a3)

NA patches:
vim-patch:8.0.0320: warning for unused variable with small build
2017-12-26 03:58:28 +01:00
James McCoy
067bb1e9f4
vim-patch.sh: Include upstream summary in commit message
[ci skip]
2017-12-17 10:45:55 -05:00
Justin M. Keyes
23fb833ea7 vim-patch.sh: remove version.c in generated patch
Vim patch tracking is now driven completely by `vim-patch:xxx` tokens in
the VCS logs. version.c will be auto-generated, if it is used at all.
2017-12-11 00:54:25 +01:00
Justin M. Keyes
56b49955b7 vim-patch.sh: introduce -L 2017-12-11 00:49:44 +01:00
Justin M. Keyes
5bd8827431 vim-patch.sh: always use git log, not version.c 2017-12-10 17:13:22 +01:00
Justin M. Keyes
9ada97a810 gen_api_vimdoc.py: require "nvim_" prefix
Avoids doxygen bugs (things that aren't functions) and other noise (e.g.
`remote_ui_disconnect()` was incorrectly included in api.txt).
2017-12-10 17:13:22 +01:00
Justin M. Keyes
84d9245c70 pvscheck.sh: auto-detect URL by default
The hardcoded URL breaks very often, this confuses people.
Instead, auto-detect if no URL is provided.

Also auto-detect if the script is invoked with no arguments.
2017-11-21 01:38:30 +01:00
Justin M. Keyes
d6f9d1df04 version bump 2017-11-18 12:46:38 +01:00
Justin M. Keyes
ea51f08276 vim-patch.sh: avoid creating *.orig files 2017-11-07 22:33:26 +01:00
Justin M. Keyes
3a7feb6989 vim-patch.sh: remove vimrc_example.vim
vimrc_example.vim is not relevant to Nvim. Anything worth having in
there should be made an actual default.

.gitignore:
  - remove *.orig ... super annoying
2017-11-07 20:38:04 +01:00
Justin M. Keyes
dc92901094 vim-patch.sh: new option -P 2017-11-07 00:54:05 +01:00
Justin M. Keyes
280943d9b9 doc: API (generated) 2017-11-06 04:51:34 +01:00
Justin M. Keyes
7e59b897c1 gen_api_vimdoc.py: workaround: attributes of (void) functions 2017-11-06 04:27:31 +01:00
Justin M. Keyes
7984959ef5 gen_api_vimdoc.py: support Doxygen @note 2017-11-06 04:16:07 +01:00
James McCoy
e6d4b7686c
vim-patch.sh: Exclude testdir/ files from src/ file pruning
Without the testdir/ exclusion, all directories under src/ were affected
by this cleanup.  However, testdir/ has its own pruning that happens
later.
2017-09-27 08:20:43 -04:00
Justin M. Keyes
8aa0dfd684 doc: "terminal" always means "embedded terminal emulator"
- Prefer "TUI" where possible to refer to the host terminal.
- Remove obsolete tags and ancient TTY exposition.
- Establish "terminal" to consistently mean "terminal emulator" in all
  Nvim documentation. This removes the need for verbose qualifiers in
  tags and prose.

References #6280
References #6803
2017-08-03 00:29:51 +02:00
lonerover
e3a2b7220f vim-patch.sh: only show missing patches 2017-07-15 20:34:24 +08:00
James McCoy
06ec15121a
Bump Vim version to 8.0 and applied patches 2017-07-14 06:44:06 -04:00
ZyX
aa3e3b4ca6 pvscheck: Add --environment-cc switch
To be used to make bot-ci able to use clang-4.0 without hacks.

[ci skip]
2017-07-04 19:25:05 +03:00
James McCoy
03fc0e3f41
scripts: Tell curl to follow redirects 2017-06-29 20:25:51 -04:00
James McCoy
25eced62b6
Update emoji-data URL for Unicode 10
vim-patch:8.0.0652
2017-06-29 17:46:27 -04:00
Justin M. Keyes
2b377d89db scripts/pvscheck.sh: fix function rename 2017-06-25 07:53:27 +02:00
Justin M. Keyes
4b08b5d194 scripts/pvscheck.sh: HACK: de-parallelize on CI
https://github.com/neovim/bot-ci/pull/105#issuecomment-309282132
2017-06-25 07:35:01 +02:00
Justin M. Keyes
a469704495 scripts/pvscheck.sh: HACK: de-parallelize on CI
References https://github.com/neovim/bot-ci/pull/105
2017-06-25 03:26:24 +02:00
Justin M. Keyes
26235bc050 genappimage.sh: set CMAKE_INSTALL_MANDIR
Avoids attempt to install manpage to system location.

Also:
- Don't attempt `nvim --version` until after it was built.
- Remove unnecessary `mkdir`.
2017-06-19 01:44:38 +02:00
Daniel Hahler
45df8f77df scripts/pvscheck.sh: fixes
[ci skip]
2017-06-17 20:37:13 +02:00
Daniel Hahler
6eb2bcd1a0 scripts/vim-patch.sh: do not git-reset on push failure (#6878)
This was added from the beginning to submit_pr in 775a16b0b, but I
cannot see why that is useful - in contrast, it will mess with the local
branch in case "origin" cannot be pushed to (i.e. when it points to
neovim/neovim itself).
2017-06-11 16:25:13 +02:00
James McCoy
90f20bd7b1 pvscheck: Fix argument handling in do_recheck
[ci skip]
2017-06-09 16:42:43 -04:00
ZyX
c585a72cdc pvscheck: Provide arguments to patch_sources in correct order 2017-05-20 05:06:16 +03:00
ZyX
7f24736ebc pvscheck: Handle invalid option error gracefully 2017-05-20 03:44:23 +03:00
ZyX
d72df05b93 pvscheck: Add --only-analyse mode 2017-05-20 03:35:50 +03:00
Björn Linse
c778311505 generators: separate source generators from scripts 2017-05-10 16:14:12 +02:00
Björn Linse
489d10c57c api: generate ui events 2017-05-10 16:14:10 +02:00
ZyX
577befef97 generators: Do not leak error messages text 2017-05-08 20:54:09 +03:00
ZyX
09f849b600 Merge branch 'master' into luaviml'/lua 2017-05-08 15:43:45 +03:00
AdnoC
3c0cc028b7 dist: AppImage #6638
scripts/genappimage.sh produces an executable:
    nvim-${NVIM_VERSION}-glibc${GLIBC_VERSION}-${ARCHITECTURE}.AppImage

Closes #6083
2017-05-04 14:43:41 +02:00
ZyX
4f4d21693b pvscheck: Use absolute path for finding test-include.c
It was currently unknown in which directory create_compile_commands will end up 
in.

[ci skip]
2017-05-02 21:53:16 +03:00
ZyX
0c6e0460b6 pvscheck: When using --recheck rerun build
[ci skip]
2017-05-02 18:40:51 +03:00
ZyX
3638d28f68 pvscheck: Add --deps to build with all dependencies
[ci skip]
2017-05-02 18:40:50 +03:00
ZyX
97806ee6d6 pvscheck: Add --pvs-install mode
[ci skip]
2017-05-02 18:40:50 +03:00
ZyX
68945ead63 pvscheck: Refactor script so that it only cds in a subshell
[ci skip]
2017-05-02 18:40:50 +03:00
ZyX
4cb61aa742 pvscheck: Create getopts_long implementation
Needed as argument list is growing large and I absolutely do not find short
options provided by getopts being particularly readable for unfamiliar commands.

[ci skip]
2017-05-02 18:40:22 +03:00
Justin M. Keyes
1d4f8f6b6a Merge #6636 from ZyX-I/pvs-update 2017-05-02 12:00:35 +02:00
ZyX
15d39022ab pvscheck: Add --pvs key to pvscheck.sh
[ci skip]
2017-05-02 04:04:20 +03:00
ZyX
7fc3cccfaa pvscheck: Update pvs-studio URL
[ci skip]
2017-05-02 04:04:10 +03:00
ZyX
bcc97afbd2 pvscheck: Do not use test x
[ci skip]
2017-05-02 04:03:50 +03:00
Justin M. Keyes
9a1b144054 scripts/release.sh 2017-05-01 22:13:23 +02:00
Björn Linse
97126bfa02 api: deprecate obsolete nvim_buf_get_number function 2017-04-30 11:04:10 +02:00
Justin M. Keyes
0df1b6655b doc: Removed t_XX options/keycodes. (#6616)
Closes #4482

TODO: revisit find_key_option_len()
2017-04-29 16:56:40 +02:00
Patrick Jackson
8dc3eca49b api/dispatch: Mark generated functions table readonly (#6576) 2017-04-24 12:39:48 +02:00
Justin M. Keyes
3fbc660d57 api_set_error(): rename 2017-04-23 23:44:57 +02:00
Justin M. Keyes
2ed91f222f api/internal: Remove set field from Error type. 2017-04-23 23:44:32 +02:00
Sander Bosma
5c9860a0a2 api: Do not truncate errors <1 MB. #6237
Closes #5984
2017-04-23 23:44:29 +02:00
Justin M. Keyes
15af803cce Merge #6550 from ZyX-I/pvs-check-comment 2017-04-20 22:00:03 +02:00
Justin M. Keyes
b25fa94eb5 scripts/vim-patch.sh: word-boundaries in preprocess regex 2017-04-19 21:26:17 +02:00
ZyX
3351016dcd scripts: Add newline after the comment 2017-04-19 19:11:37 +03:00
ZyX
4555bf9e7f scripts: Allow patching only build files 2017-04-19 19:10:53 +03:00
ZyX
9fd048d901 scripts: Do not patch already patched sources in patch mode
Also do not patch header files, that is not needed.
2017-04-19 19:04:00 +03:00
ZyX
38b2bc9a88 scripts: Make pvs do not patch separate directory, add patch mode 2017-04-19 18:55:32 +03:00
Björn Linse
7d0fc179e6 genmsgpack: Do not export functions with __ 2017-04-11 23:56:18 +03:00
ZyX
f98a3d85ed lua: Move files from src/nvim/viml/executor to src/nvim/lua 2017-04-11 01:09:36 +03:00
ZyX
55292685d3 pvscheck: Add --recheck argument 2017-04-10 14:07:26 +03:00
ZyX
2b13c87fa2 pvscheck: Do not use --depth 2017-04-10 13:47:31 +03:00
ZyX
d7086f44f4 pvscheck: Do not trace help 2017-04-10 13:45:33 +03:00
ZyX
3bd11f2911 pvsscript: Use git clone and not git worktree 2017-04-10 13:42:31 +03:00
ZyX
59f0cbc282 pvscheck: Add help 2017-04-10 13:41:09 +03:00
ZyX
ebfcf2fa38 scripts: Create script which checks Neovim with PVS-studio 2017-04-10 13:24:31 +03:00
ZyX
043d8ff9f2 Merge branch 'master' into luaviml'/lua 2017-04-08 01:54:58 +03:00
James McCoy
210b013ce7 vim-patch: Update regex for included_patches array (#6449)
28dafe3ff const-ified the array without updating the regex.

[ci skip]
2017-04-06 02:10:20 +02:00
ZyX
a32db8ed19 eval/typval: Add missing includes, also add a script to find them
Contains unfinished attempt to integrate IWYU (ref #549). To finish it different
job should be done, specifically:

- Instead of feeding IWYU with modified file a mirror source tree should be
  created with the help of CMake which will contain modified sources. This
  solves the problem with IWYU thinking that `*.generated.h` headers should be
  included in place of `*` headers.
- Build IWYU as all other third-party utilities.
- Make modified sources avoid problems with `nvim/func_attr.h` includes and
  various related tricks.

Current script may only be used for manual checks like this:

    ./scripts/check-includes.py \
        --generated-includes-dir build/include \
        --generated-includes-dir build/src/nvim/auto \
        --file src/nvim/eval/typval.c \
        -- -Isrc -Ibuild/include -Ibuild/src/nvim/auto \
           -DINCLUDE_GENERATED_DECLARATIONS

(it is also somewhat fine with `--file src/nvim/eval/typval.h`). I have no idea
why (I mean, why developer think that these lines are needed, why they are
suggested is pretty obvious: because there is typedef which mentions them before
structs are defined), but for typval.h it reports, among other things, that it
should add lines

    struct dictvar_S;
    struct listitem_S;
    struct listvar_S;
    struct listwatch_S;
2017-03-29 10:08:06 +03:00
ZyX
ae4adcc707 gendeclarations: Make declarations generator work with macros funcs
Now it checks functions also after every semicolon and closing figure brace, 
possibly preceded by whitespaces (tabs and spaces). This should make messing 
with declarations in macros not needed.
2017-03-27 00:12:23 +03:00
ZyX
52c7066f4b gendeclarations: Handle case when text did not match 2017-03-27 00:12:23 +03:00
ZyX
c470fc32a8 gendeclarations: Also save information about directory 2017-03-27 00:12:23 +03:00
ZyX
f74322b9a5 gendeclarations: Save where declaration is comping from 2017-03-27 00:12:23 +03:00
ZyX
6b4a51f7ea scripts: Make generate_vim_module more generic 2017-03-27 00:12:23 +03:00
ZyX
600bee9d4f genmsgpack: Include error source in error messages 2017-03-27 00:12:22 +03:00
ZyX
5c1b9a0d2a api: Reserve more numbers for internal calls
Reasoning; currently INTERNAL_CALL is mostly used to determine whether it is 
needed to deal with NL-used-as-NUL problem. This code is useful for nvim_… API 
calls done from VimL, but not for API calls done from lua, yet lua needs to 
supply something as channel_id.
2017-03-27 00:11:28 +03:00
ZyX
ba2f615cd4 functests: Test for error conditions
During testing found the following bugs:

1. msgpack-gen.lua script is completely unprepared for Float values either in 
   return type or in arguments. Specifically:

   1. At the time of writing relevant code FLOAT_OBJ did not exist as well as 
      FLOATING_OBJ, but it would be used by msgpack-gen.lua should return type 
      be Float. I added FLOATING_OBJ macros later because did not know that 
      msgpack-gen.lua uses these _OBJ macros, otherwise it would be FLOAT_OBJ.
   2. msgpack-gen.lua should use .data.floating in place of .data.float. But it 
      did not expect that .data subattribute may have name different from 
      lowercased type name.

2. vim_replace_termcodes returned its argument as-is if it receives an empty 
   string (as well as _vim_id*() functions did). But if something in returned 
   argument lives in an allocated memory such action will cause double free: 
   once when freeing arguments, then when freeing return value. It did not cause 
   problems yet because msgpack bindings return empty string as {NULL, 0} and 
   nothing was actually allocated.
3. New code in msgpack-gen.lua popped arguments in reversed order, making lua 
   bindings’ signatures be different from API ones.
2017-03-27 00:11:28 +03:00
ZyX
e7bbd8256b eval: Add luaeval function
No tests yet, no documentation update, no :lua* stuff, no vim module.

converter.c should also work with typval_T, not Object.

Known problem: luaeval("1", {}) results in

    PANIC: unprotected error in call to Lua API (attempt to index a nil value)

Ref #3823
2017-03-27 00:11:24 +03:00
Justin M. Keyes
03a04172ec scripts/vim-patch.sh: Remove "Last change ..." lines.
Also:
- fix ignoring doc/tags file
- use 12 chars of hash instead of 7
2017-03-21 12:19:16 +01:00
Björn Linse
7d28489a33 release.sh: add api metadata fixture if api level was bumped 2017-03-15 15:01:06 +01:00
Björn Linse
da6f4c146e api: implement FUNC_API_SINCE 2017-03-15 15:01:06 +01:00
Justin M. Keyes
985bc6c6e0 doc/api.txt: Merge with api-funcs.txt
It's important that users have a single, easy-to-remember place for
reading about the API. So this commit changes gen_api_vimdoc.py so that
the generated section is appended to api.txt instead of creating
a separate document.

Also remove the section numbering and ToC: it's a maintenance cost, and
it will be unnecessary when #5169 is integrated.
2017-03-01 23:14:45 +01:00
Tommy Allen
4e4c785063 scripts: Annotate API functions in generated docs (#6199) 2017-03-01 17:55:34 +01:00
James McCoy
0882ca50d8 vim-patch.sh: Bump base Vim version to 7.4.1980
All patches up through 7.4.1974 have been merged and 7.4.1975-1979 are
pending in a PR.

[ci skip]
2017-02-27 09:31:25 -05:00
Justin M. Keyes
c1bc784ad8 Merge #6110 'refactor: Move vim_*printf to strings.c'. 2017-02-17 16:25:19 +01:00
lonerover
891d412d6c vim-patch.sh: don't ignore runtime/doc/tagsrch.txt 2017-02-14 16:14:41 +08:00
ZyX
a429235b6d message,strings: Move vim_*printf functions to strings.c
Allows eval/typval.h to #include message.h.
2017-02-14 00:53:03 +03:00
James McCoy
1df492dd3a vim-patch: Use get_vim_patch to retrieve patch for review
This ensures the downloaded Vim patch is preprocessed so unused material
isn't presented to the reviewer.

[ci skip]
2017-02-06 15:58:33 -05:00
Daniel Hahler
a0b33b333e vim-patch:8.0.0121
Problem:    Setting 'cursorline' changes the curswant column. (Daniel Hahler)
Solution:   Add the P_RWINONLY flag. (closes vim/vim#1297)

a2477fd349
2017-01-13 23:40:59 +01:00
Tommy Allen
fd9cc8b0b2 automation: Generate API documentation (#5798)
runtime: Add underscore to {} helpSpecial syntax pattern

docs: Added generated api-funcs.txt
2017-01-03 13:11:19 +01:00
Marco Hinz
66936d7866
vim-patch: fix default answers 2016-12-22 03:17:01 +01:00
James McCoy
412d87698f vim-patch: Allow skipping non-"vim-patch" commits during review
It's not atypical to have extra, non-"vim-patch" commits in a PR merging
a bigger or set of related patches from Vim.  Rather than immediately
aborting, display the patch header to the user and let them decide
whether to continue reviewing.
2016-12-15 09:09:52 -05:00
James McCoy
c6bd9f525c
vim-patch: Add -g switch to download/preprocess patch 2016-12-12 20:55:25 -05:00
Justin M. Keyes
c3a7a94a12 l10n: Remove some non-UTF8 .po files. (#5622)
Some .po files do not have UTF8 versions, leave those alone for now.

Also remove sjiscorr.c utility.
2016-11-17 17:27:13 +01:00
James McCoy
10c72cd365
vim-patch.sh: Remove "set -o pipefail"
grep 2.26 changed its behavior when redirecting its output to /dev/null
such that it exits as soon as one match is found.  This causes sed to
get a SIGPIPE which, due to "set -o pipefail", falsely implies that the
patch is not applied.

Removing "set -o pipefail" preserves the good exit status from grep.
2016-11-15 07:53:01 -05:00
James McCoy
37e64d79cc
object_to_vim: Fix buffer/window/tabpage conversion on BE systems
Since data.integer is a different (larger) integer type than
data.{buffer,window,tabpage}, we cannot abuse the union by using
data.integer to access the value for all 4 types.  Instead, remove the
{buffer,window,tabpage} members and always use the integer member.

In order to accomodate this, perform distinct validation and coercion
between the Integer type and Buffer/Window/Tabpage types in
object_to_vim, msgpack_rpc helpers, and gendispatch.lua.
2016-11-02 10:06:27 -04:00
Justin M. Keyes
cc1ec959f1 NVIM v0.1.6
FEATURES:
0b5a7e4ad5 #4432 API: external UIs can render custom popupmenu
c6ac4f84b1 #4934 API: call any API method from vimscript
31df051ed9 #4568 API: nvim_call_atomic(): multiple calls in a single request
b268ba353a #5424 API: nvim_win_get_number(), nvim_tabpage_get_number()
e7e2844d46 has("nvim-1.2.3") checks for a specific Nvim version
522b885a0d #5295, #5493 `:CheckHealth` checks tmux, terminfo, performance
719dae2e01 #5384 events: allow event processing in getchar()
f25797f869 #5386 API: metadata: Nvim version & API level
22dfe6925d #5389 API: metadata: "since", "deprecated_since"
605e74327a Added QuickFixLine highlight group

CHANGES:
4af6ec746c #5253 perf: Disable clipboard in do_cmdline()
6e9f329d05 #5299 perf: Skip foldUpdate() in insert-mode.
9d4fcec7c6 #5426 perf: Do not auto-update folds for some foldmethods.
eeec0cab58 #5419 tui: Default to normal-mode cursor shape.

FIXES:
e83845285c #5436 tui: Fix "weird characters" / "bleeding termcodes"
10a54ad12e #5243 signal_init: Always unblock SIGCHLD.
bccb49bedb #5316 eval.c: Fix memory leak for detached pty job
626065d385 #5227 tchdir: New tab should inherit CWD.
cd321b7d0f #5292 getcwd(): Return empty string if CWD is invalid.
6127eaef05 shada: Fix non-writeable ShaDa directory handling
ca65514a24 #2789 system(): Respect shellxescape, shellxquote
2daf54ee8d #4874 Restore vim-like tab dragging
0c536b5d8a #5319 syntax.c: Support bg/fg special color-names.
3c53371b0c #4972 from justinmk/schedule-ui_refresh
68bcb32ec4 #4789 tui.c: Do not wait for tui loop on teardown.
c8b6ec2e6a #5409 v:count broken in command-line window
6bc3bcefc6 #5461 fix emoji display
51937e1322 #5470 fix :terminal with :argadd, :argu
79d77da8a0 #5481 external UIs: opening multiple files from command-line
657ba62a84 #5501 rplugin: resolve paths in manifest file
6a6f188d2a #5502 system('foo &', 'bar'): Show error, don't crash.
1ff162c0d9 #5515 os_nodetype: open fd with O_NONBLOCK
2a6c5bb0c4 #5450 modeline: Handle version number overflow.
0ade1bb706 #5225 CI tests now run against Windows!
2016-10-28 15:16:45 +02:00
Rui Abreu Ferreira
f25797f869 api: Nvim version, API level #5386
The API level is disconnected from the NVIM version. The API metadata
holds the current API level, and the lowest backwards-compatible level
supported by this instance.

Release 0.1.6 will be the first release reporting the Nvim version and
API level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      prerelease: true,
      api_level: 1,
      api_compatible: 0,
    }

The API level may remain unchanged across Neovim releases if the API has
not changed.

When changing the API the CMake variable NVIM_API_PRERELEASE is set to
true, and  NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented
accordingly.

The functional tests check the API table against fixtures of past
versions of Neovim. It compares all the functions in the old table with
the new one, it does ignore some metadata attributes that do not alter
the function signature or were removed since 0.1.5.  Currently the only
fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
2016-10-26 14:23:50 +02:00
Justin M. Keyes
f96dfae52f doc; vim-patch.sh
Also include missing changes from:
06d2d38ab7
26852128a2
2016-10-24 13:26:55 +02:00
Björn Linse
31df051ed9 Merge pull request #4568 from bfredl/multirequest
atomic multi request for async remote plugins
2016-10-22 12:50:50 +02:00
Björn Linse
f6968dc0f7 api: call multiple methods atomically (useful in async contexts)
remove unused response_id parameter of handle_nvim_... helpers
2016-10-22 10:51:32 +02:00
Björn Linse
caf85b80ae api: move verbatim c code out of gendispatch.lua and into c files
Remove max_fname_len check, which caused false successful lookups,
and was an optimization for a very rare case.
2016-10-19 09:06:30 +02:00
Björn Linse
78ea090f29 api: add blanket implementation of "since" 2016-09-27 16:54:55 +02:00
Björn Linse
50c26017a3 api: define the set of function attributes to expose in the metadata 2016-09-27 16:54:55 +02:00
Björn Linse
6f55d1377f api: restore old return type of deprecated ui_try_resize method 2016-09-27 16:10:34 +02:00
James McCoy
4ce24ff9da
genunicodetables: Give the unicode directory as the first argument
Let genunicodetables determine which files it needs from the unicode
directory.  cmake just needs to pass the directory and destination file
to the script.
2016-09-24 20:46:09 -04:00
James McCoy
dafca1ad68
vim-patch:7.4.1642
Problem:    Handling emoji characters as full width has problems with
            backwards compatibility.
Solution:   Only put characters in the 1f000 range in the emoji table.

6a08454b93
2016-09-24 14:03:23 -04:00
James McCoy
1144cc6d9e
vim-patch:7.4.1629
Problem:    Handling emoji characters as full width has problems with
            backwards compatibility.
Solution:   Remove ambiguous and double width characters from the emoji table.
            Use a separate table for the character class.
            (partly by Yashuhiro Matsumoto)

b86f10ee10
2016-09-24 14:03:22 -04:00
James McCoy
45598d2e5e
vim-patch:7.4.1620
Problem:    Emoji characters are not considered as a kind of word character.
Solution:   Give emoji characters a word class number. (Yashuhiro Matsumoto)

4077b33a83
2016-09-24 14:03:22 -04:00
James McCoy
d533edf61e
vim-patch:7.4.1604
Problem:    Although emoji characters are ambiguous width, best is to treat
            them as full width.
Solution:   Update the Unicode character tables. Add the 'emoji' options.
            (Yasuhiro Matsumoto)

3848e00e01
2016-09-24 14:03:14 -04:00
James McCoy
9d170a493e
vim-patch: Group alternations in preprocess_patch
Without the groupings, only the first alternation matches the diff
marker.  For example,

    local na_doc='todo\.txt\|version\d\.txt\|tags'
    ... +'g^diff --git a/runtime/doc/'${na_doc}'...

becomes, after expansion,

    ... +'g^diff --git a/runtime/doc/todo\.txt\|version\d\.txt\|tags'...

so the matches become "^diff --get a/runtime/doc/todo\.txt",
"version\d\.txt", or "tags".  Adding the grouping ensures the expected
behavior of requiring "^diff --get a/runtime/doc/" before every
filename.
2016-09-22 07:16:50 -04:00
Björn Linse
c61bf43a90 gendispatch: warn for deprecated alias if the deprecated function has implemation 2016-09-15 10:44:38 +02:00
Björn Linse
5f42184873 api: remove unnecessary initializations causing warnings in api dispatch (#5337)
Left over change from acb7c82 (fix leak when a api function is
incorrectly called with a list.). These initializations are now never
used and causes warnings in static analysis
2016-09-14 13:10:04 +02:00
Justin M. Keyes
d61826a85c vim-patch.sh: Use printf instead of echo
Also: neovim => nvim
2016-09-13 12:40:20 +02:00
Justin M. Keyes
d5aaa18316 vim-patch.sh: preprocess_patch()
- Remove not-applicable Vim changes such as *.proto, todo.txt, ...

Also:
- support NVIM_SOURCE_DIR override
2016-09-13 11:38:09 +02:00
Björn Linse
acb7c826b3 api: fix leak when a api function is incorrectly called with a list.
This applies both to msgpack-rpc and eval.
2016-08-31 21:57:06 +02:00
Björn Linse
1c22cab2fd api: consistently use nvim_ prefix and update documentation 2016-08-31 21:57:06 +02:00
Björn Linse
e536abc1e1 api: Allow blacklist functions that shouldn't be accesible from eval
Blacklist deprecated functions and functions depending on channel_id
2016-08-31 21:57:06 +02:00
Björn Linse
7e2348f2b1 eval: use gperf to generate the hash of builtin functions
make api functions highlighted as builtins in vim.vim
2016-08-31 21:57:04 +02:00
Björn Linse
a2d25b7bf8 api: unify buffer numbers and window ids with handles
also allow handle==0 meaning curbuf/curwin/curtab
2016-08-31 21:40:20 +02:00
Björn Linse
3bd3b3b768 api: auto generate api function wrappers for viml 2016-08-31 21:40:20 +02:00
Björn Linse
de3a515123 api: rename "msgpack_rpc/defs.h" to "api/private/dispatch.h" and use the header generator. 2016-08-31 21:40:20 +02:00
ZyX
5e59916e84 eval: Use generated hash to look up function list
Problems:
- Disables cross-compiling (alternative: keeps two hash implementations which
  need to be synchronized with each other).
- Puts code-specific name literals into CMakeLists.txt.
- Workaround for lua’s absence of bidirectional pipe communication is rather
  ugly.
2016-08-31 21:40:20 +02:00
ZyX
8fb7273ac0 eval: Move VimL functions list to a lua file
Removes all kinds of problems with sorting, provides a ready-to-use function
list representation for genvimvim.lua, does not require specifying function name
twice (VimL function name (string) + f_ function name).
2016-08-31 21:40:20 +02:00
Justin M. Keyes
97c6d80ca7 release.sh: Sign the tag.
Also: hacks for BSD sed.
2016-08-26 03:51:52 -04:00
Justin M. Keyes
46475a1021 release.sh: Touch NVIM_VERSION_PATCH, show obnoxious message.
git-log-pretty-since.sh: fix bug
2016-08-22 15:39:14 -04:00
Justin M. Keyes
ad43480952 version bump 2016-08-22 00:28:47 -04:00
Daniel Hahler
884b37fd2a scripts/vim-patch.sh: fix typo (#5221)
[ci skip]
2016-08-14 08:19:46 -04:00
Daniel Hahler
3e00dc4477 scripts/vim-patch.sh: use privileged mode (set -p)
Without this the "cd scripts/.." might change to another dir (since
CDPATH is looked at before a local path), and then NEOVIM_SOURCE_DIR
might end up being "/somewhere/else\n/somewhere/else" (since the "cd"
prints the dir already in that case).

Closes https://github.com/neovim/neovim/pull/5213.
2016-08-11 18:57:54 +02:00
Justin M. Keyes
fe6ec75725 Merge #4964 from ZyX-I/no-xdg-expand
option: Do not expand options, obtained from XDG vars
2016-08-04 20:59:51 -04:00
Daniel Hahler
329f922f14 fixup! genvimvim.lua: fix matching functions 2016-07-14 00:42:55 +02:00
Daniel Hahler
e63c6ca8f2 genvimvim.lua: fix matching functions
Fixes https://github.com/neovim/neovim/issues/5060.
2016-07-13 18:51:24 +02:00
Simon Weil
29060a592c vim-patch.sh: ignore coloring and pagers (#5030) 2016-07-10 15:21:45 -04:00
ZyX
895f712df8 option: Do not expand options, obtained from XDG vars
It is a wrong thing to do, this makes valid variable values be treated 
incorrectly: in

    XDG_DATA_HOME='/home/$foo/.local/share'

`$foo` should be treated literally and not expanded to `foo` environment 
variable value.

Also makes option_expand not try to expand too long strings even if these too 
long strings are default values. Previously it thought that default values 
should always be expanded. Also does not try to expand NULL should it be the 
default value just in case.

Fixes #4961
2016-07-10 02:04:27 +03:00
Florian Walch
634d59f646 msgpack-gen: Fix for Lua 5.1. (#4857)
goto statement was only introduced in Lua 5.2.
2016-06-01 19:14:09 -04:00
Shota
568da8ef3b vimpatch.sh: bug fix in find_git_remote regex (#4863)
vimpatch.sh: fix awk expr
2016-06-01 15:02:20 -04:00
James McCoy
e50b4fd36d vim-patch.sh: Only print the first neovim/neovim remote name
If a user has multiple remotes set for neovim/neovim, then
find_get_remote was returning 'remote1\nremote2\n', which breaks
anything trying to use it.  Since we're just using this remote to fetch
from, any one will do.
2016-05-28 14:16:10 -04:00
Björn Linse
dd539366fc api: refactor remote ui to use API dispatch generation 2016-05-27 13:18:04 +02:00
James McCoy
8759a77dc2 vim-patch.sh: Show if a patch includes runtime files 2016-05-19 06:40:51 -04:00
James McCoy
957c91d5d0 vim-patch.sh: Add support for sociomatic/git-hub 2016-05-19 06:40:47 -04:00
James McCoy
af3d4b4049 vim-patch.sh: Rename check_executable to require_executable
check_executable now just wraps the "exists && executable" check.  This
will be needed to allow fallbacks for commands.
2016-05-19 06:40:37 -04:00
James McCoy
de570a0b84 vim-patch.sh: Ignore “git describe” failures in list_vim_patches
It's acceptable for “git describe --tags --exact-match …” to fail, since
all runtime updates commits are untagged.  All that matters is that we
get a tag when one exists.

Therefore, ignore the failure status of the git describe call, relying
on the captured output instead.
2016-05-17 01:03:18 -04:00
Michael Ennen
954f983bc1 Run shellcheck (shell scripting linter) on shell scripts.
There are a total of 5 shell scripts in the Neovim source tree.
All but runtime\macros\less.sh had warnings/errors when run through
Shellcheck (http://www.shellcheck.net/).

This commit fixes all warnings/errors and also changes the shebang to
"#!/bin/sh" when possible (this was not possible for vim-patch.sh
because it uses many bashisms).

The shellcheck errors that were fixed are:
SC2068: Double quote array expansions to avoid re-splitting elements.
SC2086: Double quote to prevent globbing and word splitting.
SC2124: Assigning an array to a string! Assign as array, or use *
    instead of @ to concatenate
SC2155: Declare and assign separately to avoid masking return values.
2016-05-11 21:06:26 -07:00
Justin M. Keyes
4f5a18237b release.sh: Automate release process. 2016-04-24 21:46:09 -04:00
Daniel Hahler
a9f97226ae vim-patch.sh: fix/improve pattern with find_git_remote 2016-04-24 19:07:41 +02:00
James McCoy
3098b18a2b vim-patch.sh: Query git for name of neovim remote
Rather than assume the user named their neovim/neovim remote "upstream",
parse the information from "git remote -v".
2016-04-23 15:32:43 -04:00
Thiago de Arruda
c18d5917e3 Update lua client to 0.0.1-24
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
2016-04-13 09:21:32 -03:00
pips.linux
7cdbf3f97a vim-patch.sh: Fetch the whole vim repository and fix a regexp
Make get_vim_sources fetch the whole repository (it's not THAT big) so we can
pick up all the patches. The regexp didn't pick up the NA patches if there was a
comma after NA, so I extended it (I allowed arbitray things after NA, so maybe
someone can write a comment or so, should not lead to confusion).
2016-04-08 20:13:24 +02:00
Björn Linse
281a9b2cea Revert "build system: avoid more unneccesary recompiles"
This was not the correct way to fix the issue.
2016-02-25 11:36:56 +01:00
Florian Walch
e65fce8ed3 vim-patch.sh: Replace #<number> with vim/vim#<number> in commit messages. 2016-02-17 00:18:19 +01:00
Florian Walch
cc6299ecbc vim-patch.sh: Support multi-patch pull requests.
* Calling "vim-patch.sh -p" on a checked-out branch already created with
  "-p" will re-use the branch and append commits.

* Fetch upstream/master before checking out branch on first call of "-p".

* Reverted creation of commit in submit step ("-s") to previous behavior:
  Create an empty commit with correct commit message when "-p" is called.

* Submitting a pull request with "-s" will create a correct pull request
  message even if multiple patches have been ported in one single branch
  with "-p".
2016-02-17 00:18:19 +01:00
Florian Walch
775a16b0b7 vim-patch.sh: Add -s (submit pull request) option.
When calling "vim-patch.sh -s" on a checked-out branch created with
"vim-patch.sh -p", create commit from staged changes, push to origin,
create pull request (using hub), and clean up patch files.
2016-02-17 00:18:19 +01:00
Florian Walch
07eabc062e vim-patch.sh: Use .patch files only. 2016-02-17 00:18:19 +01:00
Florian Walch
b768d8a09c vim-patch.sh: Improvements for review functionality.
* Support pull requests with multiple commits.
 * Offer to clean up files after review.
 * Always use full commit hash in assign_commit_details().
2016-02-17 00:18:19 +01:00
Justin M. Keyes
1e995ea2fd Merge #4140 'vim-patch:7.4.771'. 2016-02-15 01:48:30 -05:00
Björn Linse
8d7ab23b49 build system: avoid more unneccesary recompiles 2016-02-14 11:41:28 +01:00
watiko
c90c47072f vim-patch:7.4.749
Problem:    For some options two consecutive commas are OK. (Nikolay Pavlov)
Solution:   Add the P_ONECOMMA flag.

0e7c4b99c6
2016-02-09 14:44:53 +09:00
Jurica Bradaric
815ba27f75 legacy2luatest: Use before_each instead of setup.
This will avoid confusion if additional `it()` blocks are added.
(`setup()` only runs once per `describe()` block, whereas `before_each()`
runs before each `it()`).
2016-02-01 09:09:08 +01:00
Florian Walch
03d8adda8e vim-patch.sh: List in chronological order. #4034 2016-01-20 22:16:56 -05:00
Florian Walch
9b550a8760 vim-patch.sh: Fix listing of NA patches. #4034 2016-01-17 19:18:45 -05:00
Justin M. Keyes
36f17ce87e vim-patch.sh: fix regression 2016-01-08 19:12:36 -05:00
Justin M. Keyes
1e7a553ed7 vim-patch.sh: force LC_ALL=C for preprocessing
Any patch may contain mixed encodings, so we must process them as byte
arrays. E.g. with stock `sed` on OS X patch
8a94d873aa8c753a8522ea86a049bdf2abd0c507 causes this error:
    sed: RE error: illegal byte sequence
To avoid that, set LC_ALL=C.

Also remove redundant *.patch creation from review_pr().
2015-12-17 21:28:54 -05:00
Justin M. Keyes
9d64d75031 vim-patch.sh: fix order of non-tagged patches
Sort non-tagged patches in descending order, like tagged patches.
2015-12-17 04:07:03 -05:00
Johan Klokkhammer Helsing
cbb7044878 Fix the examples for vim-patch.sh so they are valid commands. #3631
The examples were missing the required -p flag.
2015-11-08 17:03:22 +01:00
ZyX
a85163a5d2 scripts: Add filter argument to shadacat.py 2015-10-23 14:47:59 +03:00
ZyX
1e06792099 scripts: Improve shadacat to work with unknown items 2015-10-08 22:00:29 +03:00
ZyX
38b8eb3561 scripts: Also print entry offset in shadacat.py 2015-10-08 22:00:16 +03:00
ZyX
200e62efeb shada: Add support for dumping/restoring bufs changes and win jumps 2015-10-08 21:59:53 +03:00
ZyX
244dbe3a77 viminfo: First version of ShaDa file dumping
What works:

1. ShaDa file dumping: header, registers, jump list, history, search patterns,
   substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.

Most was not tested.

TODO:

1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
   reference).
2015-10-08 21:59:51 +03:00
Justin M. Keyes
a7ec1a5f50 vim-patch.sh: best-effort for older git. 2015-08-27 23:44:48 -04:00
Justin Gassner
aafbe5d28a vim-patch.sh: get all untagged patches #3250 2015-08-27 23:22:56 -04:00
Justin M. Keyes
b4d29fe067 vim-patch.sh: update for git 2015-08-26 03:02:13 -04:00
John Whitley
4d39db355b vim-patch.sh: update for Vim's hg => git migration 2015-08-26 02:15:24 -04:00
Rui Abreu Ferreira
5066128d48 Windows: Accept CRLF in msgpack-gen.lua grammar #3226
- MSVC generates output using Windows newlines (\r\n) instead of (\n).
2015-08-24 04:35:44 -04:00
Justin M. Keyes
2647677618 Merge pull request #2159 from ZyX-I/auto-unicode
Generate unicode tables with script
2015-08-19 23:41:12 -04:00
Thiago de Arruda
ccdeb91e12 msgpack: Replace FUNC_ATTR_DEFERRED by FUNC_ATTR_ASYNC
API functions exposed via msgpack-rpc now fall into two categories:

- async functions, which are executed as soon as the request is parsed
- sync functions, which are invoked in nvim main loop when processing the
  `K_EVENT special key

Only a few functions which can be safely executed in any context are marked as
async.
2015-08-13 07:41:04 -03:00
Florian Walch
95a4dc6487 vim-patch.sh: Add --review option to compare PR and original diffs. #3083
Helped-by: Michael Reed <m.reed@mykolab.com>
2015-08-03 21:36:33 +02:00
ZyX
4d2807e128 documentation: Document table meanings in comment to genunicodetables 2015-07-26 22:59:46 +03:00
ZyX
8f9b81059a Create script that downloads and commits UNIDATA files 2015-07-26 22:59:46 +03:00
ZyX
c31b3339ff Generate unicode tables with script when building 2015-07-26 22:59:46 +03:00
ZyX
6f35bcfb07 syntax: Exclude deprecated options
Excluded options (compatible, edcompatible and ttyfast) are listed in 
vimOnlyOption group.
2015-07-26 21:39:19 +03:00
ZyX
853ba34103 syntax: List NeoVim-specific autocmd events
Note: list was copied from master (7a6bf3f418). 
I did not add more events there.
2015-07-26 21:28:32 +03:00
ZyX
478ee680dc scripts: Add script which is able to generate part of vim.vim file 2015-07-26 12:58:01 +03:00
ZyX
7f6c14ed54 options: Move option definitions to options.lua 2015-07-26 12:58:00 +03:00
ZyX
8ed2dbf6e2 fileio: Move event definitions to the generator script 2015-07-26 12:39:01 +03:00
oni-link
34b5cee533 Fix compiling with gcc 5. #2566
Pattern matching failed, because the preprocessor added additional
linemarkers around type Bool.
2015-05-04 23:23:06 -04:00
Justin M. Keyes
28ad7b5026 scripts/legacy2luatest.pl: remove modeline #2536
Several legacy tests have "vim: set ft=vim" modelines which causes the
new lua file to be opened with filetype=vim.
2015-05-02 20:40:08 -04:00
Felipe Morales
86330fdd3f vim-patch:7.4.530-531
Specify different kinds of counts for commands.
Updated ex commands generator scripts.

Includes fixes to comments from patch 7.4.531

Original message:

Problem:    Many commands take a count or range that is not using line
            numbers.
Solution:   For each command specify what kind of count it uses.  For
            windows, buffers and arguments have "$" and "." have a
relevant
            meaning. (Marcin Szamotulski)

https://code.google.com/p/vim/source/detail?r=v7-4-530
https://code.google.com/p/vim/source/detail?r=v7-4-531

Add legacy tests for 7.4.530

https://code.google.com/p/vim/source/detail?r=1e6d87a36dcdca231721dde8cbbc26610fb3df27
2015-04-28 23:08:30 -03:00
Florian Walch
a903407471 vim-patch.sh: Fix indentation, use GH URL for tagged versions. #2525
* Link to the commit details on GitHub for a tagged version.
* Non-tagged patches (runtime updates) are still linked to
  Google Code because they are identified by a Mercurial commit hash.
2015-04-28 17:29:20 +03:00
Thiago de Arruda
8d59e74f6c msgpack: coerce Ints to Windows/Buffers/Tabpages
Add conversion checking when generating msgpack handlers.
2015-04-13 10:20:42 -04:00
David Bürgin
cb7bb70c49 scripts: Fix "test input line" logic in legacy2luatest.pl #2369
Fixes the handling of the initial input lines of a test script by simply
skipping all initial empty lines.

Helped-by: Florian Walch <florian@fwalch.com>
Suggested-by: Florian Walch <florian@fwalch.com>
2015-04-09 11:40:09 -04:00
Gustaf Lindstedt
a9e6a768c5 legacy test script: minor string handling fix #2181
Add check to see if a string contains ], which can result in
cases where wrapping a string in [[...]] breaks. Use [=[...]=] instead
on those strings.

Use [=[...]=] for insert() and expect().
2015-03-20 18:19:19 -04:00
Michael Reed
08d2f7b562 scripts/vim-patch.sh: Misc. improvements #2108
- Check for mercurial before using it
- Make 'Merging patches...' wiki page easier to copy
- Use `basename` instead of assuming the user is running vim-patch.sh
  via the repo root
- Appease shellcheck by quoting path variables
- Remove unneeded variable quoting inside [[ ]] blocks
- Don't unconditionally 'exit 1'
  '-h' and '--help' are both recognized options, so current behavior is
  misleading.
2015-03-16 11:00:24 -04:00
Thiago de Arruda
8f31ebc4f7 macro: Add MAX macro and rename min to MIN 2015-02-16 23:17:38 -03:00
Michael Reed
84ca5f973d scripts/vim-patch: Allow equivalent shorthand args 2015-02-02 01:11:19 -05:00
Eliseo Martínez
6762f172d7 Remove long_u: ex_cmds_defs.h: Refactor long_u.
CommandDefinition.cmd_argt: long_u --> uint32_t.
2015-01-19 19:41:27 +01:00
Florian Walch
0cbc48ea89 vim-patch.sh: Add option to list missing Vim changesets. 2015-01-14 09:51:19 +01:00
Florian Walch
d8175bfa95 Improve legacy2luatest script.
* Remove 'test' prefix from test names.
 * Ask if existing spec files should be overwritten.
 * Fix for legacy tests with no initial buffer content (e.g. test_signs).
2014-12-27 16:05:06 +01:00
Florian Walch
0ae2acdc86 Improvements to vim-patch script. 2014-12-25 23:32:40 +01:00
Florian Walch
b1d025a0c8 Ignore update errors in vim-patch script. 2014-12-23 11:15:42 +01:00
Thiago de Arruda
8b6cfff6a1 msgpack-rpc: Allow registration of handlers by other modules 2014-12-08 23:44:23 -03:00
Rui Abreu Ferreira
05d72e9826 Refactor declaration generation
- Call compiler from CMake instead of lua script to generate a
  preprocessor file - allows for better/early error detection if
  the compiler fails
- Preprocessor files are saved along with the headers as .i files
- Accept preprocessor lines with trailing chars after # as is
  the case in Clang/Windows
- The fourth argument to gendeclarations.lua is now the path to
  the proprocessor output file
2014-11-29 23:39:52 +00:00
Florian Walch
b27eadbcf2 Add helper script for porting vim patches. 2014-11-21 16:11:32 +01:00
Florian Walch
9376b3db4b Improve legacy2luatest script. 2014-11-09 15:06:03 +01:00
Florian Walch
bc6ac59928 Add legacy test conversion script. 2014-11-04 11:38:06 -03:00
Thiago de Arruda
64844b7312 msgpack-rpc: Improve logging of msgpack-rpc messages
- Expose more logging control from the log.c module(get log stream and omit
  newlines)
- Remove logging from the generated functions in msgpack-gen.lua
- Refactor channel.c/helpers.c to log every msgpack-rpc payload using
  msgpack_object_print(a helper function from msgpack.h)
- Remove the api_stringify function, it was only useful for logging msgpack-rpc
  which is now handled by msgpack_object_print.
2014-10-23 21:46:03 -03:00
Thiago de Arruda
b31a74ad11 debug: Improve debugging of msgpack-rpc requests
- Add the api_stringify function to display API objects
- Use api_stringify to display request arguments and return values in DLOG
  statements.
2014-10-22 11:26:43 -03:00
Thiago de Arruda
4233446344 debug: Fix broken DLOG macro calls 2014-10-22 11:26:43 -03:00
Thiago de Arruda
72e3e57bf1 msgpack-rpc: Allow selective deferral API calls
Since all API functions now run immediately after a msgpack-rpc request is
parsed by libuv callbacks, a mechanism was added to override this behavior and
allow certain functions to run in Nvim main loop.

The mechanism is simple: Any API function tagged with the FUNC_ATTR_DEFERRED (a
"dummy" attribute only used by msgpack-gen.lua) will be called when Nvim main
loop receives a K_EVENT key.

To implement this mechanism it was necessary some restructuration on the
msgpack-rpc modules, especially in the msgpack-gen.lua script.
2014-10-21 11:05:49 -03:00
Thiago de Arruda
b280308ac6 msgpack-rpc: Create subdirectory for msgpack-rpc modules
Create the msgpack_rpc subdirectory and move all modules that deal with
msgpack-rpc to it. Also merge msgpack_rpc.c into msgpack_rpc/helpers.c
2014-10-21 11:05:49 -03:00
Thiago de Arruda
69561ea922 test: Remove run-functional-tests.py
Now that the lua client is available, python/lupa are no longer necessary to run
the functional tests. The helper functions previously defined in
run-functional-tests.py were adapted to test/functional/helpers.lua.
2014-10-16 09:21:37 -03:00
Thiago de Arruda
f6a008a182 test: Add 'eval' functional helper
The eval helper transforms vimL expressions into lua tables, it's useful for
verifying function output.
2014-10-01 09:31:57 -03:00
Thiago de Arruda
42d5b526b9 test: Replace vroom by lua/busted for functional tests
The 'lupa' python package provides a simple way to seamless integrate lua and
python code.

This commit replaces vroom by a python script that exposes the 'neovim' package
to a lua state, and invokes busted to run functional tests. This is a temporary
solution that will enable writing functional tests using lua/bused while a lua
client library is not available.

The reason for dropping vroom is flexibility: Lua/busted has a nice DSL-style
syntax while also providing the customization power of a full programming
language. Another reason is to use a single framework for unit/functional tests.

Two other changes were performed in this commit:

- Instead of "gcc-unittest/gcc-ia32", the travis builds for gcc are now
  identified by "gcc/gcc-32". They will run unit/functional tests for both 64
  and 32 bits.
- Old integration tests(in src/nvim/testdir) are now ran by the 'oldtest' target
2014-09-30 17:37:16 -03:00
Thiago de Arruda
ddecfb763b deps: Switch lua msgpack library to one that supports 2.0 2014-09-16 14:14:00 -03:00
Thiago de Arruda
31f835adc4 msgpack-gen: Fix msgpack_rpc_init_function_metadata
The function was broken on release builds
2014-09-16 14:14:00 -03:00
Thiago de Arruda
2d1b5589e8 server: Rename address environment variable
To follow the pattern of using NVIM for technical descriptions, it was renamed
to NVIM_LISTEN_ADDRESS
2014-09-13 21:35:47 -03:00
Thiago de Arruda
545acf2024 api metadata: Allow typed container information in api functions
Adapt gendeclarations.lua/msgpack-gen.lua to allow the `ArrayOf(...)` and
`DictionaryOf(...)` types in function headers. These are simple macros that
expand to Array and Dictionary respectively, but the information is kept in the
metadata object, which is useful for building clients in statically typed
languages.
2014-09-12 13:50:07 -03:00
Thiago de Arruda
cd2e46c078 api/msgpack-rpc: Refactor metadata object construction
Instead of building all metadata from msgpack-gen.lua, we now merge the
generated part with manual information(such as types and features). The metadata
is accessible through the api method `vim_get_api_info`.

This was done to simplify the generator while also increasing flexibility(by
being able to add more metadata)
2014-09-12 13:50:07 -03:00
Thiago de Arruda
cac24cb06d api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}
- Move helpers that are specific to API types to api/private/helpers.{c,h}
- Include headers with generated declarations
- Delete unused macros
2014-09-12 13:25:28 -03:00
Thiago de Arruda
2f566c83d9 api/msgpack-rpc: Parse type information from api/private/defs.h
Enhance msgpack-gen.lua to extract custom api type codes from the ObjectType
enum in api/private/defs.h. The type information is made available from the api
metadata and clients can use to correctly serialize/deserialize these types
using msgpack EXT type.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
d5e3cede28 msgpack-rpc: Remove support for integer ids in methods
There's no need to have integer and string ids, and since we now fully support
msgpack-RPC, support for integer ids was removed.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
cd70b9c015 msgpack-rpc: Refactor API metadata discovery method
A new method is now exposed via msgpack-rpc: "get_api_metadata". This method has
the same job as the old method '0', it returns an object with API metadata for
use by generators.

There's one difference in the return value though: instead of returning a
string containing another serialized msgpack document, the metadata object is
returned directly(a separate deserialization step by clients is not required).
2014-09-12 13:25:28 -03:00
Thiago de Arruda
19bc29ee83 msgpack-rpc: Move handle_missing_method to msgpack_rpc.c
Since that function is not automatically generated, it's best to place it in a
normal C module
2014-09-12 13:25:28 -03:00
Thiago de Arruda
74aff19691 msgpack-rpc: Refactor initializer and dispatcher
Use Map(String, rpc_method_handler_fn) for storing/retrieving rpc method
handlers in msgpack_rpc_init and msgpack_rpc_dispatch.

Also refactor serialization/validation functions in the
msgpack_rpc.c/msgpack_rpc_helpers.c modules to accept the new STR and BIN types.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
c39ae3e4d4 map/msgpack-rpc: Declare/define maps rpc method handlers
The new map type uses `String` instances as keys to avoid unnecessary copying to
zero-terminated buffers.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
e2143674ae deps: Update to the experimental msgpack v5 branch
Using msgpack v5 will let nvim be more compatible with msgpack libraries for
other platforms.

This also replaces "raw" references by "bin" which is the new name for msgpack
binary data type
2014-09-12 13:19:50 -03:00
Thiago de Arruda
aa23d2f835 msgpack-rpc: Accept method names in requests 2014-08-29 22:08:58 -03:00
Thiago de Arruda
b744073fae test: Remove cleanup function definition from run-api-tests.exp
This function is now injected automatically when running the python-client tests
2014-08-28 14:07:31 -03:00
ZyX
1e11de5385 Fix problem with test47: addition is not bitwise OR
:diffsplit command used to include some flag value twice. If I was using bitwise
OR it would be OK, but I had addition here. Changed to use bitwise OR.
2014-08-20 20:21:37 +04:00
ZyX
b8a32b6603 Add const qualifier and explicit length 2014-08-20 20:21:37 +04:00
ZyX
3becb5fd21 Use lua generator in place of ex_cmds_defs header trick
Closes #788
Fixes #379
Ref #549
2014-08-20 20:21:37 +04:00
Thiago de Arruda
6483a198e4 Travis CI: Refactor travis script
To simplify modification/inclusion of continuous integration targets, this
removes travis.sh which contains a big if statement in favor of multiple scripts
under the new '.ci' directory.
2014-08-08 06:06:10 -04:00
ZyX
1fa3a7d70a Use color_terminal output in place of TAP #995 2014-08-07 02:07:08 -04:00
Florian Walch
f29504a5b8 travis.sh: Update sources before installing packages. 2014-08-06 12:58:38 -03:00
Thiago de Arruda
4dc642aa62 api tests: set 'initpython' in BeforeEachTest
This is required to run some tests of the python client
2014-07-17 11:37:42 -03:00
Thiago de Arruda
cf30837951 api/events/msgpack: Insert log statements to improve debugging
Also changed the default log level to INFO so developers won't end up with big
log files without asking explicitly(DLOG statements were placed in really "hot"
code)
2014-07-17 11:37:41 -03:00
John Szakmeister
1172e25fad travis.sh: move symbolizer definition into common area 2014-07-17 05:30:20 -04:00
Florian Walch
5433694db3 travis.sh: Simplify clang/asan build.
* Clang 3.4 now default on Travis CI.
* Introduce config variable to download & use different clang version.
2014-07-16 06:01:02 -04:00
Florian Walch
2cae6919dc travis.sh: Use dependencies from neovim/deps. 2014-07-16 06:01:02 -04:00
Florian Walch
58e85fca02 travis.sh: Fix mixed tabs/whitespace formatting. 2014-07-16 06:01:02 -04:00
Brandon Coleman
e69cfa6c15 move assert.h include out of vim.h 2014-07-09 00:18:19 +02:00
Thiago de Arruda
745928ef6b dispatch function generator: Fix bug in validation/initialization
- Initialize variables before validating argument count to remove possibility of
  freeing uninitialized pointers
- Set the error when the argument count validation fails
2014-07-07 12:18:39 -03:00
Felipe Oliveira Carvalho
9a2b2d4a64 MsgPack-RPC dispatch based on function array lookup #864
This simplifies the generated msgpack_rpc_dispatch() function, separates the
code for each RPC method more clearly and allows easy implementation of
alternative dispatching methods (e.g. string method id dispatch).
2014-07-04 17:05:24 +00:00
John Szakmeister
b235793dac Fix #838: build with "USE_BUNDLED=OFF" fails to find dependencies
Stop forcing some platform setting that are really intended to be used
for Travis CI.  Under other systems, like Arch Linux, it prevents
dependencies from being correctly located.
2014-06-27 06:52:59 -04:00
Thiago de Arruda
296da85198 channel/msgpack_rpc: Refactor API dispatching
This is how API dispatching worked before this commit:

- The generated `msgpack_rpc_dispatch` function receives a the `msgpack_packer`
  argument.
- The response is incrementally built while validating/calling the API.
- Return values/errors are also packed into the `msgpack_packer` while the
  final response is being calculated.

Now the `msgpack_packer` argument is no longer provided, and the
`msgpack_rpc_dispatch` function returns `Object`/`Error` values to
`msgpack_rpc_call`, which will use those values to build the response in a
single pass.

This was done because the new `channel_send_call` function created the
possibility of having recursive API invocations, and this wasn't possible when
sharing a single `msgpack_sbuffer` across call frames(it was shared implicitly
through the `msgpack_packer` instance).

Since we only start to build the response when the necessary information has
been computed, it's now safe to share a single `msgpack_sbuffer` instance
across all channels and API invocations.

Some other changes also had to be performed:

- Handling of the metadata discover was moved to `msgpack_rpc_call`
- Expose more types as subtypes of `Object`, this was required to forward the
  return value from `msgpack_rpc_dispatch` to `msgpack_rpc_call`
- Added more helper macros for casting API types to `Object`
  any
2014-06-24 13:02:24 -03:00
Thiago de Arruda
bc0380038e channel/msgpack_rpc: Refactor to better split functions across modules
Move validation/conversion functions and to msgpack_rpc_helpers to separate
those from the functions that are used from the channel module
2014-06-24 13:02:24 -03:00
ZyX
b0641510b6 Avoid ever creating .deps directory
Thanks to @jszakmeister this uses make own features.
2014-06-18 16:21:11 -04:00
Thiago de Arruda
72907c34f4 build: increase timeout for run-api-tests.exp 2014-06-18 11:36:07 -03:00
Thiago de Arruda
796ea333d4 build: Fix error in dispatch generator for functions with channel_id 2014-06-18 11:36:07 -03:00
Thiago de Arruda
4b787fb7d1 Make gendeclarations.lua more friendly to incremental builds
Modify gendeclarations.lua to check if the generated non-static declaration
header changed before rewriting it with a new version. This is to prevent
unnecessary rebuilds of modules that depend on modules that had private changes.
2014-06-02 15:53:55 -03:00
ZyX
6498b281fa Remove remaining declarations with new script: finddeclarations.pl 2014-06-02 11:04:18 -03:00
ZyX
70929f7e16 Add automatic generation of headers
- The 'stripdecls.py' script replaces declarations in all headers by includes to
  generated headers.
  `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
  was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
  required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI

This adds a requirement: all type and structure definitions must be present
before INCLUDE_GENERATED_DECLARATIONS-protected include.

Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
2014-06-02 11:04:17 -03:00
ZyX
880957ad4e Move documentation from function declarations to definitions
Uses a perl script to move it (scripts/movedocs.pl)
2014-06-02 11:04:04 -03:00
Rui Abreu Ferreira
1971cc30b5 Add --api-metadata command line option
- New command line option prints the binary API metadata object
  and exits
2014-06-02 10:34:51 -03:00
John Szakmeister
7e797067df Make it easier to turn the bundled dependencies off. 2014-05-31 13:15:56 -04:00
Nicolas Hillegeer
cd457b72ec travis/coverity: hotfix #2, unbreak build
I hadn't spotted that the `sh -e` commandline was being used. I *think* this
is what's causing the exit 0 line not to run. Pray for success.

It's a real shame I can't this locally, what a mess.
2014-05-31 16:57:42 +02:00
Nicolas Hillegeer
9d60365e99 travis/coverity: hotfix, alwasy return success
It seems the coverity script likes to return 1 (error) when the current
branch does not follow its pattern. Temporarily disable that.
2014-05-31 16:48:51 +02:00
Nicolas Hillegeer
7f9caaf30d travis/coverity: add coverity support
Run only on push to branch coverity-scan. We can use a cron script to do
this 4 times a week (that's our allowance).

NOTE: possible future improvements are:

1. Fold the build matrix item into another short one so we don't overburden
   travis. It's a little less clear but it should be nicer on the
   infrastructure.
2. Change the security token, one can do that from the coverity admin page.
3. Don't do the naive `make depend`, but use the prebuilt libraries.
2014-05-31 16:41:23 +02:00