aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* | vim-patch:6e649224926b (#15911)Christian Clason2021-10-05
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/6e649224926bbc1df6a4fdfa7a96b4acb1f8bee0
* | fix(healthcheck): update builtins to the new convention #15914Javier Lopez2021-10-05
| | | | | | Adjust some builtin healthchecks to use Lua, after #15259
* | vim-patch:8.2.3473: some tcl files are not recognized #15912Christian Clason2021-10-05
| | | | | | | | | | Problem: Some files with tcl syntax are not recognized. Solution: Add a few file patterns. (Doug Kearns) https://github.com/vim/vim/commit/78aa5ffe314f40d33666f03b833f66b11c3d0f67
* | Merge pull request #15259 from muniter/muniter/checkhealth-from-luaMatthieu Coudron2021-10-05
|\ \ | | | | | | feat(checkhealth): support Lua healthchecks
| * | docs(runtime/health): update with new lua supportJavier López2021-10-04
| | | | | | | | | | | | | | | | | | - describe how the lua support works - explain new behavior of :checkhealth * - fixed formatting to use tab instead of spaces
| * | feat(runtime/health): support lua healthchecksJavier López2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Refactor health.vim to discover lua healthcheck in the runtime directories lua/**/health{/init}.lua - Support healthchecks for lua submodules e.g :checkhealth vim.lsp and also support wildcard "*" at the end for all submodules :checkhealth vim* - Refactor health.vim to use variable scope instead of output capturing - Create health.lua module to wrap report functions and future extensibility. - Move away from searching just in the runtimepath, use `nvim_get_runtime_file` due to #15632 Example: Plugin linter in rtp can declare it's checkhealts in lua module `lua/linter/health{/init}.lua` that returns a table with a method "check" that when executed calls the report functions provided by the builtin lua module require("health"). The plugin also has a submodule `/lua/linter/providers` in which it defines `/lua/linter/providers/health{/init}.lua` This plugin healthcheck can now be run by the ex command: `:checkhealth linter linter.providers` Also calling all submodules can be done by: `:checkhealth linter* And "linter" and "linter.provider" would be discovered when: `:checkhealth`
* | | docs(develop.txt): nvim_open_win is now in win_config.c (#15909)zeertzjq2021-10-04
| | |
* | | docs: fix typoAditya Kurdunkar2021-10-04
|/ /
* | feat(startup): load builtin plugins with --clean #15893Gregory Anders2021-10-04
| | | | | | Closes #15605
* | refactor: define diagnostic highlights in syntax.cGregory Anders2021-10-03
| |
* | Merge #15218 from gpanders/split-trimemptyJustin M. Keyes2021-10-03
|\ \ | | | | | | feat(lua): add "noempty" param to vim.split()
| * | refactor: use kwargs parameter in vim.splitGregory Anders2021-09-25
| | |
| * | feat: add trimempty optional parameter to vim.splitGregory Anders2021-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `split()` VimL function trims empty items from the returned list by default, so that, e.g. split("\nhello\nworld\n\n", "\n") returns ["hello", "world"] The Lua implementation of vim.split does not do this. For example, vim.split("\nhello\nworld\n\n", "\n") returns {'', 'hello', 'world', '', ''} Add an optional parameter to the vim.split function that, when true, trims these empty elements from the front and back of the returned table. This is only possible for vim.split and not vim.gsplit; because vim.gsplit is an iterator, there is no way for it to know if the current item is the last non-empty item. Note that in order to preserve backward compatibility, the parameter for the Lua vim.split function is `trimempty`, while the VimL function uses `keepempty` (i.e. they are opposites). This means there is a disconnect between these two functions that may surprise users.
* | | vim-patch:8.2.3469: some files with json syntax are not recognized (#15891)dundargoc2021-10-03
| |/ |/| | | | | | | Problem: Some files with json syntax are not recognized. Solution: Add a few file patterns. (Emiliano Ruiz Carletti, closes vim/vim#8947) https://github.com/vim/vim/commit/50c56893423eb6ad2154a4151e67f7097f52efb6
* | vim-patch:8.2.3466: completion submode not indicated for virtual replace ↵zeertzjq2021-10-03
| | | | | | | | | | | | | | (#15886) Problem: Completion submode not indicated for virtual replace. Solution: Add submode to "Rv". (closes vim/vim#8945) https://github.com/vim/vim/commit/cc8cd4453332276d55b4a1109eace5785a4f319d
* | vim-patch:8.2.3465: cannot detect insert scroll mode (#15885)zeertzjq2021-10-03
| | | | | | | | | | Problem: Cannot detect insert scroll mode. Solution: Add "scroll" to complete_info(). (closes vim/vim#8943) https://github.com/vim/vim/commit/27fef59dd1dd75f50c366f7f616ffa4451560452
* | vim-patch:8.2.3464: nginx files are not recognized (#15883)Christian Clason2021-10-03
| | | | | | | | | | Problem: nginx files are not recognized. Solution: Add several file patterns. (Chris Aumann, closes vim/vim#8922) https://github.com/vim/vim/commit/8b8c0ed657fabd88e610401ca8a12366f987db94
* | Merge pull request #15786 from gpanders/diagnostic-signs-unique-severityGregory Anders2021-10-02
|\ \
| * | refactor(diagnostics): always make 'set' go through 'show'Gregory Anders2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always make calls to `vim.diagnostic.set` call `vim.diagnostic.show`. This creates an easier to reason about code path and is also less surprising when users wish to override override `vim.diagnostic.show` with custom behavior and `vim.diagnostic.set` is called with empty diagnostics. Functionally, the end result is the same: when `show` is called with an empty diagnostics list, it just calls `hide` and then returns, which is exactly what `reset` does right now.
| * | docs(diagnostic): add blurb on how to replace builtin handlersGregory Anders2021-10-02
| | |
* | | docs(lsp): clarify parameters of some util functions (#15851)zeertzjq2021-10-02
| | | | | | | | | | | | `pad_left` and `pad_right` are unused List used keys of `opts` in `make_floating_popup_options`
* | | fix(float)!: always anchor to corner of window including border #15832zeertzjq2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the window (including border). This line may also need change in this case (change 0 to -1): This is most consistent and easiest to reason about, especially with GUIs whose border do not need to have width/height of 1/1 in cell units. Fix #15789
* | | docs: remove obsolete text on language #15875dundargoc2021-10-02
|/ /
* | feat(diagnostics): add vim.diagnostic.get_namespaces (#15866)Michael Lingelbach2021-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many vim.diagnostic functions expect the user to pass in a namespace id. This PR allows the user to list active diagnostic namespaces: ```lua :lua print(vim.inspect(vim.diagnostic.get_namespaces())) { [7] = { name = "vim.lsp.client-1", opts = {}, sign_group = "vim.diagnostic.vim.lsp.client-1" } } ```
* | docs(diagnostics): add "priority" option to signs table (#15860)Gregory Anders2021-10-01
| | | | | | | | This feature was added in #15785, but the docs for vim.diagnostic.config() weren't updated.
* | docs: add 'plus one' to correct getmousepos docsDaniel Steinberg2021-09-29
| | | | | | | | | | This change was applied to Vim as part of 90df4b9. https://github.com/vim/vim/commit/90df4b9d423485f7db16e3a65cab4f14edc815ae
* | chore: remove empty lineDaniel Steinberg2021-09-29
| | | | | | | | | | | | This update was part of vim-patch:4c29502. https://github.com/vim/vim/commit/4c295027a426986566cd7a76c47a6d3a529727e7 The other parts of that patch were applied to Neovim in ad6bb38.
* | vim-patch:8.1.2304: cannot get the mouse position when getting a mouse clickDaniel Steinberg2021-09-29
| | | | | | | | | | | | Problem: Cannot get the mouse position when getting a mouse click. Solution: Add getmousepos(). https://github.com/vim/vim/commit/db3a205147ce2c335d5c2181c1f789277f8775b0
* | feat(lsp): add codeAction/resolve support (#15818)Mathias Fußenegger2021-09-28
| | | | | | Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
* | feat(lsp): add client command support to codelens (#15820)Mathias Fußenegger2021-09-28
| | | | | | | | Also adds a check against the server capabilities to fix https://github.com/neovim/neovim/issues/15183
* | refactor(lsp): remove json encode/decode wrappers (#15826)Mathias Fußenegger2021-09-28
| |
* | fix(ui): s/format_entry/format_item to match docs (#15819)Mathias Fußenegger2021-09-27
| | | | | | Follow up to https://github.com/neovim/neovim/pull/15771
* | feat(ui): add vim.ui.select and use in code actions (#15771)Mathias Fußenegger2021-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Continuation of https://github.com/neovim/neovim/pull/15202 A plugin like telescope could override it with a fancy implementation and then users would get the telescope-ui within each plugin that utilizes the vim.ui.select function. There are some plugins which override the `textDocument/codeAction` handler solely to provide a different UI. With custom client commands and soon codeAction resolve support, it becomes more difficult to implement the handler right - so having a dedicated way to override the picking function will be useful.
* | fix(lsp): avoid serializing boolean as key (#15810)Michael Lingelbach2021-09-27
| | | | | | | | | | | | In vim.lsp.buf.references, the key vim.type_idx (which evaluates to a boolean) was set to equal vim.types.dictionary. This resulted in a boolean key in json which is not allowed by the json spec, and which lua-cjson fails to serialize.
* | refactor(diagnostic): use sign priority for severity_sort #15785Gregory Anders2021-09-26
| | | | | | | | | | | | | | Rather than relying on the order in which signs are placed to dictate the order in which they are displayed, explicitly set the priority of the sign according to the severity of the diagnostic and the value of severity_sort. If severity_sort is false or unset then all signs use the same priority.
* | feat(lsp): allow subset of CodeActionContext as arg to code_action methods ↵Mathias Fußenegger2021-09-26
| | | | | | | | | | | | | | | | | | (#15793) This makes it easier to filter the code actions. For example: vim.lsp.buf.code_action { only = 'refactor' }
* | feat(lsp): use cjson for lsp rpc (#15759)Michael Lingelbach2021-09-26
|/
* Merge #15731 vim-patch:7.4.725,8.2.{0597,0598,0924,1035}Justin M. Keyes2021-09-24
|\ | | | | fixes #14581
| * vim-patch:8.2.0924: cannot save and restore a register properlySean Dewar2021-09-23
| | | | | | | | | | | | | | | | | | | | | | Problem: Cannot save and restore a register properly. Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy Massimino, closes vim/vim#3370) https://github.com/vim/vim/commit/bb861e293e0170455184079fa537278754b07911 Cherry-pick eval.txt changes for getreginfo() from: https://github.com/vim/vim/commit/6aa57295cfbe8f21c15f0671e45fd53cf990d404 https://github.com/vim/vim/commit/207f009326c8f878defde0e594d7d9ed9860106e
* | fix(lsp): guard textDocument/codeAction command logic #15769Chris Kipp2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Error executing vim.schedule lua callback: ...ovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/buf.lua:502: command: expected string, got nil stack traceback: ...ovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/buf.lua:502: in function 'execute_command' ...HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/handlers.lua:151: in function <...HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/handlers.lua:113> ...ovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp/buf.lua:465: in function 'callback' ...r/neovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp.lua:1325: in function 'handler' ...r/neovim/HEAD-aba3979/share/nvim/runtime/lua/vim/lsp.lua:899: in function 'cb' vim.lua:281: in function <vim.lua:281> Solution: This is a follow-up to the work done in https://github.com/neovim/neovim/commit/6c03601e3adb4c3c4d47f148df8df20401b88677. There are valid situations where a `textDocument/codeAction` is returned without a command, since a command in optional. For example from Metals, the Scala language server when you get a code action to add a missing import, it looks like this: ```json Result: [ { "title": "Import \u0027Instant\u0027 from package \u0027java.time\u0027", "kind": "quickfix", "diagnostics": [ { "range": { "start": { "line": 6, "character": 10 }, "end": { "line": 6, "character": 17 } }, "severity": 1, "source": "bloop", "message": "not found: value Instant" } ], "edit": { "changes": { "file:///Users/ckipp/Documents/scala-workspace/sanity/src/main/scala/Thing.scala": [ { "range": { "start": { "line": 6, "character": 10 }, "end": { "line": 6, "character": 17 } }, "newText": "Instant" }, { "range": { "start": { "line": 1, "character": 0 }, "end": { "line": 1, "character": 0 } }, "newText": "\nimport java.time.Instant\n" } ] } } } ] ``` This change just wraps the logic that grabs the command in a conditional to skip it if there is no command.
* | fix(diagnostic): check for nil in show_diagnostics (#15772)Gregory Anders2021-09-23
| |
* | fix(diagnostic): don't return nil when callers expect a table (#15765)Gregory Anders2021-09-23
| | | | | | | | | | | | diagnostic_lines() returns a table, so make the early exit condition an empty table rather than 'nil'. This way, functions that use the input from diagnostic_lines don't have to do a bunch of defensive nil checking and can always assume they're operating on a table.
* | doc(dev_style.txt): misc updatesJustin M. Keyes2021-09-23
| |
* | doc: convert neovim style guide to vim doc.Dundar Göc2021-09-23
|/
* feat(diagnostic): allow customized diagnostic messages (#15742)Gregory Anders2021-09-22
| | | | Provide a 'format' option for virtual text and floating window previews that allows the displayed text of a diagnostic to be customized.
* Merge pull request #14115 from mfussenegger/lsp-commandsMichael Lingelbach2021-09-22
|\ | | | | lsp: Add a registry for client side code action commands
| * feat(lsp): add a registry for client side code action commandsMathias Fussenegger2021-09-20
| | | | | | | | | | This builds on https://github.com/neovim/neovim/pull/14112 and closes https://github.com/neovim/neovim/issues/12326
| * feat(lsp): include original request params in handler ctxMathias Fussenegger2021-09-20
| | | | | | | | | | | | | | | | | | | | | | This is mostly motivated by https://github.com/neovim/neovim/issues/12326 Client side commands might need to access the original request parameters. Currently this is already possible by using closures with `vim.lsp.buf_request`, but the global handlers so far couldn't access the request parameters.
* | vim-patch:34cc7d8c034f #15753Christian Clason2021-09-22
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/34cc7d8c034f2bc5b57455577051db8d72e2b87c
* | refactor(diagnostic): remove get_virt_text_chunks()Gregory Anders2021-09-21
| | | | | | | | | | | | | | | | | | This function isn't compatible with including diagnostic sources when "source" is "if_many" since it only has access to diagnostics for a single line. Rather than having an inconsistent or incomplete interface, make this function private. It is still exported as part of the module for backward compatibility with vim.lsp.diagnostics, but it can eventually be made into a local function.