Commit Graph

1630 Commits

Author SHA1 Message Date
Thiago de Arruda
40a8193c6a runtime: Document 'unnamedclip' 2014-09-13 21:35:47 -03:00
Thiago de Arruda
c66959d115 runtime: Update python_setup.vim to the new rpc function names
Also improve version checking.
2014-09-13 21:35:47 -03:00
Thiago de Arruda
746e7cce21 runtime: Add highlighting for new functions/events 2014-09-13 21:35:47 -03:00
Thiago de Arruda
13f77ca0fd runtime: Initial job control documentation 2014-09-13 21:35:47 -03:00
Thiago de Arruda
eecdbb57fa runtime: Initial msgpack-rpc documentation 2014-09-13 21:35:47 -03:00
Thiago de Arruda
549311db7d runtime: Enhance help.vim to highlight Nvim/NVIM 2014-09-13 21:35:47 -03:00
Thiago de Arruda
f928c0a3a0 eval.c: Rename msgpack-rpc functions for consistency 2014-09-13 21:35:47 -03:00
Thiago de Arruda
f0b88466a3 eval.c: Rename jobwrite to jobsend 2014-09-13 21:35:47 -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
Justin M. Keyes
5778c25c01 Merge pull request #1167 from atwupack/fix-issue-1164
ex_cmds2.c:fix for issue #1164
2014-09-13 18:04:13 -04:00
André Twupack
abdcc5fe85 ex_cmds2.c:fix for issue #1164
fix condition while iterating over all buffers
2014-09-13 18:50:57 +02:00
Justin M. Keyes
1761a4af71 Merge pull request #1162 from atwupack/vp-7.4.357
vim-patch:7.4.357, 7.4.367, 7.4.376
2014-09-12 15:36:29 -04:00
André Twupack
ae33dc0d5a vim-patch:7.4.376
Problem:    Popup menu flickers too much.
Solution:   Remove the forced redraw. (Hirohito Higashi)

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

Includes: vim-patch:7.4.357 vim-patch:7.4.367 vim-patch:7.4.376
2014-09-12 21:02:50 +02:00
Thiago de Arruda
6a8932aa58 Merge PR #1130 'Update to the experimental msgpack v5 branch' 2014-09-12 14:01:35 -03:00
Thiago de Arruda
2a67b847aa build/test: install vroom/python-client from the master branch 2014-09-12 13:50:07 -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
15ca58d79f api: Implement vim_report_error function
This function is used to report errors caused by remote functions called by
channel_send_call
2014-09-12 13:50:07 -03:00
Thiago de Arruda
d29b62daab api: initialize capacity in the array_dict_macro 2014-09-12 13:50:07 -03:00
Thiago de Arruda
fa01ea8ead runtime: Add script for bootstrapping the python host 2014-09-12 13:50:02 -03:00
Thiago de Arruda
a1ce3a3acc provider: Major refactor
- Providers for features are now registered as a unit. For example, instead of
  calling `register_provider("clipboard_get")` and
  `register_provider("clipboard_set")`, clients call
  `register_provider("clipboard")` and nvim will assume it implements all
  methods of the "clipboard" feature
- Bootstrapping code was removed. With the `api_spawn` function exposed to
  vimscript, it's no longer necessary and will be handled by plugins
  distributed with nvim.
- Now the `has` function will return true if there's a live channel that
  has registered as a provider for the feature.
- 'initpython'/'initclipboard' options were removed
- A new API function was exposed: `vim_discover_features` which returns an
  object with information about pluggable features such as 'python' or
  'clipboard'
