aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* feat(eval/method): partially port v8.1.1996Sean Dewar2021-11-26
| | | | | | | | | | | | | | | | Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/aad222c9c9a1e4fe6ae5a1fe95bb084619be0e65 Partial port as this does not include eval.txt change for listener_add. Cherry-pick eval.txt changes for: - bufadd from v8.1.1626: https://github.com/vim/vim/commit/5ca1ac373ae62b37152cb6f85916b402eda520a5 - setloclist and setqflist headers from: https://github.com/vim/vim/commit/b0d45e7f5354375edd02afafde3bd37dac1515ff Correct eval.txt typo for settabwinvar method call (matches latest Vim).
* vim-patch:8.1.1995: more functions can be used as methodsSean Dewar2021-11-26
| | | | | | | | | Problem: More functions can be used as methods. Solution: Make sign functions usable as a method. https://github.com/vim/vim/commit/93476fd6343ef40d088e064289cc279659d03953 Make sign_placelist and sign_unplacelist accept exactly one argument. Before, they erroneously accepted one or more arguments.
* feat(eval/method): partially port v8.1.1993Sean Dewar2021-11-26
| | | | | | | | | | | | Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203 server2client requires +clientserver, which hasn't been ported yet. The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those changes. test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848).
* vim-patch:8.1.1925: more functions can be used as methodsSean Dewar2021-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/4c313b13fb7bfa694ec6d2a13175e8650c007b2a The rest of this patch was ported in https://github.com/neovim/neovim/commit/3137c7d63574a86ddc44f11c839e8e58c2994bf9 N/A patches for version.c: vim-patch:8.1.2012: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make terminal functions usable as a method. Fix term_getattr(). https://github.com/vim/vim/commit/7ee80f766130f22598c928415c92ec612a8f18cf vim-patch:8.2.3576: some functions are not documented for use with a method Problem: Some functions are not documented for use with a method. Solution: Add examples. Fix that sign_unplacelist() only takes one argument. (Sean Dewar, closes vim/vim#9081) https://github.com/vim/vim/commit/a63780b9770699bf8fda93affeab2c728bc76912 Addressed in the port of v8.1.1995.
* vim-patch:8.2.3679: objc file detected as Octave (#16446)Christian Clason2021-11-26
| | | | | | Problem: objc file detected as Octave. (Antony Lee) Solution: Detect objc by preprocessor lines. (Doug Kearns, closes vim/vim#9223, closes vim/vim#9220) https://github.com/vim/vim/commit/7329cfab36356c48edab7ed68f6244eb9e20a5b1
* vim-patch:8.2.3676: unused runtime file (#16441)Christian Clason2021-11-26
| | | | | Problem: Unused runtime file. Solution: Remove rgb.txt. https://github.com/vim/vim/commit/309ce251897512d42da2b0df0ff100dc303e688a
* vim-patch:8.2.3677: after a put the '] mark is on the last byte (#16442)Christian Clason2021-11-26
| | | | | | Problem: After a put the '] mark is on the last byte of a multi-byte character. Solution: Move it to the first byte. (closes vim/vim#9047) https://github.com/vim/vim/commit/4d07253a485819b3a9fd923d263e722ea2109c12
* fix(lua): fix vim.deepcopy for metatables & cycled tables (#16435)Shadman2021-11-26
| | | | | vim.deepcopy previously didn't retain metatables in copies and caused stackoverflow on recursive tables/cycled tables this fixes these issues
* fix(lsp): send textDocument/didChange for each buffer (#16431)Michael Lingelbach2021-11-26
| | | Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* fix(lsp): require bufnr for apply_text_edits (#16444)Michael Lingelbach2021-11-26
|
* chore(docs): clarify vim.notify log_level parameter (#16436)Mathias Fußenegger2021-11-25
|
* feat(diagnostic)!: make DiagnosticChanged a first class autocmd (#16098)Gregory Anders2021-11-25
| | | | | | | This allows users to hook into diagnostic events with finer granularity (e.g. per-buffer or file). BREAKING CHANGE: DiagnosticsChanged and LspDiagnosticsChanged user autocommands are removed.
* feat(lsp): use uv_spawn to check if server executable (#16430)Michael Lingelbach2021-11-25
| | | | | | | | Previously, the built-in language server client checked if the first argument of cmd was executable via vim.fn.executable. This ignores PATH injected via cmd_env. Instead, we now start the client via uv.spawn, and handle the failure mode, reporting the error back to the user. Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* Merge pull request #16434 from gpanders/diagnostic-clampageMichael Lingelbach2021-11-25
|\ | | | | fix(diagnostic): line clamping fixes
| * fix(diagnostic): don't clamp line numbers in setqflistGregory Anders2021-11-24
| | | | | | | | | | | | | | | | | | | | | | | | Reverts 5b0d8f85fdb705b07143fc4019189a9dcfe3c108. Diagnostic producers can send diagnostics for buffers that are not loaded, for which we cannot retrieve the line count to clamp line numbers. This means that some diagnostics in the quickfix list could be line-clamped and others not. The quickfix list can already handle line numbers past the end of the buffer (i.e. it *already* clamps line numbers) so just use the "raw" diagnostic positions sent from the producer.
| * test(diagnostic): uncomment equality checkGregory Anders2021-11-24
| |
| * fix(diagnostic): get line count per buffer when clampingGregory Anders2021-11-24
| | | | | | | | | | | | Fixes a bug when `get_diagnostics` is called with a nil `bufnr`. Diagnostics should be clamped for the buffer they reside in, not the current buffer.
* | fix(diagnostic): do not focus floats in goto functions (#16433)Gregory Anders2021-11-24
|/ | | | | Floating windows opened by `goto_next` and `goto_prev` should not be focused when repeating the `goto_` function. The float can still be focused by calling `open_float` with `scope = "cursor"`.
* perf(lsp)!: use faster line retrieval for utf-16 to byte idx conversion (#16360)Mathias Fußenegger2021-11-24
|
* fix(ui): use nowait for q mapping in floating window (#16427)ii142021-11-24
|
* fix(fileio): replace characters over INT_MAX with U+FFFD (#16354)Javier Lopez2021-11-23
| | | | fixes #11877 credit: @zubairabid https://github.com/neovim/neovim/pull/12010
* Merge pull request #16402 from clason/treesitter-bumpChristian Clason2021-11-23
|\ | | | | build(deps): bump tree-sitter,treesitter-c to v0.20.1 and adapt tests
| * fix(tests): adapt parser_spec test to tree-sitter bumpChristian Clason2021-11-23
| | | | | | | | | | Change query to include anonymous nodes (`(_)` -> `[_]`) and use new syntax (`{vim,lua}.match?`->`#{vim,lua}.match?`)
| * build(deps): also bump treesitter-c to v0.20.1Christian Clason2021-11-22
| |
| * build(deps): bump tree-sitter to 0.20.1Christian Clason2021-11-22
| |
* | fix(diagnostic): resolve buffer number in get() (#16407)Gregory Anders2021-11-22
| |
* | fix(diagnostics): don't allow 0 bufnr for metatable index (#16405)Gregory Anders2021-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 04bfd20bb introduced a subtle bug where using 0 as the buffer number in the diagnostic cache resets the cache for the current buffer. This happens because we were not checking to see if the _resolved_ buffer number already existed in the cache; rather, when the __index metamethod was called we assumed the index did not exist so we set its value to an empty table. The fix for this is to check `rawget()` for the resolved buffer number to see if the index already exists. However, the reason this bug was introduced in the first place was because we are simply being too clever by allowing a 0 buffer number as the index which is automatically resolved to a real buffer number. In the interest of minimizing metatable magic, remove this "feature" by requiring the buffer number index to always be a valid buffer. This ensures that the __index metamethod is only ever called for non-existing buffers (which is what we wanted originally) as well as reduces some of the cognitive overhead for understanding how the diagnostic cache works. The tradeoff is that all public API functions must now resolve 0 buffer numbers to the current buffer number.
* | fix(lsp): avoid indexing vim.NIL for null workspaceFolders (#16404)Michael Lingelbach2021-11-22
| | | | | | | | * internally represent no workspaceFolders as nil instead of vim.NIL * rename workspaceFolders -> workspace_folders for consistency
* | docs(man): omit misleading mention of environment for -u NORC (#16379)Christian Clason2021-11-22
| | | | | | | | | | | | The phrase referred specifically to `$VIMINIT` and `$EXRC`, which are parsed (and available with, e.g., `echo $VIMINIT` if set) but of course not loaded since _any_ initialization is skipped. Hence this is redundant and can be misleading.
* | vim-patch:88a4205f1cfb (#16399)Christian Clason2021-11-22
|/ | | | Update runtime files https://github.com/vim/vim/commit/88a4205f1cfbdc328e987ab00521fc8a22447fc3
* Merge pull request #16341 from zeertzjq/vim-8.2.2518nightlyJan Edmund Lazo2021-11-21
|\ | | | | vim-patch:8.2.{2518,2520,3572,3588}: 'listchars' (and 'fillchars'?) fixes
| * vim-patch:8.2.3588: break statement is never reachedzeertzjq2021-11-17
| | | | | | | | | | | | | | Problem: Break statement is never reached. Solution: Rely on return value of set_chars_option() not changing. (closes vim/vim#9103) https://github.com/vim/vim/commit/606efc7df4c94104bbd24248106dd0e4ee6f7cfa
| * vim-patch:8.2.3572: memory leak when closing window and using "multispace"zeertzjq2021-11-17
| | | | | | | | | | | | | | Problem: Memory leak when closing window and using "multispace" in 'listchars'. Solution: Free the memory. (closes vim/vim#9071) https://github.com/vim/vim/commit/7a33ebfc5b04353aa7674972087d581def8fdcc1
| * vim-patch:8.2.2520: missing tests for 'listchars'zeertzjq2021-11-17
| | | | | | | | | | | | Problem: Missing tests for 'listchars'. Solution: Add a few more checks. (Yegappan Lakshmanan, closes vim/vim#7854) https://github.com/vim/vim/commit/04ea7e9049706788179945e2a91922c0b7cb9ed0
| * fix(options): using :set fillchars should clear local valuezeertzjq2021-11-17
| |
| * vim-patch:8.2.2518: 'listchars' should be window-localzeertzjq2021-11-17
| | | | | | | | | | | | | | | | | | | | | | Problem: 'listchars' should be window-local. Solution: Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz, closes vim/vim#5206, closes vim/vim#7850) https://github.com/vim/vim/commit/eed9d46293f0842aad0d50ff3a526f9a48b12421 Nvim already has this feature, but it implements :set listchars the same as :setglobal listchars, which is incorrect. Vim's implementation of :set listchars is correct: using :set listchars clears local value.
* | vim-patch:8.2.3627: difficult to know where the text starts in a window (#16377)zeertzjq2021-11-21
| | | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.3627: difficult to know where the text starts in a window Problem: difficult to know where the text starts in a window. (Sergey Vlasov) Solution: Add the "textoff" entry in the result of getwininfo(). (closes vim/vim#9163) https://github.com/vim/vim/commit/cdf5fdb2948ecdd24c6a1e27ed33dfa847c2b3e4 Fix indent in Test_getbufwintabinfo().
* | Merge pull request #16386 from VVKot/vim-8.2.2922Jan Edmund Lazo2021-11-21
|\ \ | | | | | | vim-patch:8.2.2922,8.2.3639
| * | vim-patch:8.2.3639: line commented out accidentallyVVKot2021-11-21
| | | | | | | | | | | | | | | | | | Problem: Line commented out accidentally. Solution: Uncomment. (Volodymyr Kot, closes vim/vim#9172) https://github.com/vim/vim/commit/7f0c4b418e01d6e056a74de2f22fcbad613b7591
| * | vim-patch:8.2.2922: computing array length is done in various waysVVKot2021-11-21
| | | | | | | | | | | | | | | | | | Problem: Computing array length is done in various ways. Solution: Use ARRAY_LENGTH everywhere. (Ken Takata, closes vim/vim#8305) https://github.com/vim/vim/commit/eeec2548785b2dd245a31ab25d7bde0f88ea1a6d
* | | fix(diagnostic): remove invalid buffers from cache (#16397)smolck2021-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Errors were being caused by invalid buffers being kept around in diagnostic_cache, so add a metatable to diagnostic_cache which attaches to new buffers in the cache, removing them after they are invalidated. Closes #16391. Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | | Merge pull request #16362 from zeertzjq/vim-8.2.3617Jan Edmund Lazo2021-11-21
|\ \ \ | | | | | | | | vim-patch:8.2.{3468,3617,3618,3622}: some other CWD related patches
| * | | vim-patch:8.2.3622: "verbose pwd" shows confusing infozeertzjq2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "verbose pwd" shows confusing info when :lcd does not change directory. Solution: Clear last_chdir_reason also when the directory does not change. (closes vim/vim#9160) https://github.com/vim/vim/commit/64be6aa3a54ecfe355d4a03e1200650c301e7f29 This only ports the tests, as this is already Nvim's behavior.
| * | | vim-patch:8.2.3618: getcwd() is unclear about how 'autochdir' is usedzeertzjq2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getcwd() is unclear about how 'autochdir' is used. Solution: Update the help for getcwd(). Without any arguments always return the actual current directory. (closes vim/vim#9142) https://github.com/vim/vim/commit/851c7a699ae00bdc14a4db874cf722b7b7393b53
| * | | revert: partially revert #9894zeertzjq2021-11-19
| | | | | | | | | | | | | | | | Vim has a solution to #9892 with fewer side-effects in patch 8.2.3618
| * | | vim-patch:8.2.3617: ":verbose pwd" does not mention 'autochdir' was appliedzeertzjq2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | Problem: ":verbose pwd" does not mention 'autochdir' was applied. Solution: Remember the last chdir was done by 'autochdir'. (issue vim/vim#9142) https://github.com/vim/vim/commit/0526815c15170a5926e1008600ec29d42d8b64c2
| * | | vim-patch:8.2.3468: problem with :cd when editing file in non-existent directoryzeertzjq2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Problem with :cd when editing file in non-existent directory. (Yee Cheng Chin) Solution: Prepend the current directory to get the full path. (closes vim/vim#8903) https://github.com/vim/vim/commit/c6376c798433bcb9ee38a8664299d11454546950
* | | | Merge pull request #16370 from gpanders/diagnostic-column-clampGregory Anders2021-11-21
|\ \ \ \
| * | | | fix(diagnostic): clamp line numbers in setqflist and setloclistGregory Anders2021-11-19
| | | | |
| * | | | fix(diagnostic): fix navigation with diagnostics placed past end of lineGregory Anders2021-11-19
| | | | |