aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
Commit message (Collapse)AuthorAge
...
* feat(api): evaluate statusline string #16020Famiu Haque2021-10-18
| | | | | | Adds API function `nvim_eval_statusline` to allow evaluating a statusline string and obtaining information regarding it. Closes https://github.com/neovim/neovim/issues/15849
* feat(:source, nvim_exec): defer script item creation until s:var accessSean Dewar2021-10-14
| | | | | | | | For anonymous scripts, defer the creation of script items until an attempt to access a script-local variable is made. This dramatically reduces the number of script items created when using lots of vim.cmd and nvim_exec especially. This will mean <SID> usage fails until a script-local variable access is first made.
* feat(:source, nvim_exec): support script-local variablesSean Dewar2021-10-14
| | | | | | | | | | | | | | Based on #13143 (and #11507) with changes: - Omit script_type_E. Use sn_name == NULL to determine anon items. - Keep SID_STR. Used by anon :source for .lua files (no item). - Show SID in get_scriptname output (:verbose set). - Factor item creation into new_script_item. - Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced). - Add tests for anon :source. Co-authored-by: Vikram Pal <vikrampal659@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* feat(api): named marks set, get, delete #15346Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | Adds the following API functions. - nvim_buf_set_mark(buf, name, line, col) * Set marks in a buffer. - nvim_buf_del_mark(buf, name) * Delete a mark that belongs to buffer. - nvim_del_mark(name) * Delete a global mark. - nvim_get_mark(name) * Get a global mark. Tests: - Adds test to all the new api functions, and adds more for the existing nvim_buf_get_mark. * Tests include failure cases. Documentation: - Adds documentation for all the new functions, and improves the existing fucntion docs.
* Merge pull request #15516 from bfredl/keysetBjörn Linse2021-10-03
|\ | | | | refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
| * refactor(api): handle option dicts properlyBjörn Linse2021-10-03
| | | | | | | | | | | | | | Do not copy a lot of lua strings (dict keys) to just strequal() them Just compare them directly to a dedicated hash function. feat(generators): HASHY McHASHFACE
* | fix(runtime): add packages as "/pack/*/start/*" patterns to &rtpBjörn Linse2021-10-02
|/ | | | This makes `globpath(&rtp, ...)` work again for start packages
* refactor(runtime): always use DIP_START when searching for runtime filesBjörn Linse2021-09-18
| | | | | | | | Now remove the addition of "start/*" packages in 'packpath' as explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming very long when using a lot of plugins as packages. To get the effective search path as a list, use |nvim_list_runtime_paths()|
* fix(typo): overriden -> overridden (RE: PR #14159) (#15360)Oliver Marriott2021-09-17
|
* fix(:source, nvim_exec): handle Vimscript line continuations #14809Sean Dewar2021-09-14
| | | | | | | | | | | Problem: Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations. Solution: Factor out the concat logic into concat_continued_line() and a CONCAT_CONTINUED_LINES macro for simple concatenations where lines are fetched individually. Closes #14807
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* feat(api): nvim_get_chan_info: include "argv" for jobs #15537Justin M. Keyes2021-09-01
| | | ref #15440
* fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname styleTJ DeVries2021-06-29
|
* Fix crash on `:echo get_all_options_info()`glacambre2021-05-26
| | | | | | Iterating over PARAM_COUNT is wrong as PARAM_COUNT also counts the last element of the options array, which has a NULL fullname in order to signal the end of the array.
* api: fix nvim_exec() silencing behaviour (#14413)Shadman2021-04-21
| | | | | Previously nvim_exec would silent output no matter whether output is true or false. Now output is only silent and captured when output is true.
* api: allow open non-current buffer as terminal (+ xmas bonus)Björn Linse2021-03-12
| | | | vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
* fix(notify): Expected 3 arguments error (#13905)notomo2021-02-09
|
* test: test vim-notifyMatthieu Coudron2021-02-02
|
* api(echo): should clear cmdline before echonotomo2021-01-21
|
* api: nvim_echonotomo2021-01-20
|
* input: consider "-- more --" state to be blocking, fixes #11899Björn Linse2021-01-04
|
* api/options: cleanup the fixupBjörn Linse2020-12-04
|
* api/options: fixupTJ DeVries2020-12-04
|
* api: enable nvim_get_runtime_file to find subdirectoriesBjörn Linse2020-11-24
|
* feat(lua): improve error message to make it actionable (#13276)Alvaro Muñoz2020-11-13
| | | * improve error message to make it actionable
* Merge pull request #13118 from bfredl/mudhollandBjörn Linse2020-10-19
|\ | | | | A Mudholland Dr. Recast
| * A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | | | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* | test/vim.validate(): assert normalized stacktraceJustin M. Keyes2020-10-05
|/ | | | | | | - The previous commit lost information in the tests. Instead, add some more "normalization" substitutions in pcall_err(), so that the general shape of the stacktrace is included in the asserted text. - Eliminate contains(), it is redundant with matches()
* Merge pull request #12376 from erw7/fix-stack-overflow-on-input-enqueueMatthieu Coudron2020-06-08
|\ | | | | input: fix stack overflow
| * nvim_input: add testerw72020-05-25
| |
* | API: nvim_create_buf: unset 'modeline' in scratch-buffer #12379Justin M. Keyes2020-05-29
|/ | | | Although 'nomodeline' is not strictly part of the definition of a "scratch-buffer" it is obviously the right default.
* paste: support replace mode (#11945)Jesse2020-05-05
| | | | | | * paste: support replace mode * Clean up Co-authored-by: Jesse Bakker <git@jessebakker.com>
* api: add nvim_get_runtime_file for finding runtime filesBjörn Linse2020-02-07
|
* API: rename nvim_execute_lua => nvim_exec_luaJustin M. Keyes2019-12-02
| | | | | | - We already find ourselves renaming nvim_execute_lua in tests and scripts, which suggests "exec" is the verb we actually want. - Add "exec" verb to `:help dev-api`.
* API: deprecate nvim_command_outputJustin M. Keyes2019-12-02
|
* API: rename nvim_source => nvim_execJustin M. Keyes2019-12-01
| | | | | - Eliminate nvim_source_output(): add boolean `output` param to nvim_exec() instead.
* API: nvim_source_outputVikram Pal2019-12-01
| | | | | | | - Similar to nvim_source but will capture the output - Add meaningful VimL tracebacks for nvim_source - Handle got_int - Add error reporting
* API: nvim_source: fix multiline inputJustin M. Keyes2019-12-01
| | | | | | | - DOCMD_REPEAT is needed to source all lines of input. - Fix ":verbose set {option}?" by handling SID_STR in get_scriptname(). closes #8722
* API: nvim_sourceSiddhant Gupta2019-12-01
|
* Context: rename "buflist" => "bufs"Justin M. Keyes2019-09-14
| | | | | Given the other type names "jumps", "vars", etc., the name "buflist" is somewhat unintuitive.
* API: nvim_get_context: "opts" paramJustin M. Keyes2019-09-14
| | | | | Since the parameter is already non-primitive, make it an `opts` map instead of just a list, in case we want to extend it later.
* test: Eliminate expect_errJustin M. Keyes2019-09-06
| | | | Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
* test: Rename meth_pcall to pcall_errJustin M. Keyes2019-09-06
| | | | | | | - Rename `meth_pcall`. - Make `pcall_err` raise an error if the function does not fail. - Add `vim.pesc()` to treat a string as literal where a Lua pattern is expected.
* test: is_os() #10933Justin M. Keyes2019-09-04
| | | | | - Move os_name() up to "global helpers". - Rename it to is_os(). - Make it depend on uname() instead of a running Nvim instance.
* shada/context: fully remove jumplist duplicates #10898Abdelhakeem Osama2019-09-03
| | | | | | | | | | | | | | | | - Always load files when cleaning up jumplist. - For Shada: avoids writing duplicate entries, which happens when you read from a shada file with duplicate entries (merging the jumplist while writing sometimes produces duplicate entries, bug?) and then write right away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement, that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`). - For Context: avoids non-idempotent behavior for the same reason (i.e.: first call to `shada_encode_jumps` does not remove duplicate entries). - Do not set pcmark when dumping jumplist for Context. - Retrieving current Context shouldn't add an entry to the jumplist (which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.: tail entry matching current position), just act like `getjumplist` for instance.
* tests: assert:set_parameter('TableFormatLevel', 100) #10925Daniel Hahler2019-09-03
| | | | | | luassert uses 3 by default, which is often not enough. Instead of documenting how to increase it, let's use a more fitting (sane) default of 100 levels.
* paste: one undo-block per streamJustin M. Keyes2019-09-02
| | | | | | - All "chunks" in a paste-stream should form a single undo-block. Side effect of 7a8579288424 was to create an undo-block for each chunk. - Also: remove old :redraw force logic, irrelevant after 7a8579288424.
* api: make nvim_put support "\022{NUM}" regtype as returned by getregtype()Björn Linse2019-08-31
|
* API: nvim_paste: add `crlf` parameterJustin M. Keyes2019-08-30
|
* paste: break lines at CR, CRLF #10877Justin M. Keyes2019-08-29
| | | | | | Some terminals helpfully translate \n to \r. fix #10872 ref #10223