| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reverts parts of https://github.com/neovim/neovim/pull/27674
LSP snippets typically do include tabs or spaces to add extra
indentation and don't rely on the client using `autoindent`
functionality.
For example:
public static void main(String[] args) {\n\t${0}\n}
Notice the `\t` after `{\n`
Adding spaces or tabs independent of that breaks snippets for languages
like Haskell where you can have snippets like:
${1:name} :: ${2}\n${1:name} ${3}= ${0:undefined}
To generate:
name ::
name = undefined
|
| |
| |
| |
| |
| | |
Problem: when line is blank link then there will got an invalid column number in math.min compare.
Solution: make sure the min column number is 0 not an illegal number.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
runtime(doc): clarify syntax vs matching mechanism
fixes: vim/vim#14643
https://github.com/vim/vim/commit/fe1e2b5e2d65f05d820f17db935b15454a63be06
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- crn for rename
- crr for code actions
- gr for references
- <C-S> (in Insert mode) for signature help
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
vim.iter has both `rfind()` and various `*back()` methods, which work
in "reverse" or "backwards" order. It's inconsistent to have both kinds
of names, and "back" is fairly uncommon (rust) compared to python
(rfind, rstrip, rsplit, …).
Solution:
- Remove `nthback()` and let `nth()` take a negative index.
- Because `rnth()` looks pretty obscure, and because it's intuitive
for a function named `nth()` to take negative indexes.
- Rename `xxback()` methods to `rxx()`.
- This informally groups the "list-iterator" functions under a common
`r` prefix, which helps discoverability.
- Rename `peekback()` to `pop()`, in duality with the existing `peek`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes regression introduced in #28030
If an LSP server is restarted, then the associated `nvim_buf_attach`
call will not detach if no buffer changes are sent between the client
stopping and a new one being created. This leads to `nvim_buf_attach`
being called multiple times for the same buffer, which then leads to
changetracking sending duplicate requests to the server (one per
attach).
To solve this, introduce separate tracking (client agnostic) on which
buffers have had calls to `nvim_buf_attach`.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vim.notify cannot be suppressed and it is not always necessary to
display a visible warning to the user if the RPC process fails to start.
For instance, a user may have the same LSP configuration across systems,
some of which may not have all of the LSP server executables installed.
In that case, the user receives a notification every time a file is
opened that they cannot suppress.
Instead of using vim.notify in vim.lsp.rpc, propagate a normal error up
through the call stack and use vim.notify in vim.lsp.start() only if
the "silent" option is not set.
This also updates lsp.start_client() to return an error message as its
second return value if an error occurred, rather than calling vim.notify
directly. Callers of lsp.start_client() will need to update call sites
appropriately if they wish to report errors to the user (or even better,
switch to vim.lsp.start).
|
| | |
|
| |
| |
| |
| |
| |
| | |
`handle:write(msg)` can fail if the socket is not yet connected to the
server.
Should address https://github.com/neovim/neovim/pull/28398#issuecomment-2078152491
|
| |
| |
| |
| |
| | |
When the "severity" option is nil, vim.diagnostic.goto_next() and
vim.diagnostic.goto_prev() jump to the next diagnostic with the highest
severity.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`vim.ui.open` unnecessarily invents a different success/failure
convention. Its return type was changed in 57adf8c6e01d, so we might as
well change it to have a more conventional form.
Solution:
Change the signature to use the `pcall` convention of `status, result`.
|
| |
| |
| |
| |
| |
| | |
vim.fs.root() is a function for finding a project root relative to a
buffer using one or more "root markers". This is useful for LSP and
could be useful for other "projects" designs, as well as for any plugins
which work with a "projects" concept.
|
| |
| |
| |
| |
| |
| | |
Instead of adding all diagnostics matching lnum filters to a table, and
then copying that table to another table while applying the severity
filter, this changes the flow to only add diagnostics matching both
filters in the first pass.
|
| |
| |
| |
| | |
Both methods had pretty much the same documentation and shared the
implementation.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: `vim.deprecate()` can be relatively significantly slower than
the deprecated function in "Nvim" plugin.
Solution: Optimize checks for "Nvim" plugin. This also results into not
distinguishing "xxx-dev" and "xxx" versions when doing checks, which
is essentially covered by the deprecation logic itself.
With this rewrite I get the times from #28459: `{ 0.024827, 0.003797, 0.002024, 0.001774, 0.001703 }`.
For quicker reference:
- On current Nightly it is something like `{ 3.72243, 0.918169, 0.968143, 0.763256, 0.783424 }`.
- On 0.9.5: `{ 0.002955, 0.000361, 0.000281, 0.000251, 0.00019 }`.
|
| |
| |
| |
| |
| |
| |
| |
| | |
#28273
Problem:
vim.diagnostic.get(…,{lnum=…}) does not match multi-line diagnostics.
Solution: add end_lnum support.
|
| |
| |
| |
| |
| | |
Problem: when diagnostic have a range of line, open_float not work.
Solution: filter diagnostic by line number range.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: ondir files are not recognized
Solution: Detect '.ondirrc' as ondir filetype
(Jon Parise)
closes: vim/vim#14604
https://github.com/vim/vim/commit/ea999037a41292b3d3e00700a87a82fe5d2c12b2
Co-authored-by: Jon Parise <jon@indelible.org>
|
| | |
|
| |
| |
| | |
forgot some changes in 9912a4c81b0856200f44a38e99d38eae44cef5c9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ref https://github.com/neovim/neovim/issues/19596
FAILED test/functional/plugin/health_spec.lua @ 37: :checkhealth completions can be listed via getcompletion()
test/functional/plugin/health_spec.lua:40: Expected objects to be the same.
Passed in:
(string) 'provider.node'
Expected:
(string) 'provider.clipboard'
stack traceback:
test/functional/plugin/health_spec.lua:40: in function <test/functional/plugin/health_spec.lua:37>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Besides being redundant with vim.iter():flatten(), `tbl_flatten` has
these problems:
- Has `tbl_` prefix but only accepts lists.
- Discards some results! Compare the following:
- iter.flatten():
```
vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable()
```
- tbl_flatten:
```
vim.tbl_flatten({1, { { a = 2 } }, { 3 } })
```
Solution:
Deprecate tbl_flatten.
Note:
iter:flatten() currently fails ("flatten() requires a list-like table")
on this code from gen_lsp.lua:
local anonym = vim.iter({ -- remove nil
anonymous_num > 1 and '' or nil,
'---@class ' .. anonymous_classname,
}):flatten():totable()
Should we enhance :flatten() to work for arrays?
|
| |
| |
| |
| |
| |
| |
| | |
tbl_isarray was not released yet, so it will not go through
a deprecation cycle.
ref #24572
|
| |
| |
| |
| | |
ref #24572
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
While the fold level computation is incremental, the evaluation of the
foldexpr is done on the full buffer. Despite that the foldexpr reads
from the cache, it can take tens of milliseconds for moderately big (10K
lines) buffers.
Solution:
Track the range of lines on which the foldexpr should be evaluated.
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
explorer.exe is unreliable on WSL.
Solution:
Try wslview before explorer.exe.
fix #28410
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: flake.lock files are not recognized
Solution: Detect 'flake.lock' as json filetype
(Riley Bruins)
closes: vim/vim#14589
https://github.com/vim/vim/commit/ce736033ae86e14e8b1a56a3e4843c7ab24e48d2
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The use-case for the convenience functions vim.iter.map(),
vim.iter.filter(), vim.iter.totable() is not clear.
Solution:
Drop them for now. We can revisit after 0.10 release.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: runtime(uci): No support for uci file types
(Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
(Colin Caine)
closes: vim/vim#14575
https://github.com/vim/vim/commit/4b3fab14dbde971f15d8783e9ef125b19fdbc829
Co-authored-by: Colin Caine <complaints@cmcaine.co.uk>
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
We need to establish a pattern for `enable()`.
Solution:
- First `enable()` parameter is always `enable:boolean`.
- Update `vim.diagnostic.enable()`
- Update `vim.lsp.inlay_hint.enable()`.
- It was not released yet, so no deprecation is needed. But to help
HEAD users, it will show an informative error.
- vim.deprecate():
- Improve message when the "removal version" is a *current or older* version.
|
| |
| |
| | |
See discussion in https://github.com/neovim/neovim/pull/26850
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`vim.fs.normalize` does not resolve `.` and `..` components. This makes
no sense as the entire point of normalization is to remove redundancy
from the path. The path normalization functions in several other
languages (Java, Python, C++, etc.) also resolve `.` and `..`
components.
Reference:
- Python: https://docs.python.org/3/library/os.path.html#os.path.normpath
- Java: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html#normalize--
- C++: https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal
Solution:
Resolve "." and ".." in `vim.fs.normalize`.
Before:
"~/foo/bar/../baz/./" => "~/foo/bar/../baz/."
After:
"~/foo/bar/../baz/./" => "~/foo/baz"
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The order of the validation performed by vim.validate() is
unpredictable.
- harder to write reliable tests.
- confusing UX because validation result might return different errors randomly.
Solution:
Iterate the input using `vim.spairs()`.
Future:
Ideally, the caller could provide an "ordered dict".
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
vim.diagnostic.enable() does not match the signature of vim.lsp.inlay_hint.enable()
Solution:
- Change the signature so that the first 2 args are (bufnr, enable).
- Introduce a 3rd `opts` arg.
- Currently it only supports `opts.ns_id`.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem:
`vim.diagnostic.is_disabled` and `vim.diagnostic.disable` are unnecessary
and inconsistent with the "toggle" pattern (established starting with
`vim.lsp.inlay_hint`, see https://github.com/neovim/neovim/pull/25512#pullrequestreview-1676750276
As a reminder, the rationale is:
- we always need `enable()`
- we always end up needing `is_enabled()`
- "toggle" can be achieved via `enable(not is_enabled())`
- therefore,
- `toggle()` and `disable()` are redundant
- `is_disabled()` is a needless inconsistency
Solution:
- Introduce `vim.diagnostic.is_enabled`, and `vim.diagnostic.enable(…, enable:boolean)`
- Note: Future improvement would be to add an `enable()` overload `enable(enable:boolean, opts: table)`.
- Deprecate `vim.diagnostic.is_disabled`, `vim.diagnostic.disable`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#28360)
Problem: filetype: some requirements files are not recognized
Solution: Detect '*-requirements.txt', 'constraints.txt',
'requirements.in', 'requirements/*.txt' and 'requires/*.txt'
as requirements filetype, include pip compiler, include
requirements filetype and syntax plugin
(Wu, Zhenyu, @raimon49)
closes: vim/vim#14379
https://github.com/vim/vim/commit/f9f5424d3e75bbdb35aa48fa6f9241d9479b35e8
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: raimon <raimon49@hotmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
vim-patch:9.1.0325: filetype: CMakeCache.txt files not recognized
Problem: filetype: CMakeCache.txt files not recognized
Solution: Detect 'CMakeCache.txt' files as cmakecache filetype,
include basic syntax script for cmakecache
(Wu, Zhenyu, @bfrg)
closes: vim/vim#14384
https://github.com/vim/vim/commit/62c09e032c6b2d49fffac726300d142381924b98
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: bfrg <bfrg@users.noreply.github.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: filetype: some json files are not recognized
Solution: Detect '.jscsrc' and '.vsconfig' as jsonc filetype
(Wu, Zhenyu)
See:
- https://github.com/microsoft/PowerToys/blob/main/.vsconfig
- https://jscs-dev.github.io/
closes: vim/vim#14452
https://github.com/vim/vim/commit/c59a8648b2d8b3e17f12cd45f74a31b1aa385d2d
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: filetype: cabal config files may not be recognized
Solution: Change filetype pattern to '*/{,.}cabal/config'
(Wu Zhenyu)
closes: vim/vim#14498
https://github.com/vim/vim/commit/799dedec0e959d7a18df8a06d497770706d1627c
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: some mail tools not recognized
Solution: Detect '.mbsncrc' as conf, '.msmtprc' as msmtp
and '.notmuch-config' as ini filetype
(Shane-XB-Qian)
closes: vim/vim#14533
https://github.com/vim/vim/commit/a7a9a476cf388f89286216188b8c8ae10702d9e2
Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
|