aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | fix(runtime): add remaining missing commentstrings (#30252)LosFarmosCTL2024-09-10
| |
* | fix(server): CID 509282: DEADCODE #30316Justin M. Keyes2024-09-09
| | | | | | listen_addr cannot be NULL at this point.
* | Merge #30312 from justinmk/testslashesJustin M. Keyes2024-09-09
|\ \
| * | fix(test): "tempdir not a directory" in CI logsJustin M. Keyes2024-09-09
| | | | | | | | | | | | | | | | | | $NVIM_LOG_FILE: /Users/runner/work/neovim/neovim/build/.nvimlog WRN 2024-09-08T21:48:13.279 ?.21134 vim_mktempdir:3281: $TMPDIR tempdir not a directory (or does not exist): TMPDIR-should-be-ignored WRN 2024-09-08T21:48:13.312 ?.21137 vim_mktempdir:3281: $TMPDIR tempdir not a directory (or does not exist): TMPDIR-should-be-ignored
| * | refactor(test): rename alter_slashes, invert its behaviorJustin M. Keyes2024-09-09
|/ / | | | | | | | | | | | | - `alter_slashes` belongs in `testutil.lua`, not `testnvim.lua`. - `alter_slashes` is an unusual name. Rename it to `fix_slashes`. - invert its behavior, to emphasize that `/` slashes are the preferred, pervasive convention, not `\` slashes.
* | fix(startup): server fails if $NVIM_APPNAME is relative dir #30310Justin M. Keyes2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If $NVIM_APPNAME is a relative dir path, Nvim fails to start its primary/default server, and `v:servername` is empty. Root cause is d34c64e342dfba9248d1055e702d02620a1b31a8, but this wasn't noticed until 96128a5076b7 started reporting the error more loudly. Solution: - `server_address_new`: replace slashes "/" in the appname before using it as a servername. - `vim_mktempdir`: always prefer the system-wide top-level "nvim.user/" directory. That isn't intended to be specific to NVIM_APPNAME; rather, each *subdirectory* ("nvim.user/xxx") is owned by each Nvim instance. Nvim "apps" can be identified by the server socket(s) stored in those per-Nvim subdirs. fix #30256
* | fix(lua): revert vim.tbl_extend behavior change and document itChristian Clason2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.tbl_deep_extend had an undocumented feature where arrays (integer-indexed tables) were not merged but compared literally (used for merging default and user config, where one list should overwrite the other completely). Turns out this behavior was relied on in quite a number of plugins (even though it wasn't a robust solution even for that use case, since lists of tables (e.g., plugin specs) can be array-like as well). Solution: Revert the removal of this special feature. Check for list-like (contiguous integer indices) instead, as this is closer to the intent. Document this behavior.
* | fix(startup): ignore broken $XDG_RUNTIME_DIR #30285Justin M. Keyes2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: $XDG_RUNTIME_DIR may be broken on WSL, which prevents starting (and even building) Nvim. #30282 Solution: - When startup fails, mention the servername in the error message. - If an autogenerated server address fails, log an error and continue with an empty `v:servername`. It's only fatal if a user provides a bad `--listen` or `$NVIM_LISTEN_ADDRESS` address. Before: $ nvim --headless --listen ./hello.sock nvim: Failed to --listen: "address already in use" $ NVIM_LISTEN_ADDRESS='./hello.sock' ./build/bin/nvim --headless nvim: Failed to --listen: "address already in use" After: $ nvim --headless --listen ./hello.sock nvim: Failed to --listen: address already in use: "./hello.sock" $ NVIM_LISTEN_ADDRESS='./hello.sock' ./build/bin/nvim --headless nvim: Failed $NVIM_LISTEN_ADDRESS: address already in use: "./hello.sock"
* | fix(lsp): handle out-of-bounds character positions #30288Tristan Knight2024-09-08
| | | | | | | | | | | | | | | | | | | | | | Problem: str_byteindex_enc could return an error if the index was longer than the lline length. This was handled in each of the calls to it individually Solution: * Fix the call at the source level so that if the index is higher than the line length, line length is returned as per LSP specification * Remove pcalls on str_byteindex_enc calls. No longer needed now that str_byteindex_enc has a bounds check.
* | Merge #30105 fix(tohtml): quote font-family namesJustin M. Keyes2024-09-08
|\ \
| * | test(tohtml): simplify font testJustin M. Keyes2024-09-08
| | |
| * | fix(tohtml): enclose font-family names in quotation marksyayoyuyu2024-09-08
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Font-family names must be enclosed in quotation marks to ensure that fonts are applied correctly when there are spaces in the name. Fix an issue where multiple fonts specified in `vim.o.guifont` are inserted as a single element, treating them as a single font. Support for escaping commas with backslash and ignoring spaces after a comma. ref `:help 'guifont'`
* | vim-patch:b584117: runtime(doc): buffers can be re-used (#30300)zeertzjq2024-09-08
| | | | | | | | | | | | | | | | | | | | while at it, also move the note about :wincmd directly to :h :wincmd, it doesn't seem to belong to the buffer section. closes: vim/vim#15636 https://github.com/vim/vim/commit/b584117b05790cc95628af79e874fb58bbcc2cb7 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(vim.ui.open): prefer xdg-open on WSL #30302Yi Ming2024-09-07
| | | | | | | | xdg-open is usually not installed in WSL. But if the user deliberately installs it, presumably they want to prioritize it.
* | test(lua): tbl_deep_extend "after second argument" #30297Justin M. Keyes2024-09-07
| |
* | vim-patch:9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs (#30293)zeertzjq2024-09-07
| | | | | | | | | | | | | | | | | | | | Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in text matched by 'formatlistpat' (John M Devin) Solution: Use the width of the match text (zeertzjq) fixes: vim/vim#15634 closes: vim/vim#15635 https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c
* | vim-patch:9.1.0719: Resetting cell widths can make 'listchars' or ↵zeertzjq2024-09-06
| | | | | | | | | | | | | | | | | | | | | | 'fillchars' invalid (#30289) Problem: Resetting cell widths can make 'listchars' or 'fillchars' invalid. Solution: Check for conflicts when resetting cell widths (zeertzjq). closes: vim/vim#15629 https://github.com/vim/vim/commit/66f65a46c5d169f20f780721d4f74d4729855b96
* | Merge pull request #30236 from luukvbaal/invalidbfredl2024-09-06
|\ \ | | | | | | fix(decor): revise marktree metadata for invalid marks
| * | fix(decor): exclude invalid marks from meta totalLuuk van Baal2024-09-04
| |/ | | | | | | | | | | Problem: Marktree meta count still includes invalidated marks, making guards that check the meta total ineffective. Solution: Revise marktree metadata when in/revalidating a mark.
* | Merge pull request #30272 from bfredl/replace_emojibfredl2024-09-06
|\ \ | | | | | | fix(multibyte): handle backspace of wide clusters in replace mode
| * | fix(multibyte): handle backspace of wide clusters in replace modebfredl2024-09-06
| | | | | | | | | | | | | | | Make utf_head_off more robust against invalid sequences and embedded NUL chars
* | | vim-patch:9.1.0717: Unnecessary nextcmd NULL checks in ↵zeertzjq2024-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_command_modifiers() (#30275) Problem: Unnecessary nextcmd NULL checks in parse_command_modifiers(). Solution: Remove them (zeertzjq) Every place parse_command_modifiers() is called, nextcmd is NULL, and after it's set to non-NULL the function returns very soon. Even if one day nextcmd may be non-NULL, the NULL checks may still be wrong as the correct behavior may be overriding nextcmd. closes: vim/vim#15620 https://github.com/vim/vim/commit/f7b8609446f171a6a287f61564e39a8dac5ff47d
* | | vim-patch:9.1.0716: resetting setcellwidth() doesn't update the screen (#30274)zeertzjq2024-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: resetting setcellwidth() doesn't update the screen Solution: Redraw after clearing the cellwidth table (Ken Takata) closes: vim/vim#15628 https://github.com/vim/vim/commit/539e9b571ae2a80dfa8a42eb132ad9f65f0bbcbc Co-authored-by: Ken Takata <kentkt@csc.jp>
* | | build(deps): bump libuv to HEAD - 0a00e80c3Christian Clason2024-09-05
| | |
* | | refactor(vterm): inline REFLOW macroPaul "LeoNerd" Evans2024-09-05
| | | | | | | | | | | | cherry-picked from https://github.com/neovim/libvterm/commit/dfc4c5e5b3dd99247dc95031a8f40087f181dea5
* | | feat(defaults): popupmenu "Open in browser", "Go to definition" #30261Justin M. Keyes2024-09-05
| | | | | | | | | | | | - Use the popup to expose more features such as LSP and gx. - Move the copy/paste items lower in the menu, they are lower priority.
* | | refactor: adopt termkey and eliminate duplicate codedundargoc2024-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Termkey is abandoned and it's now our code, so there's no reason not to treat it as such. An alternative approach could be to have a proper repo that we maintain such as with unibilium, although with this approach we can make a few assumptions that will allow us to remove more code. Also eliminate duplicate code from both termkey and libvterm.
* | | test: avoid noise in CI logs #30264Justin M. Keyes2024-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Since 96128a5076b7 the test logs have noise from tests that *expect* failures: $NVIM_LOG_FILE: /tmp/cirrus-ci-build/build/.nvimlog (last 100 lines) ERR 2024-09-04T13:38:45.181 T949.28335.0/c terminfo_start:486: uv_pipe_open failed: no such device or address ERR 2024-09-04T13:38:45.181 T949.28335.0/c flush_buf:2527: uv_write failed: bad file descriptor ERR 2024-09-04T13:38:45.181 T949.28335.0/c flush_buf:2527: uv_write failed: bad file descriptor WRN 2024-09-04T13:43:43.294 ?.35904 server_start:173: Failed to start server: address already in use: /…/Xtest_tmpdir/…/T7159.35895.0 WRN 2024-09-04T13:43:43.314 ?.35907 server_start:173: Failed to start server: illegal operation on a directory: / ERR 2024-09-04T13:43:43.332 ?.35909 socket_watcher_init:60: Host lookup failed: https://example.com Solution: Rewrite the test to use `vim.system()`. Set NVIM_LOG_FILE in the child process to a "throwaway" logfile.
* | | fix(lsp): handle locations exceeding line length #30253Tristan Knight2024-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: LSP spec [states](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position) that "if the character value is greater than the line length it defaults back to the line length", but `locations_to_items` fails in that case. Solution: Adjust locations_to_items to follow the spec. closes #28281
* | | vim-patch:315b6f7: runtime(tmux): Update syntax script (#30265)Gregory Anders2024-09-04
| | | | | | | | | | | | | | | | | | | | | | | | closes: ericpruitt/tmux.vim#25 closes: vim/vim#15622 https://github.com/vim/vim/commit/315b6f7b73edfffe4c6e4b0a4d620707489f7315 Co-authored-by: Eric Pruitt <eric.pruitt@gmail.com>
* | | vim-patch:150b507: runtime(hcl,terraform): Add runtime files for HCL and ↵Gregory Anders2024-09-04
| |/ |/| | | | | | | | | | | Terraform (#30266) closes: vim/vim#15618 https://github.com/vim/vim/commit/150b5078ac886519083576124090489c3a21bd3b
* | fix(lua): allows tables with integer keys to be merged in tbl_deep_extendLewis Russell2024-09-04
|/ | | | | | | | | - The exclusion of lists was never justified in the commit history and is the wrong thing to do for a function that deals with tables. - Move the error checks out of the recursive path. Fixes #23654
* vim-patch:9.1.0713: Newline causes E749 in Ex mode (#30254)zeertzjq2024-09-04
| | | | | | | | | | Problem: Newline causes E749 in Ex mode (after 9.1.0573). Solution: Don't execute empty command followed by a newline. closes: vim/vim#15614 https://github.com/vim/vim/commit/2432b4a75321a1a9ac0f9b326c7e46d38bdb71bb Cherry-pick code change from patch 8.2.3405.
* feat(lsp): support hostname in rpc.connect #30238Tristan Knight2024-09-03
| | | | | | | | | | | | | | | Updated the `rpc.connect` function to support connecting to LSP servers using hostnames, not just IP addresses. This change includes updates to the documentation and additional test cases to verify the new functionality. - Modified `connect` function to resolve hostnames. - Updated documentation to reflect the change. - Added test case for connecting using hostname. Added a TCP echo server utility function to the LSP test suite. This server echoes the first message it receives and is used in tests to verify LSP server connections via both IP address and hostname. Refactored existing tests to use the new utility function.
* docs: use "nvim" in swapfile message #30250こけっち2024-09-03
| | | | | | | Problem: The message E325 displays “vim -r” to recover the file. Solution: Change the message to display “nvim -r” instead of “vim -r”.
* fix(api): nvim_buf_get_text() crashes with large negative column #28740vanaigr2024-09-03
| | | | | | | | | | Problem: crash when calling nvim_buf_get_text() with a large negative start_col: call nvim_buf_get_text(0, 0, -123456789, 0, 0, {}) Solution: clamp start_col after subtracting it from the line length.
* Merge pull request #30232 from bfredl/emoji2bfredl2024-09-03
|\ | | | | fix(mbyte): mark any 0xFE0F sequence as a TUI ambiguous width char
| * fix(mbyte): mark any 0xFE0F sequence as a TUI ambiguous width charbfredl2024-09-02
| | | | | | | | | | | | | | | | | | Some sequences beginning with ASCII might be rendered as emoji, as for instance emoji 1️⃣ which is encoded as ascii 0x31 + U+FE0F + U+20E3. While it is tricky to make the width of such sequences configurable, we can make TUI be careful with such sequences and reset the cursor, just like for Extended_Pictogram based sequences.
* | test: tmpname(create:boolean) #30242Justin M. Keyes2024-09-03
| | | | | | | | | | | | | | | | | | Problem: 137f98cf6428 added the `create` parameter to `tmpname()` but didn't fully implement it. Solution: - Update impl for the `os.tmpname()` codepath. - Inspect all usages of `tmpname()`, update various tests.
* | Merge #30237 validate --listen addressJustin M. Keyes2024-09-02
|\ \
| * | feat(startup): validate --listen addressJustin M. Keyes2024-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim --listen` does not error on EADDRINUSE. #30123 Solution: Now that `$NVIM_LISTEN_ADDRESS` is deprecated and input *only* (instead of the old, ambiguous situation where it was both an input *and* an output), we can be fail fast instead of trying to "recover". This reverts the "recovery" behavior of 704ba4151e7f67999510ee0ac19fdabb595d530c, but that was basically a workaround for the fragility of `$NVIM_LISTEN_ADDRESS`.
| * | test: tmpname() can skip file creationJustin M. Keyes2024-09-02
|/ /
* | build: add quotes around `CMAKE_GENERATOR` variabledundargoc2024-09-02
| | | | | | | | | | | | | | | | | | This will fix the following error when using generators that have a space in them, e.g. "Unix Makefiles": "CMake Error: Could not create named generator Unix". Closes https://github.com/neovim/neovim/issues/30218.
* | feat(clipboard): try cygutils, clip on Windows #30215wzy2024-09-02
| |
* | vim-patch:3c07eb0: runtime(vim): Update syntax, improve user-command ↵zeertzjq2024-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | matching (#30231) - Match -addr and -keepscript attributes and generate -addr values. - Match attribute errors where = is specified. - Highlight attributes with Special like other Ex command options. - Don't highlight user-specified completion function args. - Match :delcommand -buffer attribute. closes: vim/vim#15586 https://github.com/vim/vim/commit/3c07eb0c6730c258c6955ce8458cf911245c1617 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* | vim-patch:bd69b39: runtime(sudoers): improve recognized Runas_Spec and ↵Christian Clason2024-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag_Spec items Recognize colon-delimited second part of Runas_Spec that specifies permitted groups, e.g.: alan ALL = (root, bin : operator, system) ALL This implementation is sloppy because it accepts any amount of colons delimiting further Runas_Lists, but for now that's better than bailing out completely as soon as a colon is encountered (esp. given that the default sudoers uses these colons, breaking highlighting OOTB). Also, while at it, make Vim recognize all Tag_Spec items, not just {,NO}PASSWD closes: vim/vim#15607 https://github.com/vim/vim/commit/bd69b39514f1fec45a5ac76cd36db5dec2faebe2 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | docs: vim.lsp.rpc.connect() TCP requires IP address #30219Tristan Knight2024-09-01
| | | | | | | | | | | | "localhost" would work if we used [tcp_connect](https://github.com/luvit/luv/blob/ae0387742b460bc89ebddce33214ad65fffddba2/examples/echo-server-client.lua#L42), but that will require changes to [vim.lsp.rpc.connect](https://github.com/neovim/neovim/blob/318c0415d5b10b44fee4afa06994734f1beb7e71/runtime/lua/vim/lsp/rpc.lua#L638).
* | docs: misc #28970Justin M. Keyes2024-09-01
| |
* | feat(treesitter)!: default to correct behavior for quantified captures (#30193)Gregory Anders2024-09-01
| | | | | | | | | | | | | | | | | | | | | | | | For context, see https://github.com/neovim/neovim/pull/24738. Before that PR, Nvim did not correctly handle captures with quantifiers. That PR made the correct behavior opt-in to minimize breaking changes, with the intention that the correct behavior would eventually become the default. Users can still opt-in to the old (incorrect) behavior for now, but this option will eventually be removed completely. BREAKING CHANGE: Any plugin which uses `Query:iter_matches()` must update their call sites to expect an array of nodes in the `match` table, rather than a single node.
* | fix(ui): correctly pass metadata to get_node_text #30222Gregory Anders2024-09-01
|/ | | Fixes: #30220