aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* feat(lua): add `vim.loader`Folke Lemaitre2023-03-26
| | | feat: new faster lua loader using byte-compilation
* test: fix flaky watchfiles tests (#22637)Jon Huhn2023-03-26
|
* test: use exec_capture() in more places (#22787)zeertzjq2023-03-26
| | | | | | | Problem: Using `meths.exec2("code", { output = true })` is too verbose. Solution: Use exec_capture() in more places.
* vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)zeertzjq2023-03-26
| | | | | | | | | Problem: Cursor in wrong position when leaving insert mode. Solution: Update the w_valid flags. Position the cursor also when not redrawing. (closes vim/vim#12137) https://github.com/vim/vim/commit/c174c2e58c9e24a75b189e01143e6d057b84e96e Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix: snprintf buffer overflow detected by -D_FORTIFY_SOURCE=3 (#22780)Andreas Schneider2023-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong buffer size argument passed to snprintf() in set_cmdarg(): Thread no. 1 (24 frames) #8 snprintf at /usr/include/bits/stdio2.h:54 #9 set_cmdarg at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/eval.c:7044 #10 apply_autocmds_group at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/autocmd.c:1843 #11 apply_autocmds_exarg at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/autocmd.c:1549 #12 readfile at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:617 #13 buf_reload at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:5038 #14 buf_check_timestamp at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:4952 #15 check_timestamps at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:4678 #16 ex_checktime at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_cmds2.c:765 #17 execute_cmd0 at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:1620 #18 do_one_cmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:2275 #19 do_cmdline at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:584 #20 ex_execute at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/eval.c:7727 #21 execute_cmd0 at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:1620 #22 do_one_cmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:2275 #23 do_cmdline at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:584 #24 do_ucmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/usercmd.c:1661 #25 execute_cmd0 at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:1612 #26 do_one_cmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:2275 #27 do_cmdline at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:584 #28 nv_colon at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/normal.c:4058 #29 normal_execute at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/normal.c:1172 #30 state_enter at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/state.c:88 #31 normal_enter at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/normal.c:471 Solution: Subtract the offset from the buffer size. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* Merge pull request #22762 from bfredl/hl2ctermbfredl2023-03-25
|\ | | | | fix(api): make nvim_get_hl return 'cterm' attrs properly
| * fix(api): make nvim_get_hl return 'cterm' attrs properlybfredl2023-03-23
| |
* | feat(api): nvim_exec2(), deprecate nvim_exec() #19032Evgeni Chasnovski2023-03-25
| | | | | | | | | | | | | | Problem: The signature of nvim_exec() is not extensible per ":help api-contract". Solution: Introduce nvim_exec2() and deprecate nvim_exec().
* | feat(lsp): render markdown in docs hover #22766Roberto Pommella Alegro2023-03-25
| | | | | | | | | | | | | | | | | | | | | | Problem: LSP docs hover (textDocument/hover) doesn't handle HTML escape seqs in markdown. Solution: Convert common HTML escape seqs to a nicer form, to display in the float. closees #22757 Signed-off-by: Kasama <robertoaall@gmail.com>
* | docs(test): using cmake directly (without make) #22781dundargoc2023-03-25
| |
* | docs: how to debug TUI using gdb/lldb #22771Ryan Jenkins2023-03-25
| | | | | | docs: Add info to the `Debug: TUI` docs about gdb/lldb usage
* | fix(lsp): add missing silent check in lsp hover handler (#22763)Micah Halter2023-03-25
| | | | | | Fixup to #21531.
* | docs: more details about vim.region (#21116)Jakub Łuczyński2023-03-25
| |
* | refactor(PVS/V1048): remove duplicated assignments (#21873)Lucas Merritt2023-03-25
| |
* | vim-patch:9.0.1426: indent wrong after "export namespace" in C++ (#22777)zeertzjq2023-03-25
| | | | | | | | | | | | | | | | | | Problem: Indent wrong after "export namespace" in C++. Solution: Skip over "inline" and "export" in any order. (Virginia Senioria, closes vim/vim#12134, closes vim/vim#12133) https://github.com/vim/vim/commit/99e4ab2a1e577ddb29030c09c308b67e16fd51c4 Co-authored-by: Virginia Senioria <91khr@users.noreply.github.com>
* | fix(treesitter): add missing deprecateLewis Russell2023-03-24
| |
* | feat(treesitter)!: deprecate top level indexes to modules (#22761)Lewis Russell2023-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following top level Treesitter functions have been moved: - vim.treesitter.inspect_language() -> vim.treesitter.language.inspect() - vim.treesitter.get_query_files() -> vim.treesitter.query.get_files() - vim.treesitter.set_query() -> vim.treesitter.query.set() - vim.treesitter.query.set_query() -> vim.treesitter.query.set() - vim.treesitter.get_query() -> vim.treesitter.query.get() - vim.treesitter.query.get_query() -> vim.treesitter.query.get() - vim.treesitter.parse_query() -> vim.treesitter.query.parse() - vim.treesitter.query.parse_query() -> vim.treesitter.query.parse() - vim.treesitter.add_predicate() -> vim.treesitter.query.add_predicate() - vim.treesitter.add_directive() -> vim.treesitter.query.add_directive() - vim.treesitter.list_predicates() -> vim.treesitter.query.list_predicates() - vim.treesitter.list_directives() -> vim.treesitter.query.list_directives() - vim.treesitter.query.get_range() -> vim.treesitter.get_range() - vim.treesitter.query.get_node_text() -> vim.treesitter.get_node_text()
* | vim-patch:9.0.1425: "wat" and "wast" files are one filetype (#22774)Christian Clason2023-03-24
| | | | | | | | | | | | | | | | | | Problem: "wat" and "wast" files are one filetype. Solution: Add a separate filetype for "wat" files. (Amaan Qureshi, closes vim/vim#12165) https://github.com/vim/vim/commit/3ea62381c527395ae701715335776f427d22eb7b Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* | build: set CMAKE_C_STANDARD to 99 for all dependenciesdundargoc2023-03-24
| | | | | | | | | | | | | | Older gcc versions (4.x) require passing --std=c99 compiler flag to prevent warnings from being emitted. Instead of setting it for each dependency, it's easier to just pass the CMAKE_C_STANDARD flag to all dependencies. This also prevents the scenario of us forgetting to set it if we add new dependencies.
* | ci: use "ci" as the commit type for dependabot updatesdundargoc2023-03-24
| |
* | build(deps): bump actions/stale from 7 to 8dependabot[bot]2023-03-23
| | | | | | | | | | | | Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v7...v8)
* | ci(labeler): don't automatically add "lua" label (#22765)zeertzjq2023-03-23
| | | | | | | | | | The labeler adds "lua" label to too many files. When there is already a "treesitter" or "lsp" label, a "lua" label isn't useful. Instead it's better to add the label manually to PRs for general Lua support.
* | build(win): export extern symbols for use in FFI #22756luukvbaal2023-03-23
| | | | | | | | | | Makes `extern` variables accessible through ffi on Windows. Follow-up to https://github.com/neovim/neovim/pull/15999
* | fix(treesitter): annotationsLewis Russell2023-03-23
|/ | | | | | - Begin using `@package` in place of `@private` for functions that are accessed internally but outside their defined class. - Rename Node -> TSP.Node
* feat(api): add nvim_get_hl (#22693)Null Chilly2023-03-23
| | | | | Problem: no way of getting all highlight group definitions in a namespace. Solution: add `nvim_get_hl()`, deprecate `nvim_get_hl_by_name()` and `nvim_get_hl_by_id()`.
* fix(lsp): Jump to tag locations reliably when :ltag is used (#22750)meredith2023-03-23
|
* Merge #22736 from justinmk/gsplitJustin M. Keyes2023-03-22
|\ | | | | feat(vim.gsplit): gain features of vim.split
| * refactor(vim.gsplit): remove "keepsep"Justin M. Keyes2023-03-22
| | | | | | | | string.gmatch() is superior, use that instead.
| * fix(vim.version): prerelease compareJustin M. Keyes2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: semver specifies that digit sequences in a prerelease string should be compared as numbers, not lexically: https://semver.org/#spec-item-11 > Precedence for two pre-release versions with the same major, minor, > and patch version MUST be determined by comparing each dot separated > identifier from left to right until a difference is found as follows: > 1. Identifiers consisting of only digits are compared numerically. > 2. Identifiers with letters or hyphens are compared lexically in ASCII sort order. > 3. Numeric identifiers always have lower precedence than non-numeric identifiers. > 4. A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0. Solution: cmp_prerel() treats all digit sequences in a prerelease string as numbers. This doesn't _exactly_ match the spec, which specifies that only dot-delimited digit sequences should be treated as numbers...
| * feat(vim.gsplit): gain features of vim.splitJustin M. Keyes2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - vim.split has more features than vim.gsplit. - Cannot inspect the "separator" segments of vim.split or vim.gsplit. Solution: - Move common implementation from vim.split into vim.gsplit. - TODO: deprecate vim.split in favor of vim.totable(vim.gsplit())? - Introduce `keepsep` parameter. Related: 84f66909e4008a57da947f1640bfc24da5e41a72
* | fix(api): vim.filetype.get_option() (#22753)Lewis Russell2023-03-22
|/ | | | - Fix a bug in the cache - Set some buffer options on the dummy buffer
* refactor: do more in TRY_WRAPLewis Russell2023-03-22
|
* Merge pull request #22743 from bfredl/luaequalsbfredl2023-03-22
|\ | | | | feat(lua): allow `:=expr` as a shorter version of `:lua =expr`
| * feat(lua): allow `:=expr` as a shorter version of `:lua =expr`bfredl2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing behavior of := and :[range]= are unchanged. `|` is still allowed with this usage. However, :=p and similar are changed in a way which could be construed as a breaking change. Allowing |ex-flags| for := in the first place was a mistake as any form of := DOES NOT MOVE THE CURSOR. So it would print one line number and then print a completely different line contents after that.
* | vim-patch:9.0.{1419,1421,1422,1423}: some files are not recognized (#22749)Amaan Qureshi2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:9.0.1419: Lean files are not recognized Problem: Lean files are not recognized. Solution: Add a pattern for Lean files. (Amaan Qureshi, closes vim/vim#12177) https://github.com/vim/vim/commit/4a5c39fc52a73d46ac77cf574f765a465befc3c0 vim-patch:9.0.1421: Nu files are not recognized Problem: Nu files are not recognized. Solution: Add a pattern for Nu files. (Amaan Qureshi, closes vim/vim#12172) https://github.com/vim/vim/commit/8aa2a37f8983a7863afa32d9ffbe64b2f2bc70be vim-patch:9.0.1422: Sage files are not recognized Problem: Sage files are not recognized. Solution: Add a pattern for Sage files. (Amaan Qureshi, closes vim/vim#12176) https://github.com/vim/vim/commit/d0639d717ba7cf8b04b588aadd0b379ed43a5f1f vim-patch:9.0.1423: WebAssembly Interface Type files are not recognized Problem: WebAssembly Interface Type files are not recognized. Solution: Add a pattern for WIT files. (Amaan Qureshi, closes vim/vim#12173) https://github.com/vim/vim/commit/890c77203637626b1005db818667084d11e653e7
* | ci(lintcommit): allow colon in commit message scopeAnkit Goel2023-03-22
| | | | | | Close #21464
* | docs: fix g:terminal_color_x terminal colors #22746Evgeni Chasnovski2023-03-21
| | | | | | | | | | Based on this source code: https://github.com/neovim/neovim/blob/e789d652974226ce3a763e3052a7c3d9898d875e/src/nvim/terminal.c#L271 it only respects `vim.g.terminal_color_{i}` for i from 0 to 15 inclusive.
* | Merge pull request #22742 from clason/vim-9.0.1415Christian Clason2023-03-20
|\ \ | |/ |/| vim-patch:9.0.{1415,1417}: more files are not recognized
| * vim-patch:9.0.1417: ESDL files are not recognizedChristian Clason2023-03-20
| | | | | | | | | | | | | | | | | | Problem: ESDL files are not recognized. Solution: Add a pattern for ESDL files. (Amaan Qureshi, closes vim/vim#12174) https://github.com/vim/vim/commit/a1fa8b3ac2f7b54c7901ad3eb0ba8b8290912509 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
| * vim-patch:9.0.1415: Crystal files are not recognizedChristian Clason2023-03-20
|/ | | | | | | | | Problem: Crystal files are not recognized. Solution: Add a pattern for Crystal files. (Amaan Qureshi, closes vim/vim#12175) https://github.com/vim/vim/commit/7c4516fe93d865f4ef1877181f8156b8b9331856 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* feat(lua): use vim.empty_dict() for empty return value in new api functions ↵bfredl2023-03-20
| | | | (#22737)
* Merge #22707 vim.version: range(), lazy.nvim implJustin M. Keyes2023-03-20
|\
| * feat(vim.version): more coercion with strict=falseJustin M. Keyes2023-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "tmux 3.2a" (output from "tmux -V") is not parsed easily. Solution: With `strict=false`, discard everything before the first digit. - rename Semver => Version - rename vim.version.version() => vim.version._version() - rename matches() => has() - remove `opts` from cmp()
| * refactor(vim.version): use lazy.nvim semver moduleJustin M. Keyes2023-03-20
| | | | | | | | | | Now the Nvim version string "v0.9.0-dev-1233+g210120dde81e" parses correctly.
| * refactor(vim.version): use lazy.nvim semver moduleJustin M. Keyes2023-03-20
|/ | | | | | | Use semver code from https://github.com/folke/lazy.nvim License: Apache License 2.0 Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
* Merge pull request #22634 from lewis6991/feat/tscommentLewis Russell2023-03-20
|\ | | | | feat: add vim.filetype.get_option()
| * feat: add `vim.filetype.get_option()`Lewis Russell2023-03-20
| |
| * feat(api): add filetype option nvim_get_option_valueLewis Russell2023-03-20
|/ | | | | - Also adjust the expr-mapping behaviour so normal commands and text changes are allowed in internal dummy buffers.
* fix: invalid buffer size argument to snprintf #22729koeleck2023-03-19
| | | | | | | | | | | | | | | | | | | Problem: Crash in findtags_add_match with FORTIFY_SOURCE=3. Note: Fedora 38 packages are now built with -D_FORTIFY_SOURCE=3 by default. 1. Compile with overflow protection. 2. nvim --clean 3. :h <Space> <Tab> 4. `*** overflow detected ***: terminated` The additional checks for the stated buffer size and the actual bounds of the buffer do not match. See `___snprintf_chk` in the glibc sources: https://sourceware.org/git/?p=glibc.git;a=blob;f=debug/snprintf_chk.c;h=59577de076c570b81307dd31c8c73e265808cf4c;hb=HEAD#l28 Solution: Fix arithmetic error: The length of the previously written data is now subtracted from the total size of the buffer, instead of added on top. close #22718
* fix(shell): on Windows :make does not echo #22728Enan Ajmain2023-03-19
| | | | | | | | | | | | | | Problem: On Windows, :make does not display the output of the program it runs. The cause is the default 'shellpipe'. On Linux, nvim uses `tee` to redirect the output to both stdout and the error file. In Windows, for both cmd.exe and powershell, the output is only redirected to the error file. Solution: - On Windows, change the 'shellpipe' default to "2>&1| tee". - Nvim includes `tee` in its Windows package. - Document recommended defaults for powershell. Fixes #12910