aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
| * 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.
| * docs(lsp): mark `ClientConfig.init_options` as optionalChristian Clason2024-02-24
| | | | | | | | Followup to neovim/neovim#27443
| * refactor(lsp): remove redundant code (#27601)Jaehwang Jung2024-02-24
| | | | | | | | * use builtin function * buffer:// was removed in 236c20795eb9f11e21e0719b735ea741711acc08.
| * vim-patch:a35235e824bb (#27598)zeertzjq2024-02-24
| | | | | | | | | | | | | | | | | | runtime(doc) Update help text for matchbufline() and matchstrlist() closes: vim/vim#14080 https://github.com/vim/vim/commit/a35235e824bb77df0cebdb2bd290e13f1201b292 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * docs(lsp): remove obsolete didChangeConfiguration explanation (#27595)Tim Pope2024-02-24
| | | | | | Rendered obsolete by c6d747e6a5227e17556c62e16ed054398eb1a89a.
| * refactor(defaults): use getregion() for default * and # mappingszeertzjq2024-02-23
| |
| * vim-patch:9.1.0126: Internal error when using upper-case mark in getregion()zeertzjq2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Internal error when passing mark in another buffer to getregion(). Solution: Don't allow marks in another buffer (zeertzjq) closes: vim/vim#14076 Internal error when passing mark in another buffer to getregion() https://github.com/vim/vim/commit/421b597470c118871c7081de00dd065e0e000b7e
| * vim-patch:9.1.0120: hard to get visual region using Vim scriptzeertzjq2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: hard to get visual region using Vim script Solution: Add getregion() Vim script function (Shougo Matsushita, Jakub Łuczyński) closes: vim/vim#13998 closes: vim/vim#11579 https://github.com/vim/vim/commit/3f905ab3c4f66562f4a224bf00f49d98a0b0da91 Cherry-pick changes from patch 9.1.0122, with :echom instead of :echow. Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
| * feat(treesitter): add folding for `InspectTree` (#27518)再生花2024-02-22
| | | | | | | | As the InspectTree buffer is now a valid tree-sitter query tree, we can use the bundled fold queries to have folding for the tree.
| * fix(defaults): make terminal autoclose not block other events (#27581)Evgeni Chasnovski2024-02-22
| | | | | | | | | | | | Problem: When terminal is autocloses, it blocks other events, like `BufEnter`. Solution: Use `nested = true`.
| * fix(defaults): remove tmux background detection passthrough (#27571)zeertzjq2024-02-22
| | | | | | | | | | | | There is now a new tmux 3.4 release that queries background color from the parent terminal if background is not set in tmux, so removing the passthrough still works when background is not set in tmux, and fixes the incorrect detection when background is set in tmux.
| * fix(lua): make highlight.on_yank use win-local highlight (#27349)altermo2024-02-22
| | | | | | | | | | | | | | | | Currently, highlight.on_yank() does buffer-local highlighting, this PR makes it window scoped. Also fix the problem that when yanking in a buffer, moving to another buffer, and yanking before the original buffer highlight disappears, the original buffer highlight won't disappear on timeout.
| * feat(extmark): window scoped extmarkaltermo2024-02-21
| | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * docs: remove mention of foreground/background/special keys in nvim_set_hl ↵rktjmp2024-02-21
| | | | | | | | | | | | | | | | | | | | (#27558) To align the output of `nvim_get_hl` with its documentation -- which points to `nvim_set_hl`, remove mentions of the keys `foreground`, `background` and `special`. The long keys are are still supported (via fallback checks inside `dict2hlattrs`), but the `fg`, `bg` and `sp` keys are preferenced.
| * fix(lsp): add parentheses to generated union array types (#27560)Maria José Solano2024-02-21
| |
| * vim-patch:ef387c062bb1 (#27553)zeertzjq2024-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(filetype): Modula-2 files with priority not detected (vim/vim#14055) Problem: Modula-2 files with a specified priority are not detected. Solution: Match the priority syntax in module header lines when performing heuristic content detection. Disable the :defcompile debug line. This was accidentally left enabled in commit 68a8947. https://github.com/vim/vim/commit/ef387c062bb1966187d3f307d697d80162051a0d Co-authored-by: dkearns <dougkearns@gmail.com>
| * fix(vim.ui.open): use explorer.exe instead of wslview #26947Vu Nhat Chuong2024-02-20
| | | | | | | | | | | | | | | | | | Problem: `vim.ui.open` uses `wslview`, which is slow and require a package from external PPA: https://wslutiliti.es/wslu/install.html#ubuntu Solution: Use `explorer.exe` instead. WSL supports it by default: https://learn.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer
| * fix(extmarks): priority order of inline and non-inline virt_text (#27532)zeertzjq2024-02-20
| |
| * refactor(lsp): typings for protocol constantsMaria José Solano2024-02-19
| |
| * docs: improve 'tabline' click label docs (#27529)zeertzjq2024-02-19
| |
| * fix: fix iter_matches call in query linter (#27496)Gregory Anders2024-02-16
| |
| * fix(treesitter): correctly handle query quantifiers (#24738)Thomas Vigouroux2024-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query patterns can contain quantifiers (e.g. (foo)+ @bar), so a single capture can map to multiple nodes. The iter_matches API can not handle this situation because the match table incorrectly maps capture indices to a single node instead of to an array of nodes. The match table should be updated to map capture indices to an array of nodes. However, this is a massively breaking change, so must be done with a proper deprecation period. `iter_matches`, `add_predicate` and `add_directive` must opt-in to the correct behavior for backward compatibility. This is done with a new "all" option. This option will become the default and removed after the 0.10 release. Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: MDeiml <matthias@deiml.net> Co-authored-by: Gregory Anders <greg@gpanders.com>
| * docs: document breaking change for nvim_create_autocmd callback (#27484)Gregory Anders2024-02-15
| | | | | | | | | | | | | | | | | | | | https://github.com/neovim/neovim/pull/27428 changed the semantics of callbacks passed to nvim_create_autocmd such that any truthy value will delete the autocommand (rather than just the literal boolean value `true`). Update the documentation accordingly and add an entry to `news.txt`. The behavior is now consistent between nvim_create_autocmd and nvim_buf_attach.
| * fix: type warnings in shared.luaLewis Russell2024-02-15
| |
| * vim-patch:9.1.0111: filetype: no support for bats filesChristian Clason2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The '*.bats' file type is for Bash Automated Testing System (BATS) scripts. BATS scripts are Bash with a special '@test' extension but they otherwise work with Vim's bash filetype. See https://github.com/bats-core/bats-core closes: vim/vim#14039 https://github.com/vim/vim/commit/d00fb4b3a237b375de5a1f453c8453b8b3797d51 Co-authored-by: Brandon Maier <brandon.maier@collins.com>
| * vim-patch:9.1.0110: filetype: add 'Config.in' filetype detectionChristian Clason2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'Config.in' file type is for Buildroot configuration files. Buildroot Config.in files use the same Kconfig backend as the Linux kernel's Kconfig files. Buildroot also has other filename variants that follow "Config.in.*", they are used to distinguish multiple Config.in files in the same directory. See https://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file closes: vim/vim#14038 https://github.com/vim/vim/commit/5f20f050efed3431beaf85739f0113e9ef0abd8e Co-authored-by: Brandon Maier <brandon.maier@collins.com>
| * vim-patch:9.1.0109: filetype: no support for its filesChristian Clason2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: no support for its files Solution: Add detection for *.its files as dts file type (Brandon Maier) The '*.its' file type is for U-Boot Flattened Image Trees (FIT) which use the flattened devicetree format. See https://github.com/u-boot/u-boot/blob/master/doc/usage/fit/source_file_format.rst#terminology closes: vim/vim#14037 https://github.com/vim/vim/commit/cf1d65e060e32ba8a0ba99fc299dc192fe4aa961 Co-authored-by: Brandon Maier <brandon.maier@collins.com>
| * vim-patch:9.1.0108: filetype: no support for dtso filesChristian Clason2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: no support for dtso files Solution: Add detection for *.dtso files as dts file type (Markus Schneider-Pargmann) *.dtso files are devicetree overlay files which have the same syntax as dts or dtsi files. closes: vim/vim#14026 https://github.com/vim/vim/commit/b1700fb33fe02838d679b9215e501455cf4c1156 Co-authored-by: Markus Schneider-Pargmann <msp@baylibre.com>
| * fix(lsp): rename: load and list new buffer if attached to window (#27408)Tomasz N2024-02-14
| |
| * refactor(lsp): resolve the config-client entanglementLewis Russell2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the LSP-Client object contained some fields that are also in the client config, but for a lot of other fields, the config was used directly making the two objects vaguely entangled with either not having a clear role. Now the config object is treated purely as config (read-only) from the client, and any fields the client needs from the config are now copied in as additional fields. This means: - the config object is no longet normalised and is left as the user provided it. - the client only reads the config on creation of the client and all other implementations now read the clients version of the fields. In addition, internal support for multiple callbacks has been added to the client so the client tracking logic (done in lua.lsp) can be done more robustly instead of wrapping the user callbacks which may error.
| * refactor(lua): use a keyset for vim.diff opts parsingbfredl2024-02-13
| |
| * fix(loader): remove cyclic dependency on vim.fs (when --luamod-dev)Jongwook Choi2024-02-13
| | | | | | | | | | | | | | | | | | | | Problem: Loading `vim.fs` via the `vim.loader` Lua package loader will result in a stack overflow due to a cyclic dependency. This may happen when the `vim.fs` module isn't byte-compiled, i.e. when `--luamod-dev` is used (#27413). Solution: `vim.loader` depends on `vim.fs`. Therefore `vim.fs` should be loaded in advance.
| * docs(builtin): fix lua types for vim.fn.sign_getplacedJongwook Choi2024-02-13
| | | | | | | | | | | | | | Per :help sign_getplaced(): - Parameter {dict}: lnum also accepts integer as well as string - Return value: item has field bufnr, not buf
| * docs: stricter bufname and bufnr types (#27454)Maria José Solano2024-02-13
| |
| * fix(lsp): re-add client.commands and mark privateLewis Russell2024-02-12
| |
| * docs: correct on_key docs (#27429)altermo2024-02-12
| |
| * fix(lsp): semantic token defer loadingLewis Russell2024-02-12
| | | | | | | | Fixes #27424
| * refactor(lsp): move more code to client.luaLewis Russell2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | | The dispatchers used by the RPC client should be defined in the client, so they have been moved there. Due to this, it also made sense to move all code related to client configuration and the creation of the RPC client there too. Now vim.lsp.start_client is significantly simplified and now mostly contains logic for tracking open clients. - Renamed client.new -> client.start