aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* vim-patch:8.2.3410: crash with linebreak, listchars and large tabstopzeertzjq2022-01-21
| | | | | | Problem: Crash with linebreak, listchars and large tabstop. Solution: Account for different size listchars for a tab. (closes vim/vim#8841) https://github.com/vim/vim/commit/89a54b413a8c96206ce7e038dde81a6eff6cd6b8
* vim-patch:8.2.3121: 'listchars' "exceeds" character appears in foldcolumnzeertzjq2022-01-21
| | | | | | | | Problem: 'listchars' "exceeds" character appears in foldcolumn. Window separator is missing. (Leonid V. Fedorenchik) Solution: Only draw the "exceeds" character in the text area. Break the loop when not drawing the text. (closes vim/vim#8524) https://github.com/vim/vim/commit/41fb723ee97baa2f095cde601a5a144b168b7a6b
* docs(lsp): fix on_publish_diagnostics example (#17146)xnmet2022-01-21
|
* feat(lsp): add handler for workspace/workspaceFolders (#17149)Michael Lingelbach2022-01-21
|
* test(put_spec): correctly order parameters to eq() (#17134)zeertzjq2022-01-19
| | | | The first parameter to eq() should be the expected value, and the second parameter should be the actual value.
* Merge pull request #17130 from clason/bump-treesitterThomas Vigouroux2022-01-19
|\ | | | | build(deps): bump tree-sitter
| * build(deps): bump tree-sitterChristian Clason2022-01-18
| | | | | | | | | | | | | | | | update tree-sitter to https://github.com/tree-sitter/tree-sitter/commit/2346570901ef01517dad3e4a944a36d7b7237e4f which includes a massive performance improvement to query construction (bumping ABI compatibility to 14; parsers need to be generated with a flag to take advantage of this)
* | refactor: source ftplugin.vim separately from filetype.vim (#17129)Gregory Anders2022-01-18
|/ | | | | | | | | | | | | | This is a follow-on to #17040. The real benefit of #17040 was ensuring that the ftplugin FileType autocommand was defined first and thus always fired first. A side effect of the implementation in #17040 was that setting variables that modified the state of filetype detection (such as g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the user's init file. Filetype detection can also no longer be prevented from loading by using `:filetype off`. This PR addresses both of those side effects by unconditionally sourcing ftplugin.vim and indent.vim before the user's init file (which ensures that these autocommands run first) and sourcing filetype.vim *after* the user's init file (thus allowing it to be blocked or modified).
* refactor: enable filetype detection before user startup scripts (#17040)Gregory Anders2022-01-17
|
* fix(man.vim): support calling :Man without a section again (#17119)zeertzjq2022-01-17
| | | | | When `man -w` is called with an empty string as section name, it may fail with an error code, which causes :Man to no longer work without a section. Just remove that argument when no section is specified.
* Merge pull request #16813 from neovim/marvim/api-doc-update/masterJames McCoy2022-01-17
|\ | | | | docs: regenerate
| * docs: regenerate [skip ci]marvim2022-01-17
| |
* | Merge pull request #17125 from jamessan/auto-prs-as-draftJames McCoy2022-01-17
|\ \ | |/ |/| ci: create automated PRs as draft PRs
| * ci: create automated PRs as draft PRsJames McCoy2022-01-17
|/ | | | | | | | | | | | GH workflows aren't allowed to trigger other GH workflows. Since commitlint is a required check now, we need something manual to happen for it to run on vim-patch/api-doc PRs. Creating these PRs as drafts and then marking them as "ready to review" when we want to merge them will provide the manual trigger to run commitlint. [skip ci]
* Merge pull request #17122 from dundargoc/ci/remove-non-working-jobJames McCoy2022-01-17
|\ | | | | ci: remove non-working add-reviewer job
| * ci: remove non-working add-reviewer jobDundar Göc2022-01-17
| |
* | Merge pull request #17106 from jamessan/always-run-commitlintJames McCoy2022-01-17
|\ \ | |/ |/| Always run commitlint check
| * ci(api-docs): avoid running ci for doc commitsJames McCoy2022-01-17
| |
| * ci(commitlint): use pull_request_target to avoid "skip ci"James McCoy2022-01-17
|/
* perf(lsp): request only changed portions of the buffer in changetracking ↵Michael Lingelbach2022-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#17118) This commits introduces two performance improvements in incremental sync: * avoiding expensive lua string reallocations on each on_lines call by requesting only the changed chunk of the buffer as reported by firstline and new_lastline parameters of on_lines * re-using already allocated tables for storing the resulting lines to reduce the load on the garbage collector The majority of the performance improvement is from requesting only changed chunks of the buffer. Benchmark: The following code measures the time required to perform a buffer edit to that operates individually on each line, common to plugins such as vim-commentary. set rtp+=~/.config/nvim/plugged/nvim-lspconfig set rtp+=~/.config/nvim/plugged/vim-commentary lua require('lspconfig')['ccls'].setup({}) function! Benchmark(tries) abort let results_comment = [] let results_undo = [] for i in range(a:tries) echo printf('run %d', i+1) let begin = reltime() normal gggcG call add(results_comment, reltimefloat(reltime(begin))) let begin = reltime() silent! undo call add(results_undo, reltimefloat(reltime(begin))) redraw endfor let avg_comment = 0.0 let avg_undo = 0.0 for i in range(a:tries) echomsg printf('run %3d: comment=%fs undo=%fs', i+1, results_comment[i], results_undo[i]) let avg_comment += results_comment[i] let avg_undo += results_undo[i] endfor echomsg printf('average: comment=%fs undo=%fs', avg_comment / a:tries, avg_undo / a:tries) endfunction command! -bar Benchmark call Benchmark(10) All text changes will be recorded within a single undo operation. Both the comment operation itself and the undo operation will generate an on_lines event for each changed line. Formatter plugins using setline() have also been found to exhibit the same problem (neoformat, :RustFmt in rust.vim), as this function too generates an on_lines event for every line it changes. Using the neovim codebase as an example (commit 2ecf0a4) with neovim itself built at 2ecf0a4 with CMAKE_BUILD_TYPE=Release shows the following performance improvement: src/nvim/lua/executor.c, 1432 lines: - baseline, no optimizations: comment=0.540587s undo=0.440249s - without double-buffering optimization: comment=0.183314s undo=0.060663s - all optimizations in this commit: comment=0.174850s undo=0.052789s src/nvim/search.c, 5467 lines: - baseline, no optimizations: comment=7.420446s undo=7.656624s - without double-buffering optimization: comment=0.889048s undo=0.486026s - all optimizations in this commit: comment=0.662899s undo=0.243628s src/nvim/eval.c, 11355 lines: - baseline, no optimizations: comment=41.775695s undo=44.583374s - without double-buffering optimization: comment=3.643933s undo=2.817158s - all optimizations in this commit: comment=1.510886s undo=0.707928s Co-authored-by: Dmytro Meleshko <dmytro.meleshko@gmail.com>
* vim-patch:fd31be29b822 (#17114)Christian Clason2022-01-17
| | | | Update runtime files https://github.com/vim/vim/commit/fd31be29b8220ee1cb0b3460c82f2634ae3cc370
* Merge pull request #15242 from ↵bfredl2022-01-16
|\ | | | | | | | | dundargoc/docs/vim-patch/move-outsite-of-getting-started docs: deprioritize vim-patch as a good beginner task
| * docs: deprioritize vim-patch as a good beginner taskDundar Göc2022-01-16
|/ | | | Also add a disclaimer where familiarity with vim is strongly suggested.
* fix(lsp): avoid nil workspace/symbol query (#17107)Daniel Steinberg2022-01-15
|
* fix(lsp): fetch offset_encoding from client in references (#17104)Michael Lingelbach2022-01-15
|
* Merge pull request #16836 from bfredl/mark2bfredl2022-01-15
|\ | | | | refactor(marks): use a more efficient representation with less pointer indirection
| * refactor(extmarks): use a more efficient representationBjörn Linse2022-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | marktree.c was originally constructed as a "generic" datatype, to make the prototyping of its internal logic as simple as possible and also as the usecases for various kinds of extmarks/decorations was not yet decided. As a consequence of this, various extra indirections and allocations was needed to use marktree to implement extmarks (ns/id pairs) and decorations of different kinds (some which is just a single highlight id, other an allocated list of virtual text/lines) This change removes a lot of indirection, by making Marktree specialized for the usecase. In particular, the namespace id and mark id is stored directly, instead of the 64-bit global id particular to the Marktree struct. This removes the two maps needed to convert between global and per-ns ids. Also, "small" decorations are stored inline, i.e. those who doesn't refer to external heap memory anyway. That is highlights (with priority+flags) are stored inline, while virtual text, which anyway occurs a lot of heap allocations, do not. (previously a hack was used to elide heap allocations for highlights with standard prio+flags) TODO(bfredl): the functionaltest-lua CI version of gcc is having severe issues with uint16_t bitfields, so splitting up compound assignments and redundant casts are needed. Clean this up once we switch to a working compiler version.
* | feat: use nvim_buf_set_extmark for vim.highlight (#16963)Michael Lingelbach2022-01-15
| | | | | | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/13647 This allows customizing the priority of the highlights. * Add default priority of 50 * Use priority of 200 for highlight on yank * use priority of 40 for highlight references (LSP)
* | Merge pull request #17001 from mjlbach/feat/non-strict-extmarksbfredl2022-01-15
|\ \ | |/ |/| feat(extmarks): add strict option
| * Hopefully last attemptMichael Lingelbach2022-01-15
| |
| * Address review r3Michael Lingelbach2022-01-15
| |
| * Address review r2Michael Lingelbach2022-01-12
| |
| * Address 'review'Michael Lingelbach2022-01-12
| |
| * feat(extmarks): add strict optionMichael Lingelbach2022-01-08
| | | | | | | | | | | | | | | | | | The strict option, when set to false, allows placing extmarks on invalid row and column values greater than the maximum buffer row or line column respectively. This allows for nvim_buf_set_extmark to be a drop-in replacement for nvim_buf_set_highlight.
* | vim-patch:8.2.4095: sed script not recognized by the first line (#17101)Christian Clason2022-01-15
| | | | | | | | | | Problem: Sed script not recognized by the first line. Solution: Recognize a sed script starting with "#n". (Doug Kearns) https://github.com/vim/vim/commit/e3ce17a3ca838954728df21ccb6c2a724490203d
* | feat(lsp): dynamically generate list title in response_to_list (#17081)Gregory Anders2022-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives quickfix/location lists created by handlers which use 'response_to_list' (textDocument/documentSymbols and workspace/symbol by default) the ability to set a more useful list title. This commit gives lists created for documentSymbols a title of the form: Symbols in <filename> and lists for workspace/symbol a title of the form: Symbols matching '<query>' These are more informative than a standard "Language Server" list title and can help disambiguate results when users have multiple quickfix lists that they cycle through with `:colder` and `:cnewer`.
* | fix(filetype): expand tildes in filetype patterns (#17091)Gregory Anders2022-01-14
| | | | | | | | | | | | | | This allows patterns like ["~/.config/foo"] = "fooscript" to work.
* | Merge pull request #16998 from zeertzjq/lua-vim-var-funcrefbfredl2022-01-14
|\ \ | | | | | | feat(api, lua): more conversions between LuaRef and Vim Funcref
| * | feat(api, lua): more conversions between LuaRef and Vim Funcrefzeertzjq2022-01-13
| | |
* | | fix(lsp): always split text edits on \r, \r\n, and \n (#17087)Michael Lingelbach2022-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes: https://github.com/neovim/neovim/issues/17053 Servers can return a mix of line endings per the language server protocol. See: https://microsoft.github.io/language-server-protocol/specification.html#textDocuments All should be equally treated as line endings.
* | | Merge pull request #17086 from zeertzjq/vim-8.1.2375James McCoy2022-01-13
|\ \ \ | | | | | | | | vim-patch:8.1.2375: no suffucient testing for registers
| * | | vim-patch:8.1.2375: no suffucient testing for registerszeertzjq2022-01-14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No suffucient testing for registers. Solution: Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5296) Fix that "p" on last virtual column of tab inserts spaces. https://github.com/vim/vim/commit/6f1f0ca3edf395102ff3109c998d81300c8be3c9 This patch doesn't actually change any behavior in Nvim, because Nvim always has vartabs feature. I modified a line in the test because of #6137.
* | | Merge pull request #16978 from gpanders/filetype-updatesGregory Anders2022-01-13
|\ \ \
| * | | fix(filetype): fix foam pattern detectionGregory Anders2022-01-13
| | | |
| * | | feat(filetype.lua): fix .cc file not detectedrhcher2022-01-13
| | | |
| * | | feat(filetype.lua): add support for files under .gitSanchayan Maity2022-01-13
| | | |
| * | | feat(filetype.lua): add support for patch filesSanchayan Maity2022-01-13
| | | |
| * | | feat(filetype.lua): add support for tmux.conf filesGary Sentosa2022-01-13
| | | |
| * | | feat(filetype.lua): fix .env file not detectedGary Sentosa2022-01-13
|/ / /
* | | vim-patch:8.2.4077: not all Libsensors files are recognized (#17080)Christian Clason2022-01-13
| | | | | | | | | | | | | | | Problem: Not all Libsensors files are recognized. Solution: Add "sensors.d/*" pattern. (Doug Kearns) https://github.com/vim/vim/commit/8d9e470aa91a93da7d6bda62521aef69a79e956d