| Commit message (Collapse) | Author | Age |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Experimental and subject to future changes.
Add a way to redraw certain elements that are not redrawn while Nvim is waiting
for input, or currently have no API to do so. This API covers all that can be
done with the :redraw* commands, in addition to the following new features:
- Immediately move the cursor to a (non-current) window.
- Target a specific window or buffer to mark for redraw.
- Mark a buffer range for redraw (replaces nvim__buf_redraw_range()).
- Redraw the 'statuscolumn'.
|
| |/
| |
| | |
vim.diagnostic.enable and vim.diagnostic.is_enabled() use the same pattern.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines:
Interface conventions ~
- When accepting a buffer id, etc., 0 means "current buffer", nil means "all
buffers". Likewise for window id, tabpage id, etc.
- Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()|
Solution:
Implement globally enabling inlay hints.
* refactor(lsp): do not rely on `enable` to create autocmds
* refactor(lsp): make `bufstates` a defaulttable
* refactor(lsp): make `bufstate` inherit values from `globalstate`
* feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default
* test(lsp): add basic tests for enable inlay hints for all buffers
* test(lsp): add test cases cover more than one buffer
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: inko files are not recognized
Solution: Detect '*.inko' as ink filetype
(Yorick Peterse)
See:
- https://github.com/inko-lang/inko.vim
- https://inko-lang.org/
closes: vim/vim#14699
https://github.com/vim/vim/commit/a01968448a0bdf04d9e4a822d32732a304849238
Co-authored-by: Yorick Peterse <git@yorickpeterse.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: templ files are not recognized
Solution: Detect '*.templ' files as filetype templ
(Tristan Knight)
See:
- https://github.com/a-h/templ
- https://templ.guide/
closes: vim/vim#14697
https://github.com/vim/vim/commit/54e79157c536c631b2f9b3dfefec30b9b966ed97
Co-authored-by: tris203 <admin@snappeh.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: stylus files not recognized
Solution: Detect '*.styl' and '*.stylus' as stylus filetype,
include indent, filetype and syntax plugin
(Philip H)
closes: vim/vim#14656
https://github.com/vim/vim/commit/2d919d2744a99c9bb9e79984e85b8e8f5ec14c07
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#27131)" (#28585)
This reverts commit 15e77a56b711102fdc123e15b3f37d49bc0b1df1.
Subpriorities were added in https://github.com/neovim/neovim/pull/27131
as a mechanism for enforcing query order when using iter_matches in the
Tree-sitter highlighter. However, iter_matches proved to have too many
complications to use in the highlighter so we eventually reverted back
to using iter_captures (https://github.com/neovim/neovim/pull/27901).
Thus, subpriorities are no longer needed and can be removed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: .out files recognized as tex files
Solution: Do not set an explicit filetype until it is clear what this
should be (shane.xb.qian)
closes: vim/vim#14670
https://github.com/vim/vim/commit/e35478bc9d48189322432248105d3b24e0efb3d0
Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Kbuild files are not recognized.
Solution: Detect Kbuild files as make files.
(Bruno Belanyi)
closes: vim/vim#14676
https://github.com/vim/vim/commit/5cbc9a69e529361e1725f422b8cd6157fe0adc33
Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow-up to #28490
Problem:
The new behaviour of goto_next/prev() of navigating to the next highest
severity doesn't work well when diagnostic providers have different
interpretations of severities. E.g. the user may be blocked from
navigating to a useful LSP warning, due to some linter error.
Solution:
The behaviour of next highest severity is now a hidden option
`_highest = true`. We can revisit how to integrate this behaviour
during the 0.11 cycle.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
nvim_complete_set was added in 5ed55ff14c8b7e346811cb6228bf63fb5106bae9
but needs more bake time.
Solution:
Rename it, mark it as experimental.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Also delete old perl scripts which are not used since 8+ years ago.
fix #23251
fix #27367
ref https://github.com/neovim/neovim/issues/2252#issuecomment-1902662577
Helped-by: Daniel Kongsgaard <dakongsgaard@gmail.com>
Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@proton.me>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Guilherme Soares <guilhermesoares1970@gmail.com>
Co-authored-by: Jannik Buhr <jannik.m.buhr@gmail.com>
Co-authored-by: thomaswuhoileong <72001875+thomaswuhoileong@users.noreply.github.com>
Co-authored-by: tom-anders <13141438+tom-anders@users.noreply.github.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The new LSP "refactor menu" keybinding "crr" is also defined in visual
mode, which overlaps with the builtin "c".
Solution:
Use CTRL-R instead of "crr" for visual mode.
fix #28528
|
| |
| |
| |
| |
| |
| | |
Based on feedback from #28324, pass -H and -I to regular grep
(available on all platforms officially supported by Neovim), and
only pass -uu to ripgrep. This makes :grep ignore binary files by
default in both cases.
|
| |
| |
| |
| | |
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* fix(treesitter): enforce lowercase language names
Problem: On case-insensitive file systems (e.g., macOS), `has_parser`
will return `true` for uppercase aliases, which will then try to inject
the uppercase language unsuccessfully.
Solution: Enforce and assume parser names to be lowercase when
resolving language names.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|