aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
| | * | fix(float): missing default highlight for titleglepnir2024-05-25
| | | | | | | | | | | | | | | | | | | | | | | | Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group.
| * | | vim-patch:9.1.0444: Not enough tests for getregion() with multibyte chars ↵zeertzjq2024-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#29000) Problem: Not enough tests for getregion() with multibyte chars. Solution: Add a few more tests (zeertzjq). closes: vim/vim#14844 https://github.com/vim/vim/commit/dff55a335889c746a79974f7c52cdcdebad682c2
| * | | feat(lsp): update LSP healthcheck format (#28980)Gregory Anders2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | This is mostly an aesthetic change, although there are a few new pieces of information included. Originally I wanted to investigate including server capabilities in the healthcheck, but until we have the ability to fold/unfold text in health checks that would be too much information.
| * | | vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() ↵zeertzjq2024-05-25
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#28985) Problem: Can't use a blockwise selection with a width for getregion(). Solution: Add support for blockwise selection with width like the return value of getregtype() or the "regtype" value of TextYankPost (zeertzjq). closes: vim/vim#14842 https://github.com/vim/vim/commit/afc2295c2201ae87bfbb42d5f5315ad0583ccabf
* | | Merge remote-tracking branch 'upstream/master' into mix_20240309Josh Rahm2024-05-24
|\| |
| * | feat(defaults): add LSP default mappings (again) (#28650)Gregory Anders2024-05-24
| | |
| * | fix(fs): make vim.fs.root work for relative paths and unnamed buffers (#28964)Gregory Anders2024-05-24
| | | | | | | | | | | | If a buffer does not have a backing file then fall back to the current working directory.
| * | fix: show swapfile warning as a warning (#28971)Gregory Anders2024-05-24
| | | | | | | | | | | | | | | The new default SwapExists autocommand displays warning text (W325) but does not use the WarningMsg highlight group as other warnings do. Use the WARN log level when displaying this warning.
| * | refactor: replace deprecated vim.loop with vim.uvdundargoc2024-05-24
| | |
| * | feat(complete): specify reason for CompleteDoneFamiu Haque2024-05-24
| | | | | | | | | | | | | | | Problem: `CompleteDone` currently does not specify the reason for why completion was done, which is problematic for completion plugins as they cannot know whether the event was triggered due to the completion being canceled, accepted, or for some other reason. Solution: Add a `reason` key to `v:event`, which is set by `CompleteDone` to indicate why completion ended.
| * | fix: change deprecation presentationdundargoc2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecation with vim.deprecate is currently too noisy. Show the following warning instead: [function] is deprecated. Run ":checkhealth vim.deprecated" for more information. The important part is that the full message needs to be short enough to fit in one line in order to not trigger the "Press ENTER or type command to continue" prompt. The full information and stack trace for the deprecated functions will be shown in the new healthcheck `vim.deprecated`.
| * | feat: allow gx to function for markdown linksdundargoc2024-05-24
| | | | | | | | | | | | | | | | | | | | | In other words, `gx` works regardless of where it was used in `[...](https://...)`. This only works on markdown buffers. Co-authored-by: ribru17 <ribru17@gmail.com>
| * | docs: extract health to its own filedundargoc2024-05-24
| | |
| * | vim-patch:9.1.0441: getregionpos() can't properly indicate positions beyond ↵zeertzjq2024-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eol (#28957) Problem: getregionpos() can't properly indicate positions beyond eol. Solution: Add an "eol" flag that enables handling positions beyond end of line like getpos() does (zeertzjq). Also fix the problem that a position still has the coladd beyond the end of the line when its column has been clamped. In the last test case with TABs at the end of the line the old behavior is obviously wrong. I decided to gate this behind a flag because returning positions that don't correspond to actual characters in the line may lead to mistakes for callers that want to calculate the length of the selected text, so the behavior is only enabled if the caller wants it. closes: vim/vim#14838 https://github.com/vim/vim/commit/2b09de910458247b70751928217422c38fd5abf8
| * | vim-patch:9.1.0435: filetype: cygport files are not recognizedChristian Clason2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: cygport files are not recognized Solution: Recognize '*.cygport' files as sh filetype (Ken Takata) https://cygwin.github.io/cygport/cygport_in.html closes: vim/vim#14833 https://github.com/vim/vim/commit/cd79f8fbd34cdb918153d9fa3821eb4092b7b5fc Co-authored-by: K.Takata <kentkt@csc.jp>
| * | fix(comment): fall back to using trimmed comment markers (#28938)Evgeni Chasnovski2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently comment detection, addition, and removal are done by matching 'commentstring' exactly. This has the downside when users want to add comment markers with space (like with `-- %s` commentstring) but also be able to uncomment lines that do not contain space (like `--aaa`). Solution: Use the following approach: - Line is commented if it matches 'commentstring' with trimmed parts. - Adding comment is 100% relying on 'commentstring' parts (as is now). - Removing comment is first trying exact 'commentstring' parts with fallback on trying its trimmed parts.
| * | fix(lsp): check if buffer was detached in on_init callback (#28914)Ilia Choly2024-05-23
| | | | | | | | | Co-authored-by: Jongwook Choi <wookayin@gmail.com>
| * | refactor(lsp): reuse buf_detach_client logic in on_detach (#28939)Mathias Fußenegger2024-05-23
| | |
| * | fix(lsp): trigger LspDetach on buffer delete (#28795)Andre Toerien2024-05-23
| | | | | | | | | Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
| * | vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924)zeertzjq2024-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregionpos() doesn't handle one char selection. Solution: Handle startspaces differently when is_oneChar is set. Also add a test for an exclusive charwise selection with multibyte chars (zeertzjq) closes: vim/vim#14825 https://github.com/vim/vim/commit/52a6f348874778cf315b47d9e8b5f818f4b97277
| * | fix: merge all provider healthchecks into a single health.luadundargoc2024-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will help manage the overly granular checkhealth completion to go from ``` vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` to ``` vim.health vim.lsp vim.provider vim.treesitter ```
| * | docs: move vim.health documentation to lua.txtdundargoc2024-05-22
| | | | | | | | | | | | | | | | | | `vim.health` is not a "plugin" but part of our Lua API and the documentation should reflect that. This also helps make the documentation maintenance easier as it is now generated.
| * | refactor(lsp): use supports_method where applicableIlia Choly2024-05-22
| | |
| * | fix(lsp): detach all clients on_reload to force buf_state reload (#28875)Ilia Choly2024-05-21
| | | | | | | | | | | | | | | | | | Problem: The changetracking state can de-sync when reloading a buffer with more than one LSP client attached. Solution: Fully detach all clients from the buffer to force buf_state to be re-created.
| * | fix(lsp): semantic token functions allow "0" bufnr #28849Riley Bruins2024-05-21
| | | | | | | | | aligns with ":help dev-patterns"
| * | fix(lsp): hide layout in codelenses in virtual text (#28794) (#28807)Mango The Fourth2024-05-21
| | | | | | | | | | | | | | | | | | | | | Problem: layout i.e. whitespace that is part of codelenses is currently displayed as weird symbols and large amounts of spaces Solution: replace all consecutive whitespace symbols with a single space character when trying to display codelenses as virtual text
| * | fix(lsp): add textDocument/documentLink to capability map (#28838)Ilia Choly2024-05-21
| | |
| * | vim-patch:9.1.0423: getregionpos() wrong with blockwise mode and multibytezeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregionpos() wrong with blockwise mode and multibyte. Solution: Use textcol and textlen instead of start_vcol and end_vcol. Handle coladd properly (zeertzjq). Also remove unnecessary buflist_findnr() in add_regionpos_range(), as getregionpos() has already switched buffer. closes: vim/vim#14805 https://github.com/vim/vim/commit/c95e64f41f7f6d1bdc95b047ae9b369743c8637b
| * | vim-patch:9.1.0394: Cannot get a list of positions describing a regionzeertzjq2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot get a list of positions describing a region (Justin M. Keyes, after v9.1.0120) Solution: Add the getregionpos() function (Shougo Matsushita) fixes: vim/vim#14609 closes: vim/vim#14617 https://github.com/vim/vim/commit/b4757e627e6c83d1c8e5535d4887a82d6a5efdd0 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * | vim-patch:9.1.0425: filetype: purescript files are not recognizedChristian Clason2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: purescript files are not recognized Solution: recognize '*.purs' files as purescript filetype, include basic purescript filetype plugin (Riley Bruins) Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments closes: vim/vim#14813 https://github.com/vim/vim/commit/155583a5c317881e60828e3972383436ac197ee8 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
| * | vim-patch:9.1.0424: filetype: slint files are not recognizedChristian Clason2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: slint files are not recognized Solution: Detect '*.slint' files as slint filetype, include basic sling filetype plugin (Riley Bruins) closes: vim/vim#14808 https://github.com/vim/vim/commit/aa3104b07a3e5e7cc41310f1fbfb00f71ef801a2 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
| * | vim-patch:9.1.0421: filetype: hyprlang files are not recognizedChristian Clason2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: hyprlang files are not recognized Solution: recognize 'hypr{land,paper,idle,lock}.conf' files as 'hyprlang' filetype, add hyprlang ftplugin (Riley Bruins) closes: vim/vim#14803 https://github.com/vim/vim/commit/5f1b115afd92544ce64d563da0d8ee9844abb10a Co-authored-by: Riley Bruins <ribru17@hotmail.com>
| * | fix(diagnostic): show backtrace for deprecation warningsJongwook Choi2024-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: On nvim 11.0-dev, deprecation warnings due to an use of hard-deprecated APIs such as: - `vim.diagnostic.disable()` - `vim.diagnostic.is_disabled()` etc. are not accompanied by backtrace information. It makes difficult for users to figure out which lines or which plugins are still using deprecated APIs. Solution: use `backtrace = true` in vim.deprecate() call.
| * | refactor!: remove `nvim` and `provider` module for checkhealthdundargoc2024-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The namespacing for healthchecks for neovim modules is inconsistent and confusing. The completion for `:checkhealth` with `--clean` gives ``` nvim provider.clipboard provider.node provider.perl provider.python provider.ruby vim.lsp vim.treesitter ``` There are now three top-level module names for nvim: `nvim`, `provider` and `vim` with no signs of stopping. The `nvim` name is especially confusing as it does not contain all neovim checkhealths, which makes it almost a decoy healthcheck. The confusion only worsens if you add plugins to the mix: ``` lazy mason nvim nvim-treesitter provider.clipboard provider.node provider.perl provider.python provider.ruby telescope vim.lsp vim.treesitter ``` Another problem with the current approach is that it's not easy to run nvim-only healthchecks since they don't share the same namespace. The current approach would be to run `:che nvim vim.* provider.*` and would also require the user to know these are the neovim modules. Instead, use this alternative structure: ``` vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` and ``` lazy mason nvim-treesitter telescope vim.health vim.lsp vim.provider.clipboard vim.provider.node vim.provider.perl vim.provider.python vim.provider.ruby vim.treesitter ``` Now, the entries are properly sorted and running nvim-only healthchecks requires running only `:che vim.*`.
| * | fix(vim.iter): enable optimizations for arrays (lists with holes) (#28781)Gregory Anders2024-05-17
| | | | | | | | | | | | | | | | | | | | | | | | The optimizations that vim.iter uses for array-like tables don't require that the source table has no holes. The only thing that needs to change is the determination if a table is "list-like": rather than requiring consecutive, integer keys, we can simply test for (positive) integer keys only, and remove any holes in the original array when we make a copy for the iterator.
| * | fix: extend the life of vim.tbl_flatten to 0.13Lewis Russell2024-05-16
| | | | | | | | | | | | | | | `vim.iter(t):flatten():totable()` doesn't handle nil so isn't a good enough replacement.
| * | feat: remove deprecated featuresdundargoc2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove following functions: - vim.lsp.util.extract_completion_items - vim.lsp.util.get_progress_messages - vim.lsp.util.parse_snippet() - vim.lsp.util.text_document_completion_list_to_complete_items - LanguageTree:for_each_child - health#report_error - health#report_info - health#report_ok - health#report_start - health#report_warn - vim.health.report_error - vim.health.report_info - vim.health.report_ok - vim.health.report_start - vim.health.report_warn
| * | perf(treesitter): use child_containing_descendant() in has-ancestor? (#28512)vanaigr2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `has-ancestor?` is O(n²) for the depth of the tree since it iterates over each of the node's ancestors (bottom-up), and each ancestor takes O(n) time. This happens because tree-sitter's nodes don't store their parent nodes, and the tree is searched (top-down) each time a new parent is requested. Solution: Make use of new `ts_node_child_containing_descendant()` in tree-sitter v0.22.6 (which is now the minimum required version) to rewrite the `has-ancestor?` predicate in C to become O(n). For a sample file, decreases the time taken by `has-ancestor?` from 360ms to 6ms.
| * | docs: misc (#28761)dundargoc2024-05-16
| | | | | | | | | Co-authored-by: Florian Zeitz <florob@babelmonkeys.de>
| * | vim-patch:5faeb60480c6 (#28768)zeertzjq2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): clarify {special} argument for shellescape() closes: vim/vim#14770 https://github.com/vim/vim/commit/5faeb60480c6efba5c0468c01275120b6ace5a09 N/A patch: vim-patch:c0e038b59f84 Co-authored-by: Enno <Konfekt@users.noreply.github.com>
| * | docs: newsJustin M. Keyes2024-05-15
| | | | | | | | | | | | Set dev_xx.txt help files to use "flow" layout.
| * | perf(lua): avoid spairs in vim.validate happy pathLewis Russell2024-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.validate` is too slow, mainly because of `vim.spairs`. Solution: Collect all errors in via `pairs`, and sort the errors via `spairs`.
| * | perf(vim.fs.normalize): use iteratorLewis Russell2024-05-15
| | | | | | | | | | | | ~10% faster.
| * | perf(loader): use a quicker version of vim.fs.normalizeLewis Russell2024-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.fs.normalize() normalizes too much vim.loader and is slow. Solution: Make it faster by doing less. This reduces the times spent in vim.fs.normalize in vim.loader from ~13ms -> 1-2ms. Numbers from a relative benchmark: - Skipping `vim.validate()`: 285ms -> 230ms - Skipping `path_resolve_dot()`: 285ms -> 60ms - Skipping `double_slash`: 60ms -> 35ms
| * | docs: misc (#28609)dundargoc2024-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/28484. Closes https://github.com/neovim/neovim/issues/28719. Co-authored-by: Chris <crwebb85@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com> Co-authored-by: Jonathan Raines <jonathan.s.raines@gmail.com> Co-authored-by: Yi Ming <ofseed@foxmail.com> Co-authored-by: Zane Dufour <zane@znd4.me> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | fix(lsp): don't start additional client if attach failed (#28744)Mathias Fußenegger2024-05-14
| | | | | | | | | | | | If a client for a server was already running and lsp.start was called in an unloaded buffer it started another client instead of bailing out.
| * | fix(treesitter): allow optional directive captures (#28664)Riley Bruins2024-05-14
| | |
| * | fix(health): clients may not support watchfiles #28710Maria José Solano2024-05-14
| | |
| * | feat(lsp): update LSP protocol 3.18 typings to date (#28730)Jongwook Choi2024-05-14
| | | | | | | | | | | | Make the LSP protocol typings up-to-date with LSP protocol (upcoming) version 3.18, before and in preparation for the Nvim 0.10.0 release.
| * | perf(lsp): only joinpath for dirs in watchdirsMathias Fussenegger2024-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doesn't have a huge impact, but showed up in profile output using `require("jit.p").start("i1", "/tmp/profile")` before: 31% joinpath 25% fs.lua:0 13% normalize 13% skip 8% _watchfunc 5% gsplit 3% spairs after: 34% skip 29% fs.lua:0 12% joinpath 7% normalize 5% _watchfunc 5% spairs