aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* feat(ui): add vim.ui.input and use in lsp rename (#15959)Sebastian Lyng Johansen2021-11-07
| | | | | | * vim.ui.input is an overridable function that prompts for user input * take an opts table and the `on_confirm` callback, see `:help vim.ui.input` for more details * defaults to a wrapper around vim.fn.input(opts) * switches the built-in client's rename handler to use vim.ui.input by default
* fix(lsp): convert range to byte index before highlighting (#16218)elianiva2021-11-06
| | | | Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
* feat(lua): enable stack traces in error output (#16228)Gregory Anders2021-11-06
|
* fix(diagnostic): handle an unknown or missing client (#16242)Gregory Anders2021-11-05
| | | | | | | Sometimes plugins use pseudo-client IDs (e.g. nvim-lint or null-ls) in order to hook into the LSP infrastructure without being a bona fide LSP client. In these cases, get_client_by_id() will return nil since the client ID given does not correspond to a real client recognized by the LSP subsystem. When this happens, use "unknown" for the client name.
* fix(diagnostic): fix option resolution in open_float (#16229)Gregory Anders2021-11-04
|
* Merge pull request #16055 from doubleloop/config_dependsJames McCoy2021-11-03
|\
| * build(install): rescan GLOB files on rebuildJakub Łuczyński2021-10-18
| |
* | docs(lsp): correct usage examples of formatexpr (#16216)Michael Lingelbach2021-11-02
| |
* | docs: mention replacement for deprecated vim.lsp.diagnostic.show_* (#16211)Christian Clason2021-11-02
| |
* | refactor(api/marks)!: add opts param for feature extensibility (#16146)Javier Lopez2021-11-01
| | | | | | | | | | In the future we might want to extend the concept of named marks and adding opts reduces the need of changing the function signature in the furute.
* | fix(lsp): pass the enriched ctx to the client-side command (#16201)Nghia Le Minh2021-11-01
| |
* | feat(lsp): add per-client commands (#16101)Michael Lingelbach2021-11-01
| |
* | feat(ui): add `opt.kind` to `vim.ui.select` (#15838)Zachary Churchill2021-10-31
| | | | | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | fix(lsp): improve symbols_to_items performance (#16197)Michael Lingelbach2021-10-31
| | | | | | | | | | * use table.insert instead of list_extend to avoid validation overhead Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com>
* | fix(lsp): default to UTF-16 when lsp client using str_utfindexblack_desk2021-10-31
| |
* | fix(lsp): default to UTF-16 in make_position_paramsblack_desk2021-10-31
| |
* | fix(lsp): don't update active_clients on exit_timeout (#16192)David Hotham2021-10-31
| |
* | feat(lsp): add formatexpr (#16186)Michael Lingelbach2021-10-31
| | | | | | | | Co-authored-by: Meck <yesmeck@gmail.com> Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
* | fix(lsp): add placeholder cancel function (#16189)Michael Lingelbach2021-10-31
| | | | | | | | | | | | | | | | | | | | Fixes a bug introduced by https://github.com/neovim/neovim/pull/15949 When no supported clients for a given method are available, buf_request returns early with a nil value. If buf_request_sync is called on a buffer with no clients that support a given method, the returned `cancel` method (which is nil), is invoked, resulting in an error. Solution: return an empty function handle
* | feat(lsp): default to botright for setting qflist (#16177)Michael Lingelbach2021-10-30
| | | | | | | | | | | | * Opens quickfix list spanning the entire nvim window in location handlers closes https://github.com/neovim/neovim/issues/12241
* | fix(vim.mpack): rename pack/unpack => encode/decode #16175Justin M. Keyes2021-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. "unpack" has an unrelated meaning in Lua: https://www.lua.org/manual/5.1/manual.html#pdf-unpack 2. We already have msgpackparse()/msgpackdump() and json_encode()/json_decode(), so introducing another name for the same thing is entropy. Solution: - Rename vim.mpack.pack/unpack => vim.mpack.encode/decode Caveat: This is incongruent with the `Unpacker` and `Packer` functions. - It's probably too invasive to rename those. - They also aren't part of our documented interface. - This commit is "reversible" in the sense that we can always revert it and add `vim.mpack.encode/decode` as _aliases_ to `vim.mpack.pack/unpack`, at any time in the future, if we want stricter fidelity with upstream libmpack. Meanwhile, `vim.mpack.encode/decode` is currently the total _documented_ interface of `vim.mpack`, so this change serves the purpose of consistent naming in the Nvim stdlib.
* | refactor(diagnostic): make display handlers generic (#16137)Gregory Anders2021-10-29
| | | | | | | | | | | | | | Rather than treating virtual_text, signs, and underline specially, introduce the concept of generic "handlers", of which those three are simply the defaults bundled with Nvim. Handlers are called in `vim.diagnostic.show()` and `vim.diagnostic.hide()` and are used to handle how diagnostics are displayed.
* | feat(lsp): track pending+cancel requests on client object #15949jdrouhard2021-10-29
| |
* | vim-patch:partial 079ba76ae7a7 (#16126)Christian Clason2021-10-23
| | | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/079ba76ae7a7d0ef404cb9b41dff2663ff41f51b skip optwin.vim (needs 8.2.3520) skip doc/options.txt (needs 8.2.1535) skip doc/insert.txt (needs 8.2.3528)
* | feat(lua): document support of packages with v:lua syntaxBjörn Linse2021-10-23
| | | | | | | | this already worked in 0.5 but was not properly documented or tested
* | fix(lsp): cleanup progress messages for the correct client (#16110)Folke Lemaitre2021-10-21
| |
* | feat(lsp): add exit_timeout flag (#16070)Michael Lingelbach2021-10-21
| | | | | | | | | | | | | | * This flag allows customizing the time before sending kill -15 to the server. If set to false, neovim exits immediately after sending request('shutdown'). Otherwise, polls until all servers have shutdown, and then kills remaining servers via kill -15 at exit_timeout duration. Defaults to 500 ms.
* | fix(lsp): avoid duplicates in client attached buffers (#16099)Michael Lingelbach2021-10-20
| | | | | | | | | | | | | | closes https://github.com/neovim/neovim/issues/16058 * add client.attached_buffers * only update client.attached_buffers in on_attach * use table instead of list for attached_buffers to avoid duplication
* | fix(lsp): adjust legacy show diagnostic functions to use correct scope (#16106)Mathias Fußenegger2021-10-20
| | | | | | * `where` was renamed to `scope`
* | fix(diagnostic): allow floats to be focusable (#16093)Gregory Anders2021-10-19
| | | | | | | | Setting focus_id allows the float to be focused by calling the function a second time (a feature of open_floating_preview).
* | fix(diagnostic): handle diagnostics placed past the end of line (#16095)Gregory Anders2021-10-19
| |
* | 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