aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* 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>
* vim-patch:1da0e8581671Christian Clason2024-02-15
| | | | | | | | | | runtime(asciidoc): include basic ftplugin closes: vim/vim#13873 https://github.com/vim/vim/commit/1da0e85816718a1d45ca60b3581c62df4e352c91 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
* vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'zeertzjq2024-02-15
| | | | | | | | | | | | | | | Problem: Visual highlight hard to read with 'termguicolors' (Maxim Kim) Solution: Set Visual GUI foreground to black (with background=light) and lightgrey (with background=dark) (Maxim Kim) fixes: vim/vim#14024 closes: vim/vim#14025 https://github.com/vim/vim/commit/34e4a05d02a016fe230495be8f6c60ddd56f9567 Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:9.1.0068: Visual highlighting can still be improvedzeertzjq2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Visual highlighting can still be improved Solution: Update Visual highlighting for 8 color terminals, use uniform grey highlighting for dark and light bg (Maxim Kim) Update terminal Visual 1. Use `ctermbg=Grey ctermfg=Black` for both dark and light This uniforms Visual highlighting between default dark and light colors And should work for vim usually detecting light background for terminals with black/dark background colors. Previously used `ctermfg=White` leaks `cterm=bold` if available colors are less than 16. 2. Use `term=reverse cterm=reverse ctermbg=NONE ctermfg=NONE` for terminals reporting less than 8 colors available If the terminal has less than 8 colors, grey just doesn't work right closes: vim/vim#13940 https://github.com/vim/vim/commit/59bafc8171b08cf326ed40ccb4ee917f9643290e Co-authored-by: Maxim Kim <habamax@gmail.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
|
* refactor(lua): use Arena when converting from lua stack to API argsbfredl2024-02-13
| | | | | | | | | | | | and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
* 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
* vim-patch:b614b284ee06 (#27433)zeertzjq2024-02-12
| | | | | | | | | | | | runtime(vim): Update syntax file (vim/vim#14009) - allow comments after :highight commands - match the bang in a :highlight[!] command - highlight the bang in :map[!], :menu[!] and :unlet[!] with vimOper like all other commands https://github.com/vim/vim/commit/b614b284ee06523511308f8381b47db34d921d39 Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:6d91227267a5Christian Clason2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(gpg): Mark dangerous use-embedded-filename with WarningMsg The syntax highlighter is likely to encourage people to use the listed commands. But `use-embedded-filename` is a dangerous option that can cause GnuPG to write arbitrary data to arbitrary files whenever GnuPG encounters malicious data. GnuPG upstream explicitly warns against using this option: https://dev.gnupg.org/T4500 https://dev.gnupg.org/T6972 However, since this is a valid option, we cannot just drop it from the syntax script. Instead, let's mark it with the WarningMsg highlighting to make it obvious, that this option is different (and should not be used for security reasons). closes: vim/vim#13961 https://github.com/vim/vim/commit/6d91227267a5f7e21fc9b30443687618e92751bf Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* 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
* Merge pull request #27420 from MariaSolOs/warning-anxietyLewis Russell2024-02-11
|\ | | | | refactor(lsp): fix type annotations and add shared diagnostic helper
| * refactor(lsp): add vim.lsp.sync.Range typeMaria José Solano2024-02-10
| |
| * refactor(lsp): add shared diagnostic handlerMaria José Solano2024-02-10
| |
| * refactor(lsp): add type annotationsMaria José Solano2024-02-10
| |
* | feat(shortmess): "q" flag fully hides recording message (#27415)Trevor Arjeski2024-02-11
| | | | | | | | | | | | | | When "q" is set in 'shortmess' it now fully hides the "recording @a" message when you are recording a macro instead of just shortening to "recording". This removes duplication when using reg_recording() in the statusline. Related #19193
* | Merge pull request #27253 from MariaSolOs/codelens-refreshbfredl2024-02-10
|\ \ | | | | | | feat(lsp): add opts to vim.lsp.codelens.refresh
| * | feat(lsp): add opts paramater to vim.lsp.codelens.refreshMaria José Solano2024-02-08
| | |
* | | build(deps): bump tree-sitter-bash to v0.20.5Christian Clason2024-02-10
| |/ |/|
* | fix(startup): multiprocess startuptime #26790Pablo Arias2024-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Since 24488169564c39a506c235bf6a33b8e23a8cb528, the --startuptime report shows two blocks of data. The TUI process and its embedded nvim process write to the file concurrently, which may interleave the two startup sequences into the same timeline. Solution: Report each process as a separate section in the same file. 1. Each process buffers the full report. 2. After startup is finished, the buffer is flushed (appended) to the file. Fix #23036 Sample report: --- Startup times for process: Primary/TUI --- times in msec clock self+sourced self: sourced script clock elapsed: other lines 000.006 000.006: --- NVIM STARTING --- 000.428 000.422: event init 000.728 000.301: early init ... 005.880 000.713: init highlight 005.882 000.002: --- NVIM STARTED --- --- Startup times for process: Embedded --- times in msec clock self+sourced self: sourced script clock elapsed: other lines 000.006 000.006: --- NVIM STARTING --- 000.409 000.403: event init 000.557 000.148: early init 000.633 000.077: locale set ... 014.383 000.430: first screen update 014.387 000.003: --- NVIM STARTED ---
* | refactor: rename FloatConfig to WinConfig #27397Will Hopkins2024-02-09
|/ | | | | `FloatConfig` is no longer used only for floats, so the name is counterintuitive. Followup to #25550
* feat(tutor): add Japanese tutor #27268ite-usagi2024-02-08
| | | Add Japanese Tutor
* fix(lsp): rename fails on missing parent directory #27291Tomasz N2024-02-08
| | | | | | | | Problem: If a rename results in a path that has missing parent directory(s), it will fail. Solution: Do a recursive mkdir before attempting the rename.
* feat(lsp): deprecate severity_limitLewis Russell2024-02-08
| | | | | | | | | | | Problem: `vim.lsp.diagnostic.on_diagnostic` accepts an undocumented severity_limit option which is widely used. Solution: Deprecate it in favour of `{min = severity}` used in `vim.diagnostic`. Since this is undocumented, the schedule for removal is accelerated to 0.11.
* refactor(treesitter): {start,stop} are optional in Query:iter_* methodsJongwook Choi2024-02-08
| | | | | | | | Document that the `start` and `stop` parameters in `Query:iter_captures()` and `Query:iter_matches()` are optional. The tree-sitter lib has been bumped up to 0.20.9, so we also no longer need "Requires treesitter >= 0.20.9".
* refactor(treesitter): typing for Query, TSQuery, and TSQueryInfoJongwook Choi2024-02-08
| | | | | | | | | | | | | | | | | | | | - `TSQuery`: userdata object for parsed query. - `vim.treesitter.Query`: renamed from `Query`. - Add a new field `lang`. - `TSQueryInfo`: - Move to `vim/treesitter/_meta.lua`, because C code owns it. - Correct typing for `patterns`, should be a map from `integer` (pattern_id) to `(integer|string)[][]` (list of predicates or directives). - `vim.treesitter.QueryInfo` is added. - This currently has the same structure as `TSQueryInfo` (exported from C code). - Document the fields (see `TSQuery:inspect`). - Add typing for `vim._ts_parse_query()`.
* refactor(lsp): tidy up loggingLewis Russell2024-02-08
|
* vim-patch:b8170143c8f8 (#27387)zeertzjq2024-02-08
| | | | | | | runtime(doc): further improve docs about List/Blob += operator closes: vim/vim#13990 https://github.com/vim/vim/commit/b8170143c8f8a115b5be59a94d10f931d3cd567c
* feat(api): pass 0 to nvim_get_chan_info for current channel (#27321)nikolightsaber2024-02-08
| | | | | | | | | | | Getting current channel info was kind of annoying via RPC. Two functions had to be called: 1. `nvim_get_api_info` which returns `[channel_id, meta_data]`. - This results in `channel_id = api.nvim_get_api_info()[0]`. - Here the meta_data is sent but never used. 2. Finally call `nvim_get_chan_info(channel_id)`. This commit reduces the need for `nvim_get_api_info` as passing 0 returns current channel info.
* vim-patch:c9c2e2d2ff44zeertzjq2024-02-08
| | | | | | | | | | | | | | | | runtime(doc): Clarify list-concatenation a bit more Make doc list-concatenation more clear as for += and extend(). 1. describe `+=` for list-concatenation more accurately 2. add `extend()` example for list-concatenation 3. Fix CI errors for missing helptags reference |+=| closes: vim/vim#13983 https://github.com/vim/vim/commit/c9c2e2d2ff4429a6b5876ee919f15c1dc0018e86 Co-authored-by: qeatzy <qeatzy@users.noreply.github.com>
* vim-patch:partial:9.1.0080: unexpected error for modifying final list using +=zeertzjq2024-02-08
| | | | | | | | | | | | | | | | | | Problem: unexpected error for modifying final list using += operator (Ernie Rael) Solution: Allow List value modification of a final variable using += operator (Yegappan Lakshmanan) fixes: vim/vim#13745 fixes: vim/vim#13959 closes: vim/vim#13962 https://github.com/vim/vim/commit/1af35631f85d2fcdc83c5d457af8273697f5146a Only port eval.txt changes. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(runtime): source c ftplugins in correct order (#27377)Maximilian Fricke2024-02-08
|
* fix(lsp): set fallback client name properlyzeertzjq2024-02-08
|
* refactor(lsp): move client code to a regular Lua classLewis Russell2024-02-07
| | | | | | | | | | Problem: The LSP client code is implemented as a complicated closure-class (class defined in a single function). Solution: Move LSP client code to a more conventional Lua class and move to a separate file.
* feat(treesitter): show root nodes in :InspectTree (#26944)altermo2024-02-06
| | | | Co-authored-by: altermo <> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
* fix(doc): prevent doxygen confusionLewis Russell2024-02-06
|
* fix(lsp): send back diagnostic tags to the serverLewis Russell2024-02-06
| | | | Fixes: #27318
* docs: small fixes (#27213)dundargoc2024-02-06
| | | Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
* vim-patch:f7f33e3719c8Christian Clason2024-02-06
| | | | | | | | | | | | | | | | | | | | | | runtime(dosbatch): improve '::' comment highlighting Added a syntax region for command blocks so that the highlighting of `::` comments in them can be controlled. The `dosbatch_colons_comment` variable now controls if all `::` comments in a code block are highlighted as comments or errors. A `::` comment at the end of a command block is always highlighted as an error. This re-enables the highlighting of `::` comments in `.bat` files as requested in vim/vim#13666, while allowing control of highlighting them in command blocks requested in vim/vim#11778 and first attempted in vim/vim#11980. related: vim/vim#11980 fixes: vim/vim#13666 https://github.com/vim/vim/commit/f7f33e3719c87279dfad109b874e2817007a1184 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Mike Williams <mikew@globalgraphics.com>