summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim
AgeCommit message (Collapse)AuthorFiles
2023-10-10docs: miscellaneous doc and type fixes (#25554)Maria José Solano4
2023-10-08fix(lsp): account for border height in max floating popup height (#25539)LW1
2023-10-07Merge pull request #25529 from zeertzjq/vim-9.0.1990zeertzjq1
vim-patch:9.0.1990,27e12c7669e3
2023-10-07vim-patch:27e12c7669e3zeertzjq1
runtime(doc): remove E1520 tag (vim/vim#13289) https://github.com/vim/vim/commit/27e12c7669e36a8f60fefa9db9a08024efeb06e8
2023-10-07vim-patch:9.0.1990: strange error numberzeertzjq1
Problem: strange error number Solution: change error number, add doc tag for E1507 closes: vim/vim#13270 https://github.com/vim/vim/commit/ea746f9e862092aef3d4e95c64d116759b9fabe0 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-10-06fix(lua): vim.region on linewise selection #25467Aayush Ojha1
fixes #18155
2023-10-06vim-patch:9.0.1978: No filetype detection for just filesChristian Clason1
Problem: No filetype detection for just files Solution: Detect just files (*.just, justfile, etc) closes: vim/vim#13271 https://github.com/vim/vim/commit/3d90f71b764e67b1eb12fc6a9a4b9e2fca6dc087 vim-patch:b6d01f13: runtime(just): Correct filetype detection pattern and style Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-04feat: ignore swapfile for running Nvim processes #25336Justin M. Keyes2
Problem: The swapfile "E325: ATTENTION" dialog is displayed when editing a file already open in another (running) Nvim. Usually this behavior is annoying and irrelevant: - "Recover" and the other options ("Open readonly", "Quit", "Abort") are almost never wanted. - swapfiles are less relevant for "multi-Nvim" since 'autoread' is enabled by default. - Even less relevant if user enables 'autowrite'. Solution: Define a default SwapExists handler which does the following: 1. If the swapfile is owned by a running Nvim process, automatically chooses "(E)dit anyway" (caveat: this creates a new, extra swapfile, which is mostly harmless and ignored except by `:recover` or `nvim -r`. 2. Shows a 1-line "ignoring swapfile..." message. 3. Users can disable the default SwapExists handler via `autocmd! nvim_swapfile`.
2023-10-03fix(treesitter): make Visual hl work consistently with foldtext (#25484)zeertzjq1
Problem: Visual highlight is inconsistent on a folded line with treesitter foldtext. Solution: Don't added Folded highlight as it is already in background.
2023-10-03vim-patch:cd39b69b0200zeertzjq1
runtime(doc): add missing error numbers in the help. (vim/vim#13241) closes: vim/vim#13240 https://github.com/vim/vim/commit/cd39b69b0200005622db7291bbacff95bd03a3d0 Co-authored-by: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
2023-10-03vim-patch:20f48d5b2ddbzeertzjq1
runtime(doc): mention how to disable folding in diff mode (vim/vim#13242) https://github.com/vim/vim/commit/20f48d5b2ddb9fdc29e83f0da6f31f895eaeab47 Co-authored-by: dundargoc <33953936+dundargoc@users.noreply.github.com>
2023-10-02feat(lsp)!: replace snippet parser by lpeg grammarMaria José Solano2
2023-10-02feat(lsp): snippet parsing using lpegMaria José Solano1
2023-10-02feat(lsp): fallback to code-action command on resolve failure (#25464)Mathias Fußenegger1
The haskell-language-server supports resolve only for a subset of code actions. For many code actions trying to resolve the `edit` property results in an error, but the unresolved action already contains a command that can be executed without issue. The protocol specification is unfortunately a bit vague about this, and what the haskell-language-server does seems to be valid. Example: newtype Dummy = Dummy Int instance Num Dummy where Triggering code actions on "Num Dummy" and choosing "Add placeholders for all missing methods" resulted in: -32601: No plugin enabled for SMethod_CodeActionResolve, potentially available: explicit-fields, importLens, hlint, overloaded-record-dot With this change it will insert the missing methods: instance Num Dummy where (+) = _ (-) = _ (*) = _ negate = _ abs = _ signum = _ fromInteger = _
2023-10-01feat(treesitter): add foldtext with treesitter highlighting (#25391)Till Bungert2
2023-10-01Merge pull request #25455 from bfredl/highlight_namespace_gettersbfredl2
feat(ui): allow to get the highlight namespace. closes #24390
2023-10-01feat(ui): allow to get the highlight namespaceDaniel Steinberg2
2023-09-30Merge pull request #25386 from glepnir/toggle_floatbfredl2
feat(float): support toggle show float window
2023-09-30feat(float): support toggle show float windowglepnir2
2023-09-29refactor(lsp): deprecate util methods (#25400)Maria José Solano1
2023-09-29vim-patch:9.0.1950: Vim9: error codes spread out (#25405)zeertzjq1
Problem: Vim9: error codes spread out Solution: group them together and reserve 100 more for future use Reserve 100 error codes for future enhancements to the Vim9 class support closes: vim/vim#13207 https://github.com/vim/vim/commit/413f83990f15d5d59d27ab741670f527a7a3feb8 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-28vim-patch:5277cfaf8afe (#25397)zeertzjq1
runtime(doc): mention mouse scrolling in scrollbind-quickadj (vim/vim#13190) https://github.com/vim/vim/commit/5277cfaf8afe847b7d4dcde6057fbecb001ab64e
2023-09-26Merge pull request #25229 from glepnir/20323bfredl2
fix(highlight): add force in nvim_set_hl
2023-09-26fix(highlight): add force in nvim_set_hlglepnir2
2023-09-26fix(meta): add nil return types to lpeg functionsMaria José Solano1
2023-09-26fix(meta): cleanup lpeg operatorsMaria José Solano1
2023-09-25refactor(options)!: graduate some more shortmess flagsbfredl1
A lot of updated places in the docs were already incorrect since long since they did not reflect the default behaviour. "[dos format]" could've been argued being better for discoverability but that ship has already sailed as it is no longer displayed by default.
2023-09-25Merge pull request #25344 from gpanders/doc-shortmessbfredl1
docs: remove "f" from default 'shortmess' value
2023-09-24docs: do not use deprecated functions #25334Maria José Solano3
2023-09-25vim-patch:790f9a890ceezeertzjq1
runtime(doc): Add a missing '<' to the help of strutf16len() (vim/vim#13168) https://github.com/vim/vim/commit/790f9a890ceeb9539776265cba0f026fb2c96790 Co-authored-by: a5ob7r <12132068+a5ob7r@users.noreply.github.com>
2023-09-24feat(meta): add types for vim.lpegMaria José Solano1
2023-09-24feat(health): list attached buffers in LSP report #23561Bogdan Grigoruță1
Problem: Users using `vim.lsp.start` directly (instead of nvim-lspconfig) need more visibility for troubleshooting. For example, troubleshooting unnecesary servers or servers that aren't attaching to expected buffers. Solution: Mention attached buffers in the `:checkhealth lsp` report. Example: vim.lsp: Active Clients ~ - clangd (id=1, root_dir=~/dev/neovim, attached_to=[7]) - lua_ls (id=2, root_dir=~/dev/neovim, attached_to=[10])
2023-09-24docs: remove "f" from default 'shortmess' valueGregory Anders1
The "f" flag was removed in f7da4722570617bd8927e7aa533fa9a608c45bba. The value of the "f" flag is no longer listed in the 'shortmess' description and it cannot be disabled, so having it in the default value is pointless and confusing.
2023-09-24fix(ui): always use stl/stlnc fillchars when drawing statusline (#25267)tj-moody1
2023-09-23docs: fix type warningsMaria José Solano5
2023-09-23refactor(options)!: graduate shortmess+=f flagbfredl1
Not everything needs to be crazy overconfigurable. Also fixes a warning in latest clang which didn't approve of the funky math switch statement in append_arg_number
2023-09-23Merge pull request #25286 from rktjmp/doc-vim-schedule-wrapzeertzjq2
docs: add more context to vim.schedule_wrap
2023-09-22fix(meta): include vim.jsonMaria José Solano1
2023-09-23docs: update vim.schedule param name and typeOliver Marriott1
Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721 and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
2023-09-22fix(languagetree): don't treat unparsed nodes as occupying full rangeL Lllvvuu1
This is incorrect in the following scenario: 1. The language tree is Lua > Vim > Lua. 2. An edit simultaneously wipes out the `_regions` of all nodes, while taking the Vim injection off-screen. 3. The Vim injection is not re-parsed, so the child Lua `_regions` is still `nil`. 4. The child Lua is assumed, incorrectly, to occupy the whole document. 5. This causes the injections to be parsed again, resulting in Lua > Vim > Lua > Vim. 6. Now, by the same process, Vim ends up with its range assumed over the whole document. Now the parse is broken and results in broken highlighting and poor performance. It should be fine to instead treat an unparsed node as occupying nothing (i.e. effectively non-existent). Since, either: - The parent was just parsed, hence defining `_regions` - The parent was not just parsed, in which case this node doesn't need to be parsed either. Also, the name `has_regions` is confusing; it seems to simply mean the opposite of "root" or "full_document". However, this PR does not touch it.
2023-09-22docs: clarify vim.schedule_wrap behaviourOliver Marriott1
- Remove the usage of the term "defer" to avoid confusion with `vim.defer_fn`, which also calls `vim.schedule_wrap` internally. - Explicitly state that `vim.schedule_wrap` returns a function in the text. - Mention that arguments are passed along. - Include a usage example. - Rename param to `fn`.
2023-09-21fix(lsp): handle absence of a trailing newline #25194Sergey Slipchenko1
Fixes #24339 rust-analyzer sends "Invalid offset" error in such cases. Some other servers handle it specially. LSP spec mentions that "A range is comparable to a selection in an editor". Most editors don't handle trailing newlines the same way Neovim/Vim does, it's clearly visible if it's present or not. With that in mind it's understandable why sending end position as simply the start of the line after the last one is considered invalid in such cases.
2023-09-21fix(lsp): clear codelens on LspDetach (#24903)Jaehwang Jung1
Also fix incorrect parameters in on_detach callback.
2023-09-21vim-patch:9.0.1921: not possible to use the jumplist like a stack (#25278)zeertzjq1
Problem: not possible to use the jumplist like a stack Solution: Add the 'jumpoptions' setting to make the jumplist a stack. Add an option for using jumplist like tag stack related: vim/vim#7738 closes: vim/vim#13134 ported from NeoVim: - https://neovim.io/doc/user/motion.html#jumplist-stack - neovim/neovim@39094b3 - https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior Based on the feedback in the previous PR, it looks like many people like this option. https://github.com/vim/vim/commit/87018255e3ad0f4dfa03e20318836d24af721caf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
2023-09-21vim-patch:9.0.1918Christian Clason1
patch 9.0.1918: No filetype detection for Authzed filetypes Problem: No filetype detection for Authzed filetypes Solution: Detect the *.zed file extension as authzed filetype closes: vim/vim#13129 https://github.com/vim/vim/commit/5790a54166793554d16f6a85d8824632860b8b37 Co-authored-by: Matt Polzin <mpolzin@workwithopal.com>
2023-09-20feat(lua): add vim.func._memoizeLewis Russell7
Memoizes a function, using a custom function to hash the arguments. Private for now until: - There are other places in the codebase that could benefit from this (e.g. LSP), but might require other changes to accommodate. - Invalidation of the cache needs to be controllable. Using weak tables is an acceptable invalidation policy, but it shouldn't be the only one. - I don't think the story around `hash_fn` is completely thought out. We may be able to have a good default hash_fn by hashing each argument, so basically a better 'concat'.
2023-09-20docs: misc #24561Justin M. Keyes6
fix #24699 fix #25253
2023-09-19fix(lsp)!: deprecate trim_empty_linesMaria José Solano2
2023-09-19feat(lsp): use treesitter for stylize markdownMaria José Solano2
2023-09-19Merge pull request #25214 from bfredl/glyphcachebfredl1
refactor(grid): change schar_T representation to be more compact