aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* Merge pull request #15767 from lewis6991/lua_var_indexBjörn Linse2021-10-19
|\ | | | | feat(lua): allow passing handles to `vim.b/w/t`
| * feat(lua): allow passing handles to vim.b/w/tLewis Russell2021-10-19
| | | | | | | | | | | | vim.bo can target a specific buffer by indexing with a number, e.g: `vim.bo[2].filetype` can get/set the filetype for buffer 2. This change replicates that behaviour for the variable namespace.
* | fix(gen_vimdoc.py): spacing around inline elements #16092Gregory Anders2021-10-19
|/ | | | | The spacing fix drew attention to a couple of places that were using incorrect formatting such as the key listing for `nvim_open_win`, so those were fixed too.
* refactor(diagnostic)!: replace 'show_*' functions with 'open_float' (#16057)Gregory Anders2021-10-19
| | | | | | | | | | | | | | | | | | | | 'show_line_diagnostics()' and 'show_position_diagnostics()' are almost identical; they differ only in the fact that the latter also accepts a column to form a full position, rather than just a line. This is not enough to justify two separate interfaces for this common functionality. Renaming this to simply 'show_diagnostics()' is one step forward, but that is also not a good name as the '_diagnostics()' suffix is redundant. However, we cannot name it simply 'show()' since that function already exists with entirely different semantics. Instead, combine these two into a single 'open_float()' function that handles all of the cases of showing diagnostics in a floating window. Also add a "float" key to 'vim.diagnostic.config()' to provide global values of configuration options that can be overridden ephemerally. This makes the float API consistent with the rest of the diagnostic API. BREAKING CHANGE
* feat(lsp): set codelens virtual text hl_mode to combine (#16048)sim2021-10-19
| | | | | It looks a bit off with the extmark going over the cursorline. (With hl_mode combine it keeps the background of the cursorline under the codelens virtualtext)
* docs: clarify chdir/CWD behaviors #16083zeertzjq2021-10-19
|
* feat(man.vim): convert spaces to underscores #16068William Chargin2021-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | PostgreSQL ships with man pages for SQL statements like `CREATE TABLE`, which are provided with underscores as `man 7 CREATE_TABLE`. This patch updates `man#open_page` (as used by `:Man`) such that visually selecting the words `CREATE TABLE` in SQL code and pressing `K` properly opens the desired man page. Writing `:Man CREATE TABLE` still does not work, since `CREATE` is interpreted as a section name. (Similarly, `:Man CREATE TABLE AS` fails because there are too many arguments to `:Man`.) But this is okay, because if you're typing it anyway then you can just enter underscores and also tab-completion properly suggests `:Man CREATE_TABLE(7)`. This is a bit bespoke, but my box has over 9000 man pages (as reported by `man -k '' | wc -l`), and not one of them has a space in the man page name, whereas the Postgres manuals do exist and are actually useful. Test Plan: On a machine with Postgres manual pages, running nvim -u NORC +'exe "norm iCREATE TABLE foo(x int);" | norm 0veeK' should open the appropriate man page. wchargin-branch: man-spaces-to-underscores
* docs: regenerate (#15986)github-actions[bot]2021-10-19
| | | Co-authored-by: marvim <marvim@users.noreply.github.com>
* feat(lsp): use vim.ui.select() in codelenses (#16004)Josa Gesell2021-10-18
| | | Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* fix(lsp): fix cursor row after textEdits (#16038)hrsh7th2021-10-18
|
* fix(lsp): persist diagnostic config for clientsGregory Anders2021-10-18
| | | | | Persist configuration settings set with `vim.lsp.with` and `vim.lsp.diagnostic.on_publish_diagnostics` by setting the config for the namespace associated with the client.
* Merge pull request #15952 from zeertzjq/vim-8.1.1291Jan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.0.{1459,1460,1461,1463},8.1.{0602,0604,1291},8.2.{0189,0876,0909,1411}: chdir and DirChanged related patches
| * refactor(dirchanged): tab -> tabpagezeertzjq2021-10-17
| | | | | | | | Match Vim's behavior.
| * vim-patch:8.2.0876: :pwd does not give a hint about the scope of the directoryzeertzjq2021-10-17
| | | | | | | | | | | | Problem: :pwd does not give a hint about the scope of the directory Solution: Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes vim/vim#5469) https://github.com/vim/vim/commit/950587242cad52d067a15f0f0c83528a28f75731
| * vim-patch:8.1.1291: not easy to change directory and restorezeertzjq2021-10-17
| | | | | | | | | | | | | | | | Problem: Not easy to change directory and restore. Solution: Add the chdir() function. (Yegappan Lakshmanan, closes vim/vim#4358) https://github.com/vim/vim/commit/1063f3d2008f22d02ccfa9dab83a23db52febbdc Also includes some documentation changes from patch 8.1.1218.
| * vim-patch:8.0.1459: cannot handle change of directoryzeertzjq2021-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot handle change of directory. Solution: Add the DirChanged autocommand event. (Andy Massimino, closes vim/vim#888) Avoid changing directory for 'autochdir' too often. https://github.com/vim/vim/commit/b7407d3fc9496f9048fb65ab17b5ba3444965c0e Only add "auto" pattern. "window" and "global" are already implemented. Skip `Test_dirchanged_auto` using `CheckFunction test_autochdir`. Part of PR #15952. More information can be found there. N/A patches for version.c: vim-patch:8.0.1460: missing file in patch Problem: Missing file in patch. Solution: Add changes to missing file. https://github.com/vim/vim/commit/b5cb65ba2bcc6bbc6d2798a2dea18b95f0b38f5e vim-patch:8.0.1461: missing another file in patch Problem: Missing another file in patch. Solution: Add changes to missing file. https://github.com/vim/vim/commit/15833239a4131279935a4bd574b74fe3a2b0f49f
* | fix(diagnostic): do not override existing config settings #16043Gregory Anders2021-10-17
|/ | | | | | | | | | | When using `true` as the value of a configuration option, the option is configured to use default values. For example, if a user configures virtual text to include the source globally (using vim.diagnostic.config) and a specific namespace or producer configures virtual text with `virt_text = true`, the user's global configuration is overriden. Instead, interpret a value of `true` to mean "use existing settings if defined, otherwise use defaults".
* vim-patch:8.2.3519: TOML files are not recognized (#16045)dundargoc2021-10-16
| | | | | Problem: TOML files are not recognized. Solution: Add filetype patterns for TOML. (Aman Verma, closes vim/vim#8984) https://github.com/vim/vim/commit/28b6a3bef6d25d36c049bb731ced496155f7f9c0
* vim-patch:2286304cdbbaChristian Clason2021-10-16
| | | | | Update runtime files https://github.com/vim/vim/commit/2286304cdbba53ceb52b3ba2ba4a521b0a2f8d0f
* vim-patch:8.2.3501: tmux filetype dection is incomplete (#16021)dundargoc2021-10-15
| | | | | | Problem: tmux filetype dection is incomplete Solution: Also use tmux for files having text after .conf. (Eric Pruitt, closes vim/vim#8971) https://github.com/vim/vim/commit/e519eb41c1c12836b2d12aeb703bb04c7618a724
* fix: correctly capture uri scheme on windows (#16027)Michael Lingelbach2021-10-15
| | | | | | closes https://github.com/neovim/neovim/issues/15261 * normalize uri path to forward slashes on windows * use a capture group on windows that avoids mistaking drive letters as uri scheme
* fix(heath/provider.vim): using list as string #16007Javier Lopez2021-10-12
| | | Fixes #15988
* fix(lsp): maintain client_ids table structure when filtering (#15991)Jose Alvarez2021-10-11
|
* fix(lsp): do not invoke handlers for unsupported methods (#15926)Michael Lingelbach2021-10-10
| | | | | | | Closes https://github.com/neovim/neovim/issues/15174 Instead of invoking handlers with unsupported methods, pre-compute which clients support a given method and only notify the user if no clients support the given method.
* Merge pull request #15502 from seandewar/vim-8.1.1921Jan Edmund Lazo2021-10-10
|\ | | | | Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
| * feat(eval/method): partially port v8.1.1987Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | Cannot be fully ported as the remote_*() functions from +clientserver are not yet ported. Include the test changes anyway. line()'s optional winid argument was already ported. (Wasn't added in this patch; this just adds documentation)
| * vim-patch:8.1.1984: more functions can be used as methodsSean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/3f4f3d8e7e6fc0494d00cfb75669a554c8e67c8b test_prompt_buffer.vim already had all the changes, except Test_prompt_garbage_collect().
| * vim-patch:8.1.1961: more functions can be used as a methodSean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method. Add a test for mapcheck(). https://github.com/vim/vim/commit/a1449836334355b1fb00cd1bf083e7d353f6c4d7 mzeval() (if_mzscheme) is N/A.
| * feat(eval/method): partially port v8.1.1954Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | Does not include listener_*() functions. js_*() functions are N/A. json_encode() and json_decode() didn't include tests; add some anyway (to json_functions_spec.lua). test_lua.vim isn't included yet, so add tests to luaeval_spec.lua.
| * feat(eval/method): partially port v8.1.1953Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - index(): requires Blobs from v8.1.0735. Note that index() was already added as a method in v8.1.1803; this patch only adds a test. - iconv(): requires v8.1.1136 for test_termcodes.vim. Nvim deprecated inputdialog(), so it no longer has an eval.txt entry. Keep the test for hlexists() commented-out, just like previously. (Nvim always defines the Number group, so it always returns 1 instead) Cannot include both changes to test_syn_attr.vim as Nvim doesn't support ":hi term=..."; however, both test the same ->hlID() syntax anyway.
| * vim-patch:8.1.1952: more functions can be used as a methodSean Dewar2021-10-03
| | | | | | | | | | | | Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method. https://github.com/vim/vim/commit/5d69fdb7c4b91faf2d92b8d449cc9460f3035fb3
| * feat(eval/method): partially port v8.1.1925Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - getcwd(): requires chdir() and Test_chdir_func() from v8.1.1291. Note that the method call tests for getreg() and getregtype() were removed in v8.2.1547, which has already been ported, but doesn't seem to have been replaced with a new test... This patch also makes getchangelist()'s argument optional (defaults to the current buffer). eval.txt includes a typo for gettabwinvar(), which is fixed in v8.1.1952.
| * feat(eval/method): partially port v8.1.1921Sean Dewar2021-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds method call support for all functions in the patch, but it cannot be fully ported due to missing tests for: - filereadable(): requires v8.1.1378 for Test_delete_rf(), but there appears to have been some trouble porting it. (#12784) - confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for feedkeys()'s "L" flag. (I did attempt to port the test using nvim_input() instead, but seems that input handling for confirm() doesn't work in --headless mode?) Note that confirm() was actually added as a method in v8.1.1915. Uncomment use of method call syntax in Test_Executable() previously included instead from v8.2.2259.
* | fix(lsp): add done flag to messages returned in util.get_progress_messages() ↵jdrouhard2021-10-10
| | | | | | | | (#15985)
* | vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878zeertzjq2021-10-09
| | | | | | | | | | Problem: Cannot distinguish Normal and Terminal-Normal mode. Solution: Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856) https://github.com/vim/vim/commit/72406a4bd2896915b6f541e26d41521a59b1f846
* | fix(checkhealth): duplicate checks if module name has "-" #15935Jakub Łuczyński2021-10-08
| | | | | | | | | | | | | | Problem: Some plugins have structure `lua/nvim-someplugin/..` Since `-` is not allowed in vim function names, healthcheck names in lua and in vim can not have the same name (typically vim will use `_` instead of `-`). Solution: Normalize the names before checking for duplicates.
* | fix(lsp): add textDocument/prepareRename to capability map (#15961)francisco souza2021-10-08
| | | | | | | | | | | | | | | | | | | | This is a simple fix for #15899, as it should at least stop calling `prepareRename` on servers that don't support renaming. I imagine a better fix would be to inspect the actual value for, but that requires some plumbing changes on how capabilities are evaluated before sending requests out. Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
* | fix(diagnostic): error on invalid severity value (#15965)Gregory Anders2021-10-08
| | | | | | | | | | | | | | Users can pass string values for severities that match with the enum names (e.g. "Warn" or "Info") which are converted to the corresponding numerical value in `to_severity`. Invalid strings were simply left as-is, which caused confusing errors later on. Instead, report an invalid severity string right up front to make the problem clear.
* | fix(lsp): expose ContentModified error code to callbacks (#15262)Rishikesh Vaishnav2021-10-08
| |
* | feat(lsp): utilize textEdit.range for startbyte in omnifunc (#15957)Mathias Fußenegger2021-10-08
| | | | | | Closes https://github.com/neovim/neovim/issues/15784
* | fix: support severity_sort option for show_diagnostic functions (#15948)Gregory Anders2021-10-07
| | | | | | Support the severity_sort option for show_{line,position}_diagnostics.
* | fix(provider): compare versions as number, not string #15937Tejasvi S. Tomar2021-10-07
| | | | | | | | "3.10" < "3.3" but v3.10 > v3.3 Fixes #14586
* | feat(diagnostic): update jumplist on goto_next/prev (#15942)Sean Dewar2021-10-07
| |
* | fix: set cursorlineopt=number in terminal mode (#15493)Yorick Peterse2021-10-06
| | | | | | | | | | | | | | | | | | | | When entering terminal mode, cursorlineopt is no longer entirely disabled. Instead, it's set to `number`. Doing so ensures that users using `set cursorline` combined with `set cursorlineopt=number` have consistent highlighting of the line numbers, instead of this being disabled when entering terminal mode. Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* | vim-patch:8.2.0017: OS/2 and MS-DOS are still mentioned #15928dundargoc2021-10-06
| | | | | | | | | | | | Problem: OS/2 and MS-DOS are still mentioned, even though support was removed long ago. Solution: Update documentation. (Yegappan Lakshmanan, closes vim/vim#5368) https://github.com/vim/vim/commit/6f345a1458df2db03fba7863492404e9dc8b817c
* | fix(checkhealth): mitigate issues with duplicate healthchecks #15919Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(runtime/health): mitigate issues with duplicate healthchecks Previously if a healthcheck was found as Lua and Vim it was executed both times. This new implementations prefers Lua, therefore if two are found It only runs the Lua one, this way a plugin can mantain both implementations the Lua one with the method `check()` and the autoload function `#check()` (for none HEAD nvim versions). **Note: This will require plugins to use `check()` as the function name, since the autoload function that wraps the lua implementation won't be called** * docs(health): use spaces and don't overuse backtics followup to #15259
* | docs: regenerate #15545github-actions[bot]2021-10-05
| |
* | 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.
* | feat(lsp): improve json deserialization performance (#15854)Michael Lingelbach2021-10-05
| | | | | | | | | | | | | | | | | | | | * Add optional second table argument to vim.json.decode which takes a table 'luanil' which can include the 'object' and/or 'array' keys. These options use luanil when converting NULL in json objects and arrays respectively. The default behavior matches the original lua-cjson. * Remove recursive_convert_NIL function from rpc.lua, use vim.json.decode with luanil = { object = true } instead. This removes a hotpath in the json deserialization pipeline by dropping keys with json NULL values throughout the deserialized table.
* | fix(vim-patch): add missing nginx runtime files (#15916)Christian Clason2021-10-05
| | | | | | Followup to incomplete runtime update https://github.com/neovim/neovim/pull/15911