aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* | | | | Merge pull request #17095 from zeertzjq/vim-8.2.3227bfredl2022-01-27
|\ \ \ \ \ | | | | | | | | | | | | vim-patch:8.2.{3227,3280,4094}: global-local 'virtualedit'
| * | | | | vim-patch:8.2.3280: 'virtualedit' local to buffer is not the best solutionzeertzjq2022-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'virtualedit' local to buffer is not the best solution. Solution: Make it window-local. (Gary Johnson, closes vim/vim#8685) https://github.com/vim/vim/commit/51ad850f5fbafa7aa3f60affa74ec9c9f992c6cc
| * | | | | vim-patch:8.2.3227: 'virtualedit' can only be set globallyzeertzjq2022-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'virtualedit' can only be set globally. Solution: Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638) https://github.com/vim/vim/commit/53ba05b09075f14227f9be831a22ed16f7cc26b2 I changed some macros to unsigned integer literals to avoid compiler warnings.
* | | | | | vim-patch:8.2.4196: various file types not recognized (#17182)dundargoc2022-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Various file types not recognized. Solution: Add patterns to recognize more file types (closes vim/vim#9607) https://github.com/vim/vim/commit/428058ab3213e81531cbd7989f4267870f35d52e
* | | | | | Merge pull request #17156 from zeertzjq/vim-8.2.3584bfredl2022-01-23
|\ \ \ \ \ \ | | | | | | | | | | | | | | vim-patch:8.2.{3584,3586,3587}: :command "-keepscript" argument
| * | | | | | vim-patch:8.2.3584: "verbose set efm" reports location of the :compiler commandzeertzjq2022-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "verbose set efm" reports the location of the :compiler command. (Gary Johnson) Solution: Add the "-keepscript" argument to :command and use it when defining CompilerSet. https://github.com/vim/vim/commit/58ef8a31d7087d495ab1582be5b7a22796ac2451
* | | | | | | vim-patch:6f4754b9f725 (#17179)Christian Clason2022-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/6f4754b9f7253d7e4ba527064a24aff1acdb1e8f
* | | | | | | vim-patch:8.2.4188: not all gitconfig files are recognized (#17178)Christian Clason2022-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not all gitconfig files are recognized. Solution: Add a few more patterns. (Tim Pope, closes vim/vim#9597) https://github.com/vim/vim/commit/bcfa11b7dfdfbb4d412dd843a6da3fce68ba2e39
* | | | | | | vim-patch:8.2.4191: json5 files are not recognized (#17180)dundargoc2022-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: json5 files are not recognized. Solution: Add a pattern for json5 files. (closes vim/vim#9601) https://github.com/vim/vim/commit/e15ebeffb35da4bb7d9054358671735ce6988c28
* | | | | | | vim-patch:8.2.4187: gnuplot file not recognized (#17177)Christian Clason2022-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Gnuplot file not recognized. Solution: Recognize ".gnuplot". (closes vim/vim#9588) https://github.com/vim/vim/commit/ff5cbe8133c6eb5dd86b9e042f32f589627e9bf9
* | | | | | | Merge pull request #16936 from zeertzjq/no-escape-csibfredl2022-01-21
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | input: never escape CSI bytes and clean up related names and comments
| * | | | | | | refactor: remove the <xCSI> keyzeertzjq2022-01-21
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | CSI typed directly is now just <CSI>. The <xCSI> key is obsolete.
* / / / / / / vim-patch:8.2.4172: filetype detection for BASIC is not optimal (#17161)Christian Clason2022-01-21
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Problem: Filetype detection for BASIC is not optimal. Solution: Improve BASIC filetype detection. (Doug Kearns) https://github.com/vim/vim/commit/6517f14165cdebf83a07ab9d4aeeb102b4e16e92
* | | | | | docs(lsp): fix on_publish_diagnostics example (#17146)xnmet2022-01-21
| | | | | |
* | | | | | feat(lsp): add handler for workspace/workspaceFolders (#17149)Michael Lingelbach2022-01-21
| |/ / / / |/| | | |
* | | | | 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.
* | | | | docs: regenerate [skip ci]marvim2022-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
* | | | 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
| | | |
* | | | 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)
* | | | 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.
* | | 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.
* | | 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
* | | fix(lsp): forward offset_encoding in rename handler (#17079)Michael Lingelbach2022-01-13
| | |
* | | fix(lsp): forward offset_encoding to apply_text_edits (#17075)Michael Lingelbach2022-01-13
| | |
* | | fix(lsp): strictly enforce passing offset encoding (#17049)Michael Lingelbach2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the "fallback" to utf-16 in many of our helper functions. We should always explicitly pass these around when possible except in two locations: * generating params with help utilities called by buf.lua functions * the buf.lua functions themselves Anything that is called by the handler should be passed the offset encoding.
* | | fix(lsp): handle negative activeSignature in signatureHelp (#17064)Mathias Fußenegger2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omnisharp-roslyn can send negative values: { activeParameter = 0, activeSignature = -1, signatures = { { documentation = "", label = "TestEntity.TestEntity()", parameters = {} } } } In 3.16 of the specification `activeSignature` is defined as `uinteger` and therefore negative values shouldn't be allowed, but within 3.15 it was defined as `number` which makes me think we can be a bit lenient in this case and handle them. The expected behavior is quite clear: The active signature. If omitted or the value lies outside the range of `signatures` the value defaults to zero or is ignored if the `SignatureHelp` has no signatures. Fixes an error: util.lua:1685: attempt to get length of local 'lines' (a nil value) util.lua:1685: in function 'trim_empty_lines' handlers.lua:334: in function 'textDocument/signatureHelp'
* | | fix(lsp): fix applying multiple out-of-range TextEdits (#17037)hrsh7th2022-01-13
| | |
* | | Merge pull request #16945 from theHamsta/cached-queriesThomas Vigouroux2022-01-13
|\ \ \ | | | | | | | | perf(treesitter): cache query parsing
| * | | perf(treesitter): cache query parsingStephan Seitz2022-01-06
| | | |
* | | | feat(diagnostic): allow retrieving current diagnostic configGregory Anders2022-01-11
| | | |
* | | | fix(diagnostic): only set default handler config if unsetGregory Anders2022-01-11
| | | |
* | | | fix(diagnostic): allow setting arbitrary config valuesGregory Anders2022-01-11
| | | |
* | | | fix(diagnostic): resolve nil opts tablesGregory Anders2022-01-11
| | | | | | | | | | | | | | | | | | | | In functions which allow opts to be optional, ensure that the value actually resolves to a non-nil value.
* | | | vim-patch:8.2.4064: foam files are not detected (#17041)Christian Clason2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vim-patch:8.2.4064: foam files are not detected Problem: Foam files are not detected. Solution: Detect the foam filetype by the path and file contents. (Mohammed Elwardi Fadeli, closes vim/vim#9501) https://github.com/vim/vim/commit/2284f6cca384e0ccc352bfec7277dc26386cac3d * Port foam ft detection to filetype.lua Co-authored-by: Gregory Anders <greg@gpanders.com>
* | | | refactor(lsp): debounce timer per buf and unify with non-debounce (#17016)Mathias Fußenegger2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of the `pending_change` closure in the `changetracking.prepare` was a bit confusing because it has access to `bufnr` and `uri` but it could actually contain pending changes batched for multiple buffers. (We accounted for that by grouping `pending_changes` by a `uri`, but it's not obvious what's going on) This commit changes the approach to do everything per buffer to avoid any ambiguity. It also brings the debounce/no-debounce a bit closer together: The only difference is now whether a timer is used or if it is triggered immediately
* | | | vim-patch:2f0936cb9a2e (#17007)Christian Clason2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | * vim-patch:2f0936cb9a2e Update runtime files https://github.com/vim/vim/commit/2f0936cb9a2eb026acac03e6a8fd0b2a5d97508b
* | | | fix(man.vim): fix search function on some systems (#13709)Will Eccles2022-01-10
| | | | | | | | | | | | | | | | | | | | Fixes man.vim's searching on some systems (namely mandoc) where previously it would not respect the value of b:man_default_sects. It now properly parses man pages on these systems.