aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* | | | | Merge pull request #16460 from dundargoc/chore/typosBjörn Linse2021-11-30
|\ \ \ \ \ | | | | | | | | | | | | chore: fix typos
| * | | | | docs(lsp): do not use nvim_command for Vimscript examplesGregory Anders2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The examples are relevant and applicable for both Lua and Vimscript configurations and the `vim.api.nvim_command` prefixes just add noise that doesn't contribute to the example.
| * | | | | docs(lsp): do not use | as argument separatorGregory Anders2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | This translates into a tag in the help doc.
| * | | | | docs(lsp): add annotations for private functionsGregory Anders2021-11-30
| | | | | |
| * | | | | chore: fix typosii142021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: ii14 <ii14@users.noreply.github.com>
* | | | | | feat(lsp): add 'focus' option to open_floating_preview (#16465)Gregory Anders2021-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the 'focusable' and 'focus_id' parameters are set, `open_floating_preview` assumes that it should always move focus to an existing floating window with the same 'focus_id'. However, there are cases where we want to make a floating window focusable, but do not want to focus it upon calling `open_floating_preview`. To distinguish these cases, add a boolean parameter 'focus' that, when false, prevents moving focus.
* | | | | | fix(lsp): do not attempt to index nil client in progress handler (#16463)Michael Lingelbach2021-11-29
| | | | | |
* | | | | | docs: regenerate (#16461)github-actions[bot]2021-11-28
| | | | | |
* | | | | | feat(diagnostic): use `scope = 'line'` by default for `open_float()` (#16456)cbarrete2021-11-28
|/ / / / / | | | | | | | | | | | | | | | | | | | | Closes #16453 Co-authored-by: Cédric Barreteau <cbarrete@users.noreply.github.com>
* | | | | Merge pull request #16452 from clason/vim-8.2.3685Christian Clason2021-11-28
|\ \ \ \ \ | | | | | | | | | | | | vim-patch:8.2.{3451,3458,3452,3685,3686}: some filetypes are not recognized correctly
| * | | | | vim-patch:8.2.3686: filetype detection often mixes up Forth and F#Christian Clason2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Filetype detection often mixes up Forth and F#. Solution: Add a function to inspect the file contents. (Doug Kearns) https://github.com/vim/vim/commit/3d14c0f2b964195d08b34bb43f89ec5f99255194
| * | | | | vim-patch:8.2.3451: not all apache files are recognizedChristian Clason2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not all apache files are recognized. Solution: Adjust the filetype pattern. (Zdenek Dohnal, closes vim/vim#8882) https://github.com/vim/vim/commit/770ddbe1595f6dab836304203d5ca2e0b069266f
| * | | | | vim-patch:8.2.3458: not all dictdconf files are recognizedChristian Clason2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not all dictdconf files are recognized. Solution: Adjust the pattern. (Doug Kearns) https://github.com/vim/vim/commit/be01090efad242e30728275dea05420db6f96257
| * | | | | vim-patch:8.2.3452: MPD files are not recognizedChristian Clason2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: MPD files are not recognized. Solution: Recognize MPD files as XML. (Steven Penny, closes vim/vim#8893) https://github.com/vim/vim/commit/690c524ce6629f9ff67728541ba211f831caf0ee
| * | | | | vim-patch:8.2.3685: Visual studio project files are not recognizedChristian Clason2021-11-27
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | Problem: Visual studio project files are not recognized. Solution: Use the xml file type. (Doug Kearns) https://github.com/vim/vim/commit/c07f11e42fc2eac5e750bf05aa3030f9b02a22ca
* | | | | fix(diagnostic): make set() go through cache when calling show()Gregory Anders2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `vim.diagnostic.set()` is called, the diagnostics passed to it are added to the diagnostic cache. `set()` then calls `show()` and passes those diagnostics along exactly as they were given to `set()`. However, we sometimes want to do some kind of post-processing on diagnostics when they come out of the cache, e.g. clamping line numbers. By forwarding the diagnostics to `show()` verbatim, `set()` skips this post-processing which can cause other bugs downstream. Instead of passing the diagnostics directly, make the `show()` call from within `set()` retrieve diagnostics from the cache. In general, all diagnostics operations should follow the pattern of "producers put things in the cache" and "consumers get things out of the cache" and this change better adheres to that pattern.
* | | | | vim-patch:6304be625ce4 (#16450)Christian Clason2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update runtime files. https://github.com/vim/vim/commit/6304be625ce44dcfedc6735164d0b853578581c8 skip doc/sign.txt (needs 8.2.3664)
* | | | | docs: regenerate (#16390)github-actions[bot]2021-11-27
| | | | | | | | | | | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
* | | | | chore: fix typos (#16361)dundargoc2021-11-27
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com> Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
* | | | 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
* | | | 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.
| * | | | 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(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
* | | | vim-patch:88a4205f1cfb (#16399)Christian Clason2021-11-22
| |/ / |/| | | | | | | | Update runtime files https://github.com/vim/vim/commit/88a4205f1cfbdc328e987ab00521fc8a22447fc3
* | | 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().
* | | 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.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
* | | | 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
| | | | |
| * | | | fix(diagnostic): deepcopy diagnostics before clamping line numbersGregory Anders2021-11-19
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current 'clamp_line_numbers' implementation modifies diagnostics in place, which can have adverse downstream side effects. Before clamping line numbers, make a copy of the diagnostic. This commit also merges the 'clamp_line_numbers' method into a new 'get_diagnostics' local function which also implements the more general "get" method. The public 'vim.diagnostic.get()' API now just uses this function (without clamping). This has the added benefit that other internal API functions that need to use get() no longer have to go through vim.validate. Finally, reorganize the source code a bit by grouping all of the data structures together near the top of the file.
* | | | fix(lsp): send buffer contents joined on fileformat-specific linebreak (#16334)Dmytro Meleshko2021-11-21
| | | |
* | | | chore(lsp): clean up initialization process (#16369)Michael Lingelbach2021-11-21
|/ / / | | | | | | | | | | | | * send vim.NIL instead of not sending workspaceFolders * read fallback rootPath and rootUri from workspaceFolders * update documentation
* / / docs: regeneratemarvim2021-11-18
|/ /
* | fix(lsp): improve incremental sync robustness (#16358)Michael Lingelbach2021-11-18
| | | | | | | | | | closes https://github.com/neovim/neovim/issues/16352 * improve handling of multi-byte deletions
* | fix(uri): use valid EmmyLua annotations (#16359)Mathias Fußenegger2021-11-18
| | | | | | | | | | | | See: - https://emmylua.github.io/annotations/param.html - https://emmylua.github.io/annotations/return.html