aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* refactor(lsp): fix luals warnings in tagfunc and add type annotations (#25150)Mathias Fußenegger2023-10-14
|
* refactor(lsp): make is_pull in lsp.diagnostic.get_namespace optional (#25156)Mathias Fußenegger2023-10-14
| | | | | | | | | Follw up to https://github.com/neovim/neovim/commit/63b3408551561127f7845470eb51404bcd6f547b `is_pull` should be optional, otherwise it is an API change that introduces warnings in consumers. Also fixes the type annotation of `_client_pull_namespaces` where the key is a string.
* fix(lsp): refactor escaping snippet text (#25611)Maria José Solano2023-10-14
|
* fix(lsp): handle NUL bytes in popup text (#25612)zeertzjq2023-10-12
| | | Fix #25610
* vim-patch:9.0.2011: INI files not detectedChristian Clason2023-10-11
| | | | | | | | | | | | | | Problem: INI files not detected Solution: detect uppercase .INI as dosini files It previo~1 only worked for lower-case .ini files, but upperc~1 .INI is also somewhat common on account of DOS' old 8.3 upperc~2 only filena~1. closes: vim/vim#13316 https://github.com/vim/vim/commit/4a82bdfaa8022402b1ca0f0000c94c47a13f1014 Co-authored-by: Martin Tournoij <martin@arp242.net>
* fix(lsp): display initialization errors (#25409)Maria José Solano2023-10-11
|
* docs: small fixesdundargoc2023-10-10
| | | | | | Co-authored-by: Wansmer <wansmer@gmail.com> Co-authored-by: Andrew Voynov <andrewvoynov.b@gmail.com> Co-authored-by: David Moberg <david.moberg@mediatek.com>
* vim-patch:9.0.2009: cmdline-completion for comma-separated options wrong ↵zeertzjq2023-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25569) Problem: cmdline-completion for comma-separated options wrong Solution: Fix command-line expansions for options with filenames with commas Fix command-line expansions for options with filenames with commas Cmdline expansion for option values that take a comma-separated list of file names is currently not handling file names with commas as the commas are not escaped. For such options, the commas in file names need to be escaped (to differentiate from a comma that delimit the list items). The escaped comma is unescaped in `copy_option_part()` during option parsing. Fix as follows: - Cmdline completion for option values with comma-separated file/folder names will not start a new match when seeing `\\,` and will instead consider it as one value. - File/folder regex matching will strip the `\\` when seeing `\\,` to make sure it can match the correct files/folders. - The expanded value will escape `,` with `\\,`, similar to how spaces are escaped to make sure the option value is correct on the cmdline. This fix also takes into account the fact that Win32 Vim handles file name escaping differently. Typing '\,' for a file name results in it being handled literally but in other platforms '\,' is interpreted as a simple ',' and commas need to be escaped using '\\,' instead. Also, make sure this new logic only applies to comma-separated options like 'path'. Non-list options like 'set makeprg=<Tab>' and regular ex commands like `:edit <Tab>` do not require escaping and will continue to work. Also fix up documentation to be clearer. The original docs are slightly misleading in how it discusses triple slashes for 'tags'. closes: vim/vim#13303 related: vim/vim#13301 https://github.com/vim/vim/commit/54844857fd6933fa4f6678e47610c4b9c9f7a091 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* fix(path): restore space separation in 'path' (#25571)zeertzjq2023-10-10
| | | Removing this behavior causes more inconsistencies and bugs.
* docs: miscellaneous doc and type fixes (#25554)Maria José Solano2023-10-10
|
* fix(lsp): account for border height in max floating popup height (#25539)LW2023-10-08
|
* Merge pull request #25529 from zeertzjq/vim-9.0.1990zeertzjq2023-10-07
|\ | | | | vim-patch:9.0.1990,27e12c7669e3
| * vim-patch:27e12c7669e3zeertzjq2023-10-07
| | | | | | | | | | | | runtime(doc): remove E1520 tag (vim/vim#13289) https://github.com/vim/vim/commit/27e12c7669e36a8f60fefa9db9a08024efeb06e8
| * vim-patch:9.0.1990: strange error numberzeertzjq2023-10-07
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | fix(lua): vim.region on linewise selection #25467Aayush Ojha2023-10-06
|/ | | fixes #18155
* vim-patch:9.0.1978: No filetype detection for just filesChristian Clason2023-10-06
| | | | | | | | | | | | | 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>
* feat: ignore swapfile for running Nvim processes #25336Justin M. Keyes2023-10-04
| | | | | | | | | | | | | | | | | | | 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`.
* fix(treesitter): make Visual hl work consistently with foldtext (#25484)zeertzjq2023-10-03
| | | | | Problem: Visual highlight is inconsistent on a folded line with treesitter foldtext. Solution: Don't added Folded highlight as it is already in background.
* vim-patch:cd39b69b0200zeertzjq2023-10-03
| | | | | | | | | | 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>
* vim-patch:20f48d5b2ddbzeertzjq2023-10-03
| | | | | | | | 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>
* feat(lsp)!: replace snippet parser by lpeg grammarMaria José Solano2023-10-02
|
* feat(lsp): snippet parsing using lpegMaria José Solano2023-10-02
|
* feat(lsp): fallback to code-action command on resolve failure (#25464)Mathias Fußenegger2023-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 = _
* feat(treesitter): add foldtext with treesitter highlighting (#25391)Till Bungert2023-10-01
|
* Merge pull request #25455 from bfredl/highlight_namespace_gettersbfredl2023-10-01
|\ | | | | feat(ui): allow to get the highlight namespace. closes #24390
| * feat(ui): allow to get the highlight namespaceDaniel Steinberg2023-10-01
| |
* | Merge pull request #25386 from glepnir/toggle_floatbfredl2023-09-30
|\ \ | |/ |/| feat(float): support toggle show float window
| * feat(float): support toggle show float windowglepnir2023-09-30
| |
* | refactor(lsp): deprecate util methods (#25400)Maria José Solano2023-09-29
| |
* | vim-patch:9.0.1950: Vim9: error codes spread out (#25405)zeertzjq2023-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | vim-patch:5277cfaf8afe (#25397)zeertzjq2023-09-28
|/ | | | | runtime(doc): mention mouse scrolling in scrollbind-quickadj (vim/vim#13190) https://github.com/vim/vim/commit/5277cfaf8afe847b7d4dcde6057fbecb001ab64e
* Merge pull request #25229 from glepnir/20323bfredl2023-09-26
|\ | | | | fix(highlight): add force in nvim_set_hl
| * fix(highlight): add force in nvim_set_hlglepnir2023-09-26
| |
* | fix(meta): add nil return types to lpeg functionsMaria José Solano2023-09-26
| |
* | fix(meta): cleanup lpeg operatorsMaria José Solano2023-09-26
| |
* | refactor(options)!: graduate some more shortmess flagsbfredl2023-09-25
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #25344 from gpanders/doc-shortmessbfredl2023-09-25
|\ \ | | | | | | docs: remove "f" from default 'shortmess' value
| * | docs: remove "f" from default 'shortmess' valueGregory Anders2023-09-24
| | | | | | | | | | | | | | | | | | | | | 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.
* | | docs: do not use deprecated functions #25334Maria José Solano2023-09-24
| | |
* | | vim-patch:790f9a890ceezeertzjq2023-09-25
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | feat(meta): add types for vim.lpegMaria José Solano2023-09-24
| | |
* | | feat(health): list attached buffers in LSP report #23561Bogdan Grigoruță2023-09-24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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])
* | fix(ui): always use stl/stlnc fillchars when drawing statusline (#25267)tj-moody2023-09-24
| |
* | docs: fix type warningsMaria José Solano2023-09-23
| |
* | refactor(options)!: graduate shortmess+=f flagbfredl2023-09-23
| | | | | | | | | | | | | | 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
* | Merge pull request #25286 from rktjmp/doc-vim-schedule-wrapzeertzjq2023-09-23
|\ \ | | | | | | docs: add more context to vim.schedule_wrap
| * | docs: update vim.schedule param name and typeOliver Marriott2023-09-23
| | | | | | | | | | | | | | | Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721 and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
| * | docs: clarify vim.schedule_wrap behaviourOliver Marriott2023-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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`.
* | | fix(meta): include vim.jsonMaria José Solano2023-09-22
| | |
* | | fix(languagetree): don't treat unparsed nodes as occupying full rangeL Lllvvuu2023-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.