aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* fix(ui): no fast context for prompt message kinds #31224luukvbaal2024-11-15
| | | | | | | Problem: No longer able to show prompt messages with vim.ui_attach(). Solution: Do not execute callback in fast context for prompt message kinds. These events must be safe to show the incoming message so the event itself serves to indicate that the message should be shown immediately.
* feat(default): bind `vim.lsp.buf.signature_help` in select mode (#31223)Yi Ming2024-11-15
|
* fix(treesitter): keep treeview open if source window is still open #31198Hyker2024-11-14
| | | | | | | | | | | | Problem: When there is a tree view opened by :InspectTree and the source buffer is open in multiple windows, closing one of the source windows will lead to the tree view being closed as well. Regression by #31181. Solution: Check how many source windows are open when trying to quit one. If there are more than one, keep the tree view(s) open. If the only source window is closed, also close the tree view(s). fix #31196
* vim-patch:9.1.0864: message history is fixed to 200 (#31215)zeertzjq2024-11-15
| | | | | | | | | | | | Problem: message history is fixed to 200 Solution: Add the 'msghistory' option, increase the default value to 500 (Shougo Matsushita) closes: vim/vim#16048 https://github.com/vim/vim/commit/4bd9b2b2467e696061104a029000e9824c6c609e Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Milly <milly.ca@gmail.com>
* Merge pull request #27874 from luukvbaal/funcerrbfredl2024-11-14
|\ | | | | fix(messages)!: vim.ui_attach message callbacks are unsafe
| * fix(messages)!: vim.ui_attach message callbacks are unsafeLuuk van Baal2024-11-14
| | | | | | | | | | | | | | | | Problem: Lua callbacks for "msg_show" events with vim.ui_attach() are executed when it is not safe. Solution: Disallow non-fast API calls for "msg_show" event callbacks. Automatically detach callback after excessive errors. Make sure fast APIs do not modify Nvim state.
* | feat(lsp): support utf-8 and utf-32 position encodingsLewis Russell2024-11-14
|/ | | | Resolves #30034
* fix(lsp): filter completion candidates based on completeopt (#30945)Kristijan Husak2024-11-13
|
* fix(treesitter): add 'QuitPre' event to autocommands in inspect_treehykerr2024-11-12
| | | | | | | | | Problem: Quitting source buffer for ```:InspectTree``` command raises ```E855``` when source buffer and tree views are the only open buffers. Solution: Add ```QuitPre``` event to autocmd handling closing/hiding the source buffer to close all open tree views. This allows nvim to quit when source and tree buffers are the only open windows.
* refactor(lsp): avoid redundant function wrappingNicolas Hillegeer2024-11-12
| | | | Leftover from #21026.
* vim-patch:9.1.0853: filetype: kubernetes config file not recognizedChristian Clason2024-11-12
| | | | | | | | | | | | Problem: filetype: kubernetes config file not recognized Solution: detect '/.kube/config' file as yaml filetype (Jonathan Lopez) closes: vim/vim#11076 https://github.com/vim/vim/commit/6fbf63de865001dedafc227465e651926cf6f6dc Co-authored-by: Jonathan Lopez <jonathanglopez@gmail.com>
* perf(lsp): use faster version of str_byteindexLewis Russell2024-11-11
|
* perf(filetype): optimize internal data structuresLewis Russell2024-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the type for the sorted pattern table from `vim.filetype.mapping[]` to `vim.filetype.mapping.sorted[]` E.g. instead of: ```lua { { ['/debian/changelog$'] = {'debchangelog', { parent = '/debian/' } }, { ['%.git/'] = { detect.git , { parent = 'git/', priority = -1 } }, } ``` It is now: ```lua { { '/debian/, '/debian/changelog$', 'debchangelog' }, { 'git/' , '%.git/' , detect.git , -1 }, } ``` Overall this should roughly cut the amount of tables used by 3, and replaces lots of hash indexes with array indexes.
* refactor(lsp): simplify reference range logicRiley Bruins2024-11-10
|
* fix(lsp): fix infinite loopLewis Russell2024-11-09
| | | | Fixes #31129
* docs: misc (#30914)dundargoc2024-11-09
| | | | | | | Co-authored-by: Ernie Rael <errael@raelity.com> Co-authored-by: Famiu Haque <famiuhaque@proton.me> Co-authored-by: Jade <spacey-sooty@proton.me> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(vim.system): resolve executable paths on windowsLewis Russell2024-11-08
| | | | Fixes #31107
* perf(lsp): do not apply semantic tokens to folded linesLewis Russell2024-11-08
| | | | Fixes #31106
* vim-patch:9.1.0839: filetype: leo files are not recognizedChristian Clason2024-11-05
| | | | | | | | | | | | | | | Problem: filetype: leo files are not recognized Solution: detect '*.leo' files as leo filetype, include a filetype plugin (Riley Bruins) References: https://github.com/ProvableHQ/leo closes: vim/vim#15988 https://github.com/vim/vim/commit/93f65a4ab8168c766e4d3794607762b52762ef82 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* vim-patch:9.1.0840: filetype: idris2 files are not recognizedChristian Clason2024-11-05
| | | | | | | | | | | | Problem: filetype: idris2 files are not recognized Solution: detect '*.idr' files as idris2, '*.lidr' files as lidris2 and '*.ipkg' files as ipkg filetype (Serhii Khoma) closes: vim/vim#15987 https://github.com/vim/vim/commit/c04bc64ba61f2386fafb086b47f16f122a0c779a Co-authored-by: Serhii Khoma <srghma@gmail.com>
* feat(defaults): unimpaired empty line below/above cursor #30984Yochem van Rosmalen2024-11-04
|
* feat(options)!: disallow setting hidden options #28400Famiu Haque2024-11-04
| | | | | | | | | | | | | | | | | Problem: There are three different ways of marking an option as hidden, `enable_if = false`, `hidden = true` and `immutable = true`. These also have different behaviors. Options hidden with `enable_if = false` can't have their value fetched using Vim script or the API, but options hidden with `hidden = true` or `immutable = true` can. On the other hand, options with `hidden = true` do not error when trying to set their value, but options with `immutable = true` do. Solution: Remove `enable_if = false`, remove the `hidden` property for options, and use `immutable = true` to mark an option as hidden instead. Also make hidden option variable pointers always point to the default value, which allows fetching the value of every hidden option using Vim script and the API. This does also mean that trying to set a hidden option will now give an error instead of just being ignored.
* feat(lsp): multi-client support for signature_helpLewis Russell2024-11-04
| | | | | Signatures can be cycled using `<C-s>` when the user enters the floating window.
* fix(treesitter): close InspectTree/EditQuery window on BufUnload (#31036)zeertzjq2024-11-03
| | | | | | Problem: The window opened :InspectTree or :EditQuery isn't closed when the source buffer is unloaded, even though it is closed when the buffer is hidden. Solution: Also close the window on BufUnload.
* vim-patch:9.1.0831: 'findexpr' can't be used as lambad or Funcref (#31058)zeertzjq2024-11-03
| | | | | | | | | | | | | Problem: 'findexpr' can't be used for lambads (Justin Keyes) Solution: Replace the findexpr option with the findfunc option (Yegappan Lakshmanan) related: vim/vim#15905 closes: vim/vim#15976 https://github.com/vim/vim/commit/a13f3a4f5de9c150f70298850e34747838904995 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(health): better layout of vim.treesitter health checkChristian Clason2024-11-02
| | | | | | | | Problem: Long lists of available parsers make it hard to see WASM status. Solution: Add separate headings for "treesitter features" (ABI, WASM) and "treesitter parsers". Also add minimum supported ABI version.
* vim-patch:9.1.0826: filetype: sway files are not recognizedChristian Clason2024-11-02
| | | | | | | | | | | | | | | | | | Problem: filetype: sway files are not recognized Solution: detect '*.sw' files as sway filetype, include a filetype plugin (Riley Bruins) References: https://github.com/FuelLabs/sway. Comments taken from their syntax documentation. File extension taken from the same documentation/GitHub's own recognition of these file types closes: vim/vim#15973 https://github.com/vim/vim/commit/84b5b1c660beb2f9e27de70687e41d39a023ae81 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* fix(lua): show stacktrace for error in vim.on_key() callback (#31021)zeertzjq2024-11-02
|
* vim-patch:b5e7da1: runtime(doc): mention 'iskeyword' at :h charclass() (#31026)zeertzjq2024-11-01
| | | | | | | fixes: vim/vim#15965 https://github.com/vim/vim/commit/b5e7da1f27241f7d770d342009e2fb443e45e6ce Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(lsp)!: remove client-server handlers from vim.lsp.handlersLewis Russell2024-11-01
| | | | | | | | | | - Partition the handlers in vim.lsp.handlers as: - client to server response handlers (RCS) - server to client request handlers (RSC) - server to client notification handlers (NSC) Note use string indexes instead of protocol.methods for improved typing in LuaLS (tip: use hover on RCS, RSC or NSC).
* fix(lsp): hover border type can be string (#31013)nikolightsaber2024-11-01
| | | | | Border type can also be a string as defined in `api-win_config` Co-authored-by: Nikolai Devolder <nikolai.devolder@yamabiko.eu>
* feat(lua): allow vim.on_key() callback to consume the key (#30939)errael2024-11-01
|
* refactor(loader): format annotationsLewis Russell2024-10-31
|
* refactor(loader): use the term stat instead of hashLewis Russell2024-10-31
|
* refactor(loader): remove Loader table and use localsLewis Russell2024-10-31
|
* refactor(loader): rename typesLewis Russell2024-10-31
|
* refactor(loader): inline Loader.load into Loader.loadfileLewis Russell2024-10-31
|
* refactor(loader): simplify Loader.loader_libLewis Russell2024-10-31
|
* refactor(loader): simplify Loader.write/readLewis Russell2024-10-31
|
* perf(loader): reduce calls to Loader.cache_fileLewis Russell2024-10-31
|
* refactor(loader): remove unused _topmodsLewis Russell2024-10-31
|
* fix: another round of type annotation fixesLewis Russell2024-10-31
|
* vim-patch:9.1.0823: filetype: Zephyr overlay files not recognizedChristian Clason2024-10-31
| | | | | | | | | | | | | | | | Problem: filetype: Zephyr overlay files not recognized Solution: detect '*.overlay' files as dts filetype, include syntax tests for DTS files (Xudong Zheng) Reference: https://docs.zephyrproject.org/latest/build/dts/howtos.html closes: vim/vim#15963 https://github.com/vim/vim/commit/a68bd6f089239a51ba90026b18109707e601b107 Co-authored-by: Xudong Zheng <7pkvm5aw@slicealias.com>
* fix(lsp): correct hover result handling (#30995)notomo2024-10-30
| | | | | | | Problem: vim.lsp.buf.hover() displays "No information available" when client_id is not 1. Solution: use vim.tbl_isempty(tbl) instead of #tbl==0
* fix(defaults): omit extraneous info from unimpaired mapping errors (#30983)Gregory Anders2024-10-29
|
* docs(options): shell-powershell #30969Kai Moschcau2024-10-29
| | | | | | | `-NonInteractive` at least somewhat hints to pwsh/powershell, that shell sessions created from :! are not interactive, though even that is not foolproof, because powershell is weird. `$PSStyle.OutputRendering='plaintext'` causes pwsh/powershell to omit ANSI escape sequences in its output.
* Merge pull request #30935 from lewis6991/feat/lsp_multi_hoverLewis Russell2024-10-29
|\
| * feat(lsp)!: multiple client support for vim.lsp.buf.hover()Lewis Russell2024-10-29
| | | | | | | | Deprecate `vim.lsp.handlers.hover` and `vim.lsp.handlers['textDocument/hover']`
| * refactor(lsp): buf_request_allLewis Russell2024-10-29
| |
* | vim-patch:9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline ↵zeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | argument Problem: 'findexpr' completion doesn't set v:fname to cmdline argument. Solution: Set v:fname to the cmdline argument as-is (zeertzjq). closes: vim/vim#15934 https://github.com/vim/vim/commit/20e045f78148c0ef0143c33ffe686fee72d29376