2014-09-12 13:25:29 -03:00
Thiago de Arruda
5060902930 api/msgpack-rpc: Implement channel_close and expose to vimscript
Simple function for closing a channel by id
2014-09-12 13:25:29 -03:00
Thiago de Arruda
03f4d17fc9 wstream: Fix close/free
The current code was leading to an invalid free when the wstream was closed
2014-09-12 13:25:28 -03:00
Thiago de Arruda
3f15d34056 job: Fix crash when passing a non-executable path to job_start 2014-09-12 13:25:28 -03:00
Thiago de Arruda
551b76c516 api/msgpack-rpc: Expose channel_from_job to vimscript as api_spawn 2014-09-12 13:25:28 -03:00
Thiago de Arruda
af61a286b2 main: Rename --embedded-mode and --api-msgpack-metadata options
--embedded-mode        -> --embed
--api-msgpack-metadata -> --api-info
2014-09-12 13:25:28 -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
2792a0e33c api/msgpack-rpc: Remove Position type, using arrays instead. 2014-09-12 13:25:28 -03:00
Thiago de Arruda
38dcfb6062 api/msgpack-rpc: Use EXT type to serialize Buffer/Window/Tabpage 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
d5a60d17fb api/msgpack-rpc: Remove specialized array types
Specialized array types(BufferArray, WindowArray, etc) were added to the API for
two main reasons:

- msgpack used to lack a way of serializing appliaction-specific types and there
  was no obvious way of making an API function accept/return arrays of custom
  objects such as buffers(which are represented as integers, so clients didn't
  have a way to distinguish from normal numbers)
- Let clients in statically-typed languages that support generics have a better
  typed API

With msgpack 2.0 EXT type the first item is no longer a factor and this commit
starts by removing the specialized array types. The second item will be
addressed in the future by making the API metadata return extra useful
information for statically-typed languages.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
505985b870 msgpack-rpc: Remove the msgpack_rpc_unpack function
The `msgpack_rpc_unpack` function was created to work around a deficiency in the
msgpack unpack API, which did not let the caller know if parsing failed due to
needing more data or to invalid input. The deficiency does not exist in the
latest version of `msgpack_unpacker_next`, so it can safely be removed.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
41a48a3fc7 memory: Use i18n messages for memory-related errors 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
Justin M. Keyes
042aca6eb4 Merge pull request #1098 from fwalch/update-busted
Update busted to version 2.
2014-09-12 09:54:10 -04:00
Justin M. Keyes
5ca1f97462 Merge pull request #1037 from fwalch/automatic-deps-paths
Travis: Add subdirectories to dependency paths.
2014-09-12 09:54:03 -04:00
Justin M. Keyes
3254372602 Merge pull request #1161 from atwupack/vp-7.4.349
vim-patch:7.4.349
2014-09-11 16:13:03 -04:00
André Twupack
12ca4f582e vim-patch:7.4.349
Problem:    When there are matches to highlight the whole window is redrawn,
            which is slow.
Solution:   Only redraw everything when lines were inserted or deleted.
            Reset b_mod_xlines when needed.  (Alexey Radkov)

https://code.google.com/p/vim/source/detail?r=v7-4-349
2014-09-11 20:46:10 +02:00
Justin M. Keyes
ba4acce341 Merge pull request #1160 from atwupack/vp-7.4.348
vim-patch:7.4.348
2014-09-11 14:32:17 -04:00
André Twupack
f4f9e7eaf3 vim-patch:7.4.348
Problem:    When using "J1" in 'cinoptions' a line below a continuation line gets too much indent.
Solution:   Fix parenthesis in condition.

https://code.google.com/p/vim/source/detail?r=v7-4-348
2014-09-11 20:11:57 +02:00
Florian Walch
0a01b3052e Update busted to 2.0.rc3.
Default to verbose output to show more information in case of errors.
Fix #1031.
2014-09-11 20:03:35 +02:00
Florian Walch
579e0baba0 Travis: Add subdirectories to dependency paths. 2014-09-11 19:54:00 +02:00
John Szakmeister
053a13d2a4 Merge #1033 'Automatic dependency rebuilding: Pass CMAKE_C_COMPILER_ARG1 to deps building.' 2014-09-11 06:13:17 -04:00
Florian Walch
dd27c30687 CMake: Use CMAKE_C_COMPILER_ARG1 when building dependencies.
CMAKE_C_COMPILER_ARG1 is set in CMake toolchain file
cmake/i386-linux-gnu.toolchain.cmake. Use when compiling dependencies to
simplify 32-bit builds.
2014-09-11 06:13:12 -04:00
Justin M. Keyes
1da3398095 Merge pull request #1144 from justinmk/fixtests
fix unittest issues with busted 2.x
2014-09-11 05:06:58 -04:00