| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: notmuch configs are not recognised
Solution: Detect more notmuch profile configuration files
as dosini filetype (Julio B)
Reference:
https://notmuchmail.org/doc/latest/man1/notmuch-config.html#configuration
closes: vim/vim#15744
https://github.com/vim/vim/commit/1a2870b57aa832500d59c17c8225a64c2b4aa619
Co-authored-by: Julio B <julio.bacel@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
EditQuery shows swapfile ATTENTION, but this buffer is not intended for
preservation (and the dialog breaks the UX).
Solution:
Set 'noswapfile' on the buffer before renaming it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
checkhealth report sections are not visually separated.
Solution:
Highlight with "reverse".
TODO: migrate checkhealth filetype to use treesitter.
TODO: default :help should also highlight headings more boldy!
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: No way to get prompt for input()/confirm()
Solution: add getcmdprompt() function (Shougo Matsushita)
(Shougo Matsushita)
closes: vim/vim#15667
https://github.com/vim/vim/commit/6908428560a0d6ae27bf7af6fcb6dc362e31926c
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** `is_ancestor()` uses a slow, bottom-up parent lookup which
has performance pitfalls detailed in #28512.
**Solution:** Take `is_ancestor()` from $O(n^2)$ to $O(n)$ by
incorporating the use of the `child_containing_descendant()` function
|
| |
| |
| | |
fix(diagnostic): correct severity type on setqflist, setloclist
|
| | |
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
Co-authored-by: Ananth Bhaskararaman <antsub@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this PR, the behavior of nvim_paste is:
- When vim.paste() returns false, return false to the client, but treat
following chunks normally (i.e. rely on the client cancelling the
paste as expected).
- When vim.paste() throws an error, still return true to the client, but
drain the following chunks in the stream without calling vim.paste().
There are two problems with such behavior:
- When vim.paste() errors, the client is still supposed to send the
remaining chunks of the stream, even though they do nothing.
- Having different code paths for two uncommon but similar situations
complicates maintenance.
This PR makes both the cancel case and the error case return false to
the client and drain the remaining chunks of the stream, which, apart
from sharing the same code path, is beneficial whether the client checks
the return value of nvim_paste or not:
- If the client checks the return value, it can avoid sending the
following chunks needlessly after an error.
- If the client doesn't check the return value, chunks following a
cancelled chunk won't be pasted on the server regardless, which leads
to less confusing behavior.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
fnamemodify with the :r flag will not strip extensions if the filename
starts with a ".". This means that files named ".in" could cause an
infinite loop.
Solution:
Add early return if the filename was not changed
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the api_info() output:
:new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val')
...
{'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1}
The `ArrayOf(Integer, 2)` return type didn't break clients when we added
it, which is evidence that clients don't use the `return_type` field,
thus renaming Dictionary => Dict in api_info() is not (in practice)
a breaking change.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`vim.fs.dirname([[C:\User\XXX\AppData\Local]])` returns "." on
mingw/msys2.
Solution:
- Check for "mingw" when deciding `iswin`.
- Use `has("win32")` where possible, it works in "fast" contexts since
b02eeb6a7281df0561a021d7ae595c84be9a01be.
|
| |
| |
| |
| | |
Analogous to the shell `rm` command.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: tests: Test_filetype_detection() fails (after 9.1.0738)
Solution: Add missing filetype detect patterns for *.SYSx and *.MODx
https://github.com/vim/vim/commit/a0c14ef310acac62276b4ee51930d3246b11772e
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: rapid files are not recognized
Solution: detect '*.sysx' and '*.modx' as rapid filetype
(KnoP-01)
closes: vim/vim#15669
https://github.com/vim/vim/commit/fdcb08264d6e8525a07b29c14863adc6ead83913
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** Top-level anonymous nodes are not being checked by the
query linter
**Solution:** Check them by adding them to the top-level query
This commit also moves a table construction out of the match iterator so
it is run less frequently.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Node.js provider (optional) ~
- ERROR Failed to run healthcheck for "provider.node" plugin. Exception:
…/runtime/lua/provider/node/health.lua:9: attempt to call field 'provider_disabled' (a nil value)
Perl provider (optional) ~
- ERROR Failed to run healthcheck for "provider.perl" plugin. Exception:
…/runtime/lua/provider/perl/health.lua:8: attempt to call field 'provider_disabled' (a nil value)
Python 3 provider (optional) ~
- ERROR Failed to run healthcheck for "provider.python" plugin. Exception:
…/runtime/lua/provider/python/health.lua:226: attempt to call field 'provider_disabled' (a nil value)
Ruby provider (optional) ~
- ERROR Failed to run healthcheck for "provider.ruby" plugin. Exception:
…/runtime/lua/provider/ruby/health.lua:9: attempt to call field 'provider_disabled' (a nil value)
Solution:
Add these files to the runtime sanity check.
fix #29302
|
| |
| |
| | |
Follow-up to #29347
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: salt files are not recognized
Solution: Detect '*.sls' files as filetype salt,
include a syntax script (Gregory Anders)
closes: vim/vim#15689
https://github.com/vim/vim/commit/89b9bb4ac8ceb701ebecb8c02aca3d047dff9991
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: jinja files are not recognized
Solution: detect '*.jinja' files a jinja filetype,
include jinja syntax script (Gregory Anders)
related: vim/vim#15689
https://github.com/vim/vim/commit/202c467bb37b894ada6377d3f2621c103f324757
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
User cannot configure the tool used by `vim.ui.open` (or `gx`). With
netrw this was supported by `g:netrw_browsex_viewer`.
Solution:
Introduce `opts.cmd`. Users that want to set this globally can
monkey-patch `vim.ui.open` in the same way described at `:help vim.paste()`.
Fixes https://github.com/neovim/neovim/issues/29488
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: inconsistent case sensitive extension matching
Solution: unify case sensitive extension matching (Evgeni Chasnovski).
There are different approaches of how extensions are matched with
respect to case sensitivity. In particular, '\c' flag is used in pattern
whereas in most places case sensitive matching is guarded behind
`has("fname_case")` condition.
Replace all instances of '\c' with an explicit case sensitive pattern
variants guarded by `has("fname_case")`. Strictly speaking, this is a
breaking change because only two (most common and prevailingly tested)
variants are now matched: upper first letter and upper all letters.
closes: vim/vim#15672
https://github.com/vim/vim/commit/59b089c9df238ce940b3c593295bc511e201399a
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The LSP omnifunc can insert nil bytes, which when read in other places
(like semantic token) could cause an error:
semantic_tokens.lua:304: Vim:E976: Using a Blob as a String
Solution:
Use `#line` instead of `vim.fn.strlen(line)`. Both return UTF-8 bytes
but the latter can't handle nil bytes.
Completion candidates can currently insert nil bytes, if other parts of
Alternative fix to https://github.com/neovim/neovim/pull/30359
Note that https://github.com/neovim/neovim/pull/30315 will avoid the
insertion of nil bytes from the LSP omnifunc, but the change of this PR
can more easily be backported.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** `vim.treesitter.get_parser` will throw an error if no parser
can be found.
- This means the caller is responsible for wrapping it in a `pcall`,
which is easy to forget
- It also makes it slightly harder to potentially memoize `get_parser`
in the future
- It's a bit unintuitive since many other `get_*` style functions
conventionally return `nil` if no object is found (e.g. `get_node`,
`get_lang`, `query.get`, etc.)
**Solution:** Return `nil` if no parser can be found or created
- This requires a function signature change, and some new assertions in
places where the parser will always (or should always) be found.
- This commit starts by making this change internally, since it is
breaking. Eventually it will be rolled out to the public API.
|
| |
| |
| |
| |
| | |
Ensure that the function `pick_call_hierarchy_item` correctly handles
the case where `call_hierarchy_items` is nil or an empty table. This
prevents potential errors when the function is called with no items.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: swiftinterface files are not recognized
Solution: Detect '*.swiftinterface' files as swift filetype
(LosFarmosCTL)
closes: vim/vim#15658
https://github.com/vim/vim/commit/03cac4b70d819148f4b4404701b8f331a3af0fb6
Co-authored-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com>
|
| | |
|
| |
| |
| |
| |
| | |
Problem: buffer mabye not valid when callback handler invoke.
Soliton: check buffer is valid and loaded in handler.
|
| |
| |
| | |
`path2name()` function doesn't process `'pluginname/health/init.lua'` correctly. Instead of retruning `'pluginname'` it returns `'pluginname.health'`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
search()-functions (#30337)
related: vim/vim#15657
related: vim/vim#15404
https://github.com/vim/vim/commit/d657d3d8fd635dbd78402358788dc58a96d04117
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
str_utfindex_enc could return an error if the index was longer than the
line length. This was handled in each of the calls to it individually
Solution:
* Fix the call at the source level so that if the index is higher than
the line length, utf length is returned
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: vim.tbl_deep_extend had an undocumented feature where arrays
(integer-indexed tables) were not merged but compared literally (used
for merging default and user config, where one list should overwrite the
other completely). Turns out this behavior was relied on in quite a
number of plugins (even though it wasn't a robust solution even for that
use case, since lists of tables (e.g., plugin specs) can be array-like
as well).
Solution: Revert the removal of this special feature. Check for
list-like (contiguous integer indices) instead, as this is closer to the
intent. Document this behavior.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
str_byteindex_enc could return an error if the index was longer than the
lline length. This was handled in each of the calls to it individually
Solution:
* Fix the call at the source level so that if the index is higher than
the line length, line length is returned as per LSP specification
* Remove pcalls on str_byteindex_enc calls. No longer needed now that
str_byteindex_enc has a bounds check.
|
| |
| |
| |
| | |
xdg-open is usually not installed in WSL. But if the user deliberately
installs it, presumably they want to prioritize it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in
text matched by 'formatlistpat' (John M Devin)
Solution: Use the width of the match text (zeertzjq)
fixes: vim/vim#15634
closes: vim/vim#15635
https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c
|
| |
| |
| |
| | |
- Use the popup to expose more features such as LSP and gx.
- Move the copy/paste items lower in the menu, they are lower priority.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
LSP spec [states](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position)
that "if the character value is greater than the line length it defaults
back to the line length", but `locations_to_items` fails in that case.
Solution:
Adjust locations_to_items to follow the spec.
closes #28281
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- The exclusion of lists was never justified in the commit history and is
the wrong thing to do for a function that deals with tables.
- Move the error checks out of the recursive path.
Fixes #23654
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Updated the `rpc.connect` function to support connecting to LSP servers
using hostnames, not just IP addresses. This change includes updates to
the documentation and additional test cases to verify the new
functionality.
- Modified `connect` function to resolve hostnames.
- Updated documentation to reflect the change.
- Added test case for connecting using hostname.
Added a TCP echo server utility function to the LSP test suite. This
server echoes the first message it receives and is used in tests to
verify LSP server connections via both IP address and hostname.
Refactored existing tests to use the new utility function.
|
| |
| |
| |
| |
| |
| | |
"localhost" would work if we used
[tcp_connect](https://github.com/luvit/luv/blob/ae0387742b460bc89ebddce33214ad65fffddba2/examples/echo-server-client.lua#L42),
but that will require changes to
[vim.lsp.rpc.connect](https://github.com/neovim/neovim/blob/318c0415d5b10b44fee4afa06994734f1beb7e71/runtime/lua/vim/lsp/rpc.lua#L638).
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For context, see https://github.com/neovim/neovim/pull/24738. Before
that PR, Nvim did not correctly handle captures with quantifiers. That
PR made the correct behavior opt-in to minimize breaking changes, with
the intention that the correct behavior would eventually become the
default. Users can still opt-in to the old (incorrect) behavior for now,
but this option will eventually be removed completely.
BREAKING CHANGE: Any plugin which uses `Query:iter_matches()` must
update their call sites to expect an array of nodes in the `match`
table, rather than a single node.
|
| |
| |
| | |
Fixes: #30220
|
| | |
|