summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim
AgeCommit message (Collapse)AuthorFiles
2024-05-31vim-patch:9.1.0453: filetype: rasi files are not recognizedChristian Clason1
Problem: filetype: rasi files are not recognized Solution: regonize '*.rasi' files as rasi filetype, include a filetype and syntax plugin (Pierrick Guillaume) ported from: https://github.com/Fymyte/rasi.vim closes: vim/vim#14821 https://github.com/vim/vim/commit/280e5b13ca568ed592a894140bf1ac74356f4b33 Co-authored-by: Pierrick Guillaume <pierguill@gmail.com>
2024-05-30refactor(lsp): replace util.buf_versions with changedtick (#28943)Mathias Fußenegger6
`lsp.util.buf_versions` was already derived from changedtick (`on_lines` from `buf_attach` synced the version) As far as I can tell there is no need to keep track of the state in a separate table.
2024-05-30feat(lsp): support postfix snippets in completionMathias Fussenegger1
2024-05-30feat(lsp): use fuzzy match on filterText instead of prefix matchMathias Fussenegger1
The `complete()` mechanism matches completion candidates against the typed text, so strict pre-filtering isn't necessary. This is a first step towards supporting postfix snippets (like `items@insert` in luals)
2024-05-30fix(lsp): clear lsp client diagnostics (#29050)crwebb851
Problem: When an lsp client is stopped, the client will only clear the diagnostics for the attached buffers but not the unattached buffers. Solution: Reset the diagnostics for the whole namespace rather than for only the attached buffers.
2024-05-28feat: add "jump" options to vim.diagnostic.config() (#29067)Gregory Anders3
Problem: There is no easy way to configure the behavior of the default diagnostic "jump" mappings. For example, some users way want to show the floating window, and some may not (likewise, some way want to only move between warnings/errors, or disable the "wrap" parameter). Solution: Add a "jump" table to vim.diagnostic.config() that sets default values for vim.diagnostic.jump(). Alternatives: Users can override the default mappings to use the exact options to vim.diagnostic.jump() that they want, but this has a couple issues: - While the default mappings are not complicated, they are also not trivial, so overriding them requires users to understand implementation details (specifically things like setting "count" properly). - If plugins want to change the default mappings, or configure the behavior in any way (e.g. floating window display), it becomes even harder for users to tweak specific behavior. vim.diagnostic.config() already works quite well as the "entry point" for tuning knobs with diagnostic UI elements, so this fits in nicely and composes well with existing mental models and idioms.
2024-05-28feat(defaults): use vim.diagnostic.jump() for default mappings (#29066)Gregory Anders1
This allows the mappings to work with a count and also enables new ]D and [D mappings to go to the last/first diagnostic in the buffer.
2024-05-28Merge pull request #27339 from MariaSolOs/completionGregory Anders7
feat(lsp): completion side effects
2024-05-28feat(snippet): add default keymaps during snippet sessionMaria José Solano1
2024-05-28feat(diagnostic): add vim.diagnostic.jump() (#26745)Gregory Anders1
Deprecate vim.diagnostic.goto_prev() and vim.diagnostic.goto_next() in favor of a unified vim.diagnostic.jump() interface. We cannot name the function "goto()" because some of our tooling (luacheck and stylua) fail to parse it, presumably because "goto" is a keyword in newer versions of Lua. vim.diagnostic.jump() also allows moving to a specific diagnostic and moving by multiple diagnostics at a time (useful for creating mappings that use v:count).
2024-05-28refactor: deprecate vim.region() #28416Justin M. Keyes2
Problem: `vim.region()` is redundant with `getregionpos()`. Solution: Deprecate `vim.region()`.
2024-05-27feat(lsp): completion side effectsMaria José Solano6
2024-05-27refactor: fix luals type warningsdundargoc7
2024-05-27fix(snippet): cancel snippet session when leaving the buffer (#29031)Maria José Solano1
2024-05-27fix(lsp): do not detach from buffer if there are uninitialized clients (#29029)Ilia Choly1
Problem: if on_lines is called before the LSP is initialized, the buffer is detached. Solution: check for uninitialized clients before detaching.
2024-05-27perf: add fast path to vim.validate (#28977)Gregory Anders1
For many small/simple functions (like those found in shared.lua), the runtime of vim.validate can far exceed the runtime of the function itself. Add an "overload" to vim.validate that uses a simple assertion pattern, rather than parsing a full "validation spec".
2024-05-27fix(treesitter): find buffer in multiple windows #28922Guilherme Soares1
Problem: 1. When interacting with multiple :InspectTree and the source buffer windows there is a high chance of errors due to the window ids not being updated and validated. 2. Not all InspectTree windows were closed when the source buffer was closed. Solution: 1. Update InspectTree window id on `CursorMoved` event and validate source buffer window id before trying to navigate to it. 2. Close all InspectTree windows
2024-05-26vim-patch:9.1.0442: hare runtime files outdated (#29011)zeertzjq2
Problem: hare runtime files outdated Solution: runtime(hare): update hare.vim to match upstream (Amelia Clarke) closes: vim/vim#14836 https://github.com/vim/vim/commit/35dfe58a540e2fb0eff953630f8e4fcbf4bc26ca Co-authored-by: Amelia Clarke <selene@perilune.dev>
2024-05-25fix(snippet): don't override unnamed register on tabstop select (#28998)Mathias Fußenegger1
2024-05-25fix(lsp): handle nil root_dir in health check (#29007)Mathias Fußenegger2
The root directory could show up as something like: Root directory: ~/path/to/cwd/v:null Despite being `nil`
2024-05-25refactor: move provider-related to where they are useddundargoc2
2024-05-25refactor(lua): rewrite vim.highlight.range() (#28986)zeertzjq1
- Use getregionpos(). - Use a single extmark for non-blockwise selection.
2024-05-25Merge pull request #28617 from glepnir/border_hlbfredl1
fix(float): missing default highlight for title
2024-05-25vim-patch:9.1.0444: Not enough tests for getregion() with multibyte chars ↵zeertzjq1
(#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
2024-05-25fix(float): missing default highlight for titleglepnir1
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.
2024-05-24feat(lsp): update LSP healthcheck format (#28980)Gregory Anders1
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.
2024-05-25vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() ↵zeertzjq1
(#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
2024-05-24feat(defaults): add LSP default mappings (again) (#28650)Gregory Anders1
2024-05-24fix(fs): make vim.fs.root work for relative paths and unnamed buffers (#28964)Gregory Anders1
If a buffer does not have a backing file then fall back to the current working directory.
2024-05-24fix: show swapfile warning as a warning (#28971)Gregory Anders1
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.
2024-05-24refactor: replace deprecated vim.loop with vim.uvdundargoc2
2024-05-24feat(complete): specify reason for CompleteDoneFamiu Haque1
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.
2024-05-24fix: change deprecation presentationdundargoc3
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`.
2024-05-24feat: allow gx to function for markdown linksdundargoc2
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>
2024-05-24docs: extract health to its own filedundargoc1
2024-05-24vim-patch:9.1.0441: getregionpos() can't properly indicate positions beyond ↵zeertzjq1
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
2024-05-23vim-patch:9.1.0435: filetype: cygport files are not recognizedChristian Clason1
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>
2024-05-23fix(comment): fall back to using trimmed comment markers (#28938)Evgeni Chasnovski1
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.
2024-05-23fix(lsp): check if buffer was detached in on_init callback (#28914)Ilia Choly1
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
2024-05-23refactor(lsp): reuse buf_detach_client logic in on_detach (#28939)Mathias Fußenegger1
2024-05-23fix(lsp): trigger LspDetach on buffer delete (#28795)Andre Toerien1
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2024-05-23vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924)zeertzjq1
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
2024-05-22fix: merge all provider healthchecks into a single health.luadundargoc5
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 ```
2024-05-22docs: move vim.health documentation to lua.txtdundargoc6
`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.
2024-05-22refactor(lsp): use supports_method where applicableIlia Choly2
2024-05-21fix(lsp): detach all clients on_reload to force buf_state reload (#28875)Ilia Choly1
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.
2024-05-21fix(lsp): semantic token functions allow "0" bufnr #28849Riley Bruins1
aligns with ":help dev-patterns"
2024-05-21fix(lsp): hide layout in codelenses in virtual text (#28794) (#28807)Mango The Fourth1
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
2024-05-21fix(lsp): add textDocument/documentLink to capability map (#28838)Ilia Choly1
2024-05-20vim-patch:9.1.0423: getregionpos() wrong with blockwise mode and multibytezeertzjq1
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