aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2024-03-09
|\
| * docs: support inline markdownLewis Russell2024-03-09
| | | | | | | | | | | | - Tags are now created with `[tag]()` - References are now created with `[tag]` - Code spans are no longer wrapped
| * feat!: remove deprecated functionsdundargoc2024-03-09
| |
| * vim-patch:9.1.0154: shm=F not respected when reloading buffer with 'autoread'zeertzjq2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | Problem: shm=F not respected when reloading buffer with 'autoread' Solution: Check SHM_FILEINFO in buf_check_timestamp() (Shougo Matsushita) closes: vim/vim#14144 https://github.com/vim/vim/commit/9db39b0ec90600bb41faec3a12b934b17c298b1f Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * vim-patch:9.1.0157: Duplicate assignment in f_getregion() (#27766)zeertzjq2024-03-08
| | | | | | | | | | | | | | | | | | Problem: Duplicate assignment in f_getregion(). Solution: Remove the duplicate assignment. Also improve getregion() docs wording and fix an unrelated typo (zeertzjq) closes: vim/vim#14154 https://github.com/vim/vim/commit/0df8f93bdaea77a1afb9f4eca94fe67ec73e6df2
| * fix(type): remove incorrect arguments from vim.rpc*altermo2024-03-07
| |
| * feat(lua): deprecate vim.tbl_add_reverse_lookupMaria José Solano2024-03-07
| |
| * vim-patch:9.1.0155: can only get getregion() from current buffer (#27757)zeertzjq2024-03-07
| | | | | | | | | | | | | | | | | | | | | | Problem: can only call getregion() for current buffer Solution: Allow to retrieve selections from different buffers (Shougo Matsushita) closes: vim/vim#14131 https://github.com/vim/vim/commit/84bf6e658da51126bdd2e50af1f40cabd149343f Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * fix(fs): use generics for better typingaltermo2024-03-06
| |
| * docs(lsp): nits and typos in client.luaMaria José Solano2024-03-06
| |
| * fix(types): move type annotation for `IterMod`Will Hopkins2024-03-06
| |
| * refactor(types): more fixes (2)Lewis Russell2024-03-06
| |
| * docs(treesitter): fix ambiguous parameter description about `lang`Yi Ming2024-03-06
| |
| * fix(lsp): actually send diagnostic-tags back to the serverLewis Russell2024-03-06
| | | | | | | | Fixes #27318
| * feat(lsp): report fswatch errorsLewis Russell2024-03-06
| | | | | | | | | | | | Resolves #27713 Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
| * refactor(lua): more efficient vim.tbl_islistLewis Russell2024-03-06
| | | | | | | | | | No need to run a full iteration of the table. Simply return false when the next key isn't what we expect.
| * refactor(types): more fixesLewis Russell2024-03-06
| |
| * docs(lua): improvements for LSP and DiagnosticLewis Russell2024-03-05
| |
| * docs(lua): clarify when `vim.bo`/`vim.wo` acts like `:setlocal` (#27708)Luna Saphie Mittelbach2024-03-04
| |
| * fix(lsp): directly rename the existing buffers when renaming (#27690)Jaehwang Jung2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.lsp.util.rename()` deletes the buffers that are affected by renaming. This has undesireable side effects. For example, when renaming a directory, all buffers under that directory are deleted and windows displaying those buffers are closed. Also, buffer options may change after renaming. Solution: Rename the buffers with :saveas. An alternative approach is to record all the relevant states and restore it after renaming, but that seems to be more complex. In fact, the older version was attempting to restore the states but only partially and incorrectly.
| * fix(lsp): defer writing error msgs (#27688)Jaehwang Jung2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | Context: Nvim catches errors from the user's `on_exit` and rpc handler callbacks and prints the error message. Problem: Printing the error message uses Nvim api functions. But callbacks mentioned above run in `:h lua-loop-callbacks` where most of `vim.api` is not allowed, so Nvim itself raises error. Solution: `vim.schedule()` the error reporting when necessary.
| * Merge pull request #27347 from lewis6991/fswatchLewis Russell2024-03-01
| |\ | | | | | | feat(lsp): add fswatch watchfunc backend
| | * feat(lsp): add fswatch watchfunc backendLewis Russell2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim._watch.watchdirs has terrible performance. Solution: - On linux use fswatch as a watcher backend if available. - Add File watcher section to health:vim.lsp. Warn if watchfunc is libuv-poll.
| | * fix(lsp): cancel watchers when closing a clientLewis Russell2024-03-01
| | |
| | * refactor(watch): simplify filechanges processingLewis Russell2024-03-01
| | |
| | * refactor(watch): general tidy upLewis Russell2024-03-01
| | | | | | | | | | | | | | | | | | - Rename watch.poll to watch.watchdirs - Unify how include and exclude is applied - Improve type hints
| * | docs: improve/add documentation of Lua typesLewis Russell2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added `@inlinedoc` so single use Lua types can be inlined into the functions docs. E.g. ```lua --- @class myopts --- @inlinedoc --- --- Documentation for some field --- @field somefield integer --- @param opts myOpts function foo(opts) end ``` Will be rendered as ``` foo(opts) Parameters: - {opts} (table) Object with the fields: - somefield (integer) Documentation for some field ``` - Marked many classes with with `@nodoc` or `(private)`. We can eventually introduce these when we want to.
| * | fix(types): rename win_get_config return type to win_configWill Hopkins2024-03-02
| | | | | | | | | Follow-up to #27397
| * | vim-patch:87410ab3f556 (#27696)zeertzjq2024-03-02
| |/ | | | | | | | | | | | | | | | | runtime(doc): some improvements to getregion() docs (vim/vim#14122) - Mention the default selection behavior - Remove useless sentence - Correct description about space padding https://github.com/vim/vim/commit/87410ab3f556121dfb3b30515f40c5f079edd004
| * fix(lsp): rename undofile when renaming (#27684)Jaehwang Jung2024-03-01
| | | | | | | | | | | | | | Problem: After `rename()`, the undo information for the renamed file(s) are lost. Solution: Rename the undofile as well.
| * docs(eval): getline and indent function support string typeglepnir2024-02-29
| | | | | | | | | | | | Problem: getline and indent function missing string type in param. Solution: add string type in eval gen.
| * fix(lsp): use plain loop for non-list-like table of protocol valuesChristian Clason2024-02-29
| | | | | | | | | | | | Fixup for #27628 Closes #27669
| * refactor(defaults): use getregion() for Visual mode gx (#27663)zeertzjq2024-02-29
| | | | | | Also make it work better on a multiline selection.
| * vim-patch:9.1.0142: getregion() can be improved (#27662)zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregion() can be improved (after v9.1.120) Solution: change getregion() implementation to use pos as lists and one optional {opt} dictionary (Shougo Matsushita) Note: The following is a breaking change! Currently, the getregion() function (included as of patch v9.1.120) takes 3 arguments: the first 2 arguments are strings, describing a position, arg3 is the type string. However, that is slightly inflexible, there is no way to specify additional arguments. So let's instead change the function signature to: getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists. This is slightly cleaner, and gives us the flexibility to specify additional arguments as key/value pairs to the optional Dict arg. Now it supports the "type" key to specify the selection type (characterwise, blockwise or linewise) and now in addition one can also define the selection type, independently of what the 'selection' option actually is. Technically, this is a breaking change, but since the getregion() Vimscript function is still quite new, this should be fine. closes: vim/vim#14090 https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * docs(lpeg): remove double backticks from meta (#27659)Maria José Solano2024-02-29
| |
| * fix(lsp): handle reverse lookup in capabilitiesMaria José Solano2024-02-28
| |
| * refactor(lsp): remove outdated commentMaria José Solano2024-02-28
| |
| * fix(lsp): correct the error message's cmd on spawning (#27632)notomo2024-02-28
| |
| * fix(lsp): remove unnecessary file load/write when renaming (#27621)Jaehwang Jung2024-02-28
| | | | | | | | | | | | | | | | | | Previously rename would unconditionally read the to-be-renamed file from the disk and write it to the disk. This is redundant in some cases If the file is not already loaded, it's not attached to lsp client, so nvim doesn't need to care about this file. If the file is loaded but has no change, it doesn't need to be written.
| * fix(lua): remove uri fragment from file paths (#27647)Ilia Choly2024-02-28
| | | | | | | | | | | | | | Problem: Some LSP servers return `textDocument/documentLink` responses containing file URIs with line/column numbers in the fragment. `vim.uri_to_fname` returns invalid file names for these URIs. Solution: Remove the URI fragment from file URIs.
| * docs(lpeg): merge upstream changesMaria José Solano2024-02-28
| |
| * feat(lsp): support completion itemDefaultsMaria José Solano2024-02-27
| |
| * refactor(lsp): alias for CompletionResultMaria José Solano2024-02-27
| |
| * feat(docs): replace lua2dox.luaLewis Russell2024-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The documentation flow (`gen_vimdoc.py`) has several issues: - it's not very versatile - depends on doxygen - doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C. - The intermediate XML files and filters makes it too much like a rube goldberg machine. Solution: Re-implement the flow using Lua, LPEG and treesitter. - `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic. - `lua2dox.lua` is gone! - No more XML files. - Doxygen is now longer used and instead we now use: - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`). - LPEG for C parsing (see `scripts/cdoc_parser.lua`) - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`). - Treesitter for Markdown parsing (see `scripts/text_utils.lua`). - The generated `runtime/doc/*.mpack` files have been removed. - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly. - Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
| * docs: fix type of setreg() argument {options} (#27631)Maria José Solano2024-02-27
| |
| * fix(defaults): validate 'channel' before responding to OSC request (#27594)Gregory Anders2024-02-26
| | | | | | | | | | Validate the channel number before responding to an OSC 10/11 request. When used with nvim_open_term, the channel number is unset (since there is no process on the other side of the PTY).
| * refactor(types): fix miscellaneous type warningsMaria José Solano2024-02-25
| |
| * fix(lsp): add assertion for explicit bufnr in apply_text_edits (#27614)Gregory Anders2024-02-24
| | | | | | | | | | Assert that the buffer number passed to apply_text_edits is fully resolved (not 0 or null). Pass the known buffer number to apply_text_edits from lsp.formatexpr().
| * docs: fix several misleading and superfluous wordings (#27609)Evgeni Chasnovski2024-02-25
| |
| * fix(lsp): when renaming directory, check path prefix of buffer names (#27603)Jaehwang Jung2024-02-24
| | | | | | | | | | For example, when renaming /path/to/dir, buffers like fern://drawer/file:///path/to/dir, /path/to/dir123 should not be matched.