| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| | |
Update runtime files
https://github.com/vim/vim/commit/6e649224926bbc1df6a4fdfa7a96b4acb1f8bee0
|
| |
| |
| | |
Adjust some builtin healthchecks to use Lua, after #15259
|
| |
| |
| |
| |
| | |
Problem: Some files with tcl syntax are not recognized.
Solution: Add a few file patterns. (Doug Kearns)
https://github.com/vim/vim/commit/78aa5ffe314f40d33666f03b833f66b11c3d0f67
|
|\ \
| | |
| | | |
feat(checkhealth): support Lua healthchecks
|
| | |
| | |
| | |
| | |
| | |
| | | |
- describe how the lua support works
- explain new behavior of :checkhealth *
- fixed formatting to use tab instead of spaces
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- 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`
|
| | | |
|
|/ / |
|
| |
| |
| | |
Closes #15605
|
| | |
|
|\ \
| | |
| | | |
feat(lua): add "noempty" param to vim.split()
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
|/|
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
(#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
|
| |
| |
| |
| |
| | |
Problem: Cannot detect insert scroll mode.
Solution: Add "scroll" to complete_info(). (closes vim/vim#8943)
https://github.com/vim/vim/commit/27fef59dd1dd75f50c366f7f616ffa4451560452
|
| |
| |
| |
| |
| | |
Problem: nginx files are not recognized.
Solution: Add several file patterns. (Chris Aumann, closes vim/vim#8922)
https://github.com/vim/vim/commit/8b8c0ed657fabd88e610401ca8a12366f987db94
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | | |
`pad_left` and `pad_right` are unused
List used keys of `opts` in `make_floating_popup_options`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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"
}
}
```
|
| |
| |
| |
| | |
This feature was added in #15785, but the docs for
vim.diagnostic.config() weren't updated.
|
| |
| |
| |
| |
| | |
This change was applied to Vim as part of 90df4b9.
https://github.com/vim/vim/commit/90df4b9d423485f7db16e3a65cab4f14edc815ae
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Problem: Cannot get the mouse position when getting a mouse click.
Solution: Add getmousepos().
https://github.com/vim/vim/commit/db3a205147ce2c335d5c2181c1f789277f8775b0
|
| |
| |
| | |
Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
|
| |
| |
| |
| | |
Also adds a check against the server capabilities to fix
https://github.com/neovim/neovim/issues/15183
|
| | |
|
| |
| |
| | |
Follow up to https://github.com/neovim/neovim/pull/15771
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#15793)
This makes it easier to filter the code actions. For example:
vim.lsp.buf.code_action { only = 'refactor' }
|
|/ |
|
|\
| |
| | |
fixes #14581
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
|
|
|
| |
Provide a 'format' option for virtual text and floating window previews
that allows the displayed text of a diagnostic to be customized.
|
|\
| |
| | |
lsp: Add a registry for client side code action commands
|
| |
| |
| |
| |
| | |
This builds on https://github.com/neovim/neovim/pull/14112 and closes
https://github.com/neovim/neovim/issues/12326
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Update runtime files
https://github.com/vim/vim/commit/34cc7d8c034f2bc5b57455577051db8d72e2b87c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|