| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Not everything needs to be crazy overconfigurable.
Also fixes a warning in latest clang which didn't approve of
the funky math switch statement in append_arg_number
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PROBLEM: The builtin python3 provider cannot auto-detect python3.12
when g:python3_host_prog is not set. As a result, when python3 on $PATH
is currently python 3.12, neovim will fail to load python3 provider
and result in `has("python3") == 0`, e.g.,
"Failed to load python3 host. You can try to see what happened by ..."
ROOT CAUSE: the `system()` call from `provider#pythonx#DetectByModule`
does not ignore python warnings, and `pkgutil.get_loader` will print
a warning message in the very first line:
```
<string>:1: DeprecationWarning: 'pkgutil.get_loader' is deprecated and
slated for removal in Python 3.14; use importlib.util.find_spec() instead
```
SOLUTION:
- Use `importlib.util.find_spec` instead (python >= 3.4)
- Use `-W ignore` option to prevent any potential warning messages
|
|\
| |
| | |
docs: add more context to vim.schedule_wrap
|
| |
| |
| |
| |
| | |
Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721
and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove the usage of the term "defer" to avoid confusion with
`vim.defer_fn`, which also calls `vim.schedule_wrap` internally.
- Explicitly state that `vim.schedule_wrap` returns a function in the
text.
- Mention that arguments are passed along.
- Include a usage example.
- Rename param to `fn`.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is incorrect in the following scenario:
1. The language tree is Lua > Vim > Lua.
2. An edit simultaneously wipes out the `_regions` of all nodes, while
taking the Vim injection off-screen.
3. The Vim injection is not re-parsed, so the child Lua `_regions` is
still `nil`.
4. The child Lua is assumed, incorrectly, to occupy the whole document.
5. This causes the injections to be parsed again, resulting in Lua > Vim
> Lua > Vim.
6. Now, by the same process, Vim ends up with its range assumed over the
whole document. Now the parse is broken and results in broken
highlighting and poor performance.
It should be fine to instead treat an unparsed node as occupying
nothing (i.e. effectively non-existent). Since, either:
- The parent was just parsed, hence defining `_regions`
- The parent was not just parsed, in which case this node doesn't need
to be parsed either.
Also, the name `has_regions` is confusing; it seems to simply
mean the opposite of "root" or "full_document". However, this PR does
not touch it.
|
| |
| |
| |
| | |
- Don't complete when there is pending input.
- Use vim.list_contains() instead of vim.tbl_contains().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #24339
rust-analyzer sends "Invalid offset" error in such cases. Some other
servers handle it specially.
LSP spec mentions that "A range is comparable to a selection in an
editor". Most editors don't handle trailing newlines the same way
Neovim/Vim does, it's clearly visible if it's present or not. With that
in mind it's understandable why sending end position as simply the start
of the line after the last one is considered invalid in such cases.
|
| |
| |
| | |
Also fix incorrect parameters in on_detach callback.
|
|/
|
|
|
| |
runtime(doc): format jumplist examples more consistently (vim/vim#13137)
https://github.com/vim/vim/commit/a7aba6ca5033a85839d997d29d5ca88a1f2acf8f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: not possible to use the jumplist like a stack
Solution: Add the 'jumpoptions' setting to make the jumplist
a stack.
Add an option for using jumplist like tag stack
related: vim/vim#7738
closes: vim/vim#13134
ported from NeoVim:
- https://neovim.io/doc/user/motion.html#jumplist-stack
- neovim/neovim@39094b3
- https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior
Based on the feedback in the previous PR, it looks like many people like
this option.
https://github.com/vim/vim/commit/87018255e3ad0f4dfa03e20318836d24af721caf
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
patch 9.0.1918: No filetype detection for Authzed filetypes
Problem: No filetype detection for Authzed filetypes
Solution: Detect the *.zed file extension as authzed filetype
closes: vim/vim#13129
https://github.com/vim/vim/commit/5790a54166793554d16f6a85d8824632860b8b37
Co-authored-by: Matt Polzin <mpolzin@workwithopal.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Memoizes a function, using a custom function to hash the arguments.
Private for now until:
- There are other places in the codebase that could benefit from this
(e.g. LSP), but might require other changes to accommodate.
- Invalidation of the cache needs to be controllable. Using weak tables
is an acceptable invalidation policy, but it shouldn't be the only
one.
- I don't think the story around `hash_fn` is completely thought out. We
may be able to have a good default hash_fn by hashing each argument,
so basically a better 'concat'.
|
|
|
|
| |
fix #24699
fix #25253
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: r_CTRL-C works differently in visual mode
Solution: Make r_CTRL-C behave consistent in visual mode
in terminal and Windows GUI
in visual mode, r CTRL-C behaves strange in Unix like environments. It
seems to end visual mode, but still is waiting for few more chars,
however it never seems to replace it by any characters and eventually
just returns back into normal mode.
In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area
all characters by a literal CTRL-C.
Not sure why it behaves like this. It seems in the Windows GUI, got_int
is not set and therefore behaves as if any other normal character has
been pressed.
So remove the special casing of what happens when got_int is set and
make it always behave like in Windows GUI mode. Add a test to verify it
always behaves like replacing in the selected area each selected
character by a literal CTRL-C.
closes: vim/vim#13091
closes: vim/vim#13112
https://github.com/vim/vim/commit/476733f3d06876c7ac105e064108c973a57984d3
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
|
| |
|
|\
| |
| | |
refactor(grid): change schar_T representation to be more compact
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, a screen cell would occupy 28+4=32 bytes per cell
as we always made space for up to MAX_MCO+1 codepoints in a cell.
As an example, even a pretty modest 50*80 screen would consume
50*80*2*32 = 256000, i e a quarter megabyte
With the factor of two due to the TUI side buffer, and even more when
using msg_grid and/or ext_multigrid.
This instead stores a 4-byte union of either:
- a valid UTF-8 sequence up to 4 bytes
- an escape char which is invalid UTF-8 (0xFF) plus a 24-bit index to a
glyph cache
This avoids allocating space for huge composed glyphs _upfront_, while
still keeping rendering such glyphs reasonably fast (1 hash table lookup
+ one plain index lookup). If the same large glyphs are using repeatedly
on the screen, this is still a net reduction of memory/cache
consumption. The only case which really gets worse is if you blast
the screen full with crazy emojis and zalgo text and even this case
only leads to 4 extra bytes per char.
When only <= 4-byte glyphs are used, plus the 4-byte attribute code,
i e 8 bytes in total there is a factor of four reduction of memory use.
Memory which will be quite hot in cache as the screen buffer is scanned
over in win_line() buffer text drawing
A slight complication is that the representation depends on host byte
order. I've tested this manually by compling and running this
in qemu-s390x and it works fine. We might add a qemu based solution
to CI at some point.
|
|\ \
| | |
| | | |
fix(float): add fixed option
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
runtime(doc): add help tag describing object-selection
closes: vim/vim#13114
https://github.com/vim/vim/commit/346ac1429c5afb23bace295106aea1b305443435
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
runtime(netrw): fix filetype detection for remote editing files
closes: vim/vim#12990
closes: vim/vim#12992
this partially reverses commit 71badf9 by commenting out the line that
intentionally sets the filetype to an empty string.
https://github.com/vim/vim/commit/d8b86c937a419db69239a8bb879f0050be0f8e1d
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
runtime(kotlin): Add Kotlin runtime files (vim/vim#13110)
Closes udalov/kotlin-vimvim/vim#39
https://github.com/vim/vim/commit/e30d8e4ce01dc1aca95d25be9fd27c09855fd4be
Co-authored-by: dkearns <dougkearns@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: No support for liquidsoap filetypes
Solution: Add liquidsoap filetype detection code
closes: vim/vim#13111
https://github.com/vim/vim/commit/6b5efcdd8e976d2ab2554b22c4220c5e88de4717
Co-authored-by: Romain Beauxis <toots@rastageeks.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
With incremental injection parsing, injected languages' parsers parse
only the relevant regions and stores the result in _trees with the index
of the corresponding region. Therefore, there can be holes in _trees.
Solution:
* Use generic table functions where appropriate.
* Fix type annotations and docs.
|
| |
| |
| | |
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
|
| |
| |
| |
| | |
N-Jim does not sounds like "Ninja", and the joke doesn't really land.
|
| |
| |
| | |
Also reformat tutor.tutor.json to use 2-space indent while at it.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
It doesn't make much sense to flatten each region (= list of ranges).
This coincidentally worked for region with a single range.
Solution:
Custom function for combining regions.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem
---
If a highlighter query returns a significant number of predicate
non-matches, the highlighter will scan well past the end of the window.
Solution
---
In the iterator returned from `iter_captures`, accept an optional
parameter `end_line`. If no parameter provided, the behavior is
unchanged, hence this is a non-invasive tweak.
Fixes: #25113 nvim-treesitter/nvim-treesitter#5057
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`resolve_lang` is applied to `@injection.language` when it's supplied as a
capture:
https://github.com/neovim/neovim/blob/f5953edbac14febce9d4f8a3c35bdec1eae26fbe/runtime/lua/vim/treesitter/languagetree.lua#L766-L768
If we want to support `metadata['injection.language']` (as per #22518 and
[tree-sitter upstream](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection))
then the behavior should be consistent.
Fixes: nvim-treesitter/nvim-treesitter#4918
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
runtime(forth): Fix :unlet error in ftplugin (vim/vim#13090)
Fixes vim/vim#13089.
https://github.com/vim/vim/commit/c1f8bb37c6a8e0babc2a41f16860763b57c23fa1
Co-authored-by: dkearns <dougkearns@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
* refactor(treesitter): remove duplicated diagnostic code
* fixup!: fix type errors
* fixup!: add type namespace
|
| |
| |
| |
| |
| |
| | |
"Edit" more closely describes the generic application than "Preview", though
the buffer contents don't (yet) map to an actual file on disk.
https://github.com/neovim/neovim/pull/24703#discussion_r1321719133
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The name for_each_child is misleading and caused bugs.
After #25111, #25115, there are no more usages of `for_each_child` in Nvim.
In the future if we want to restore this functionality we can consider a
generalized vim.traverse(node, key, visitor) function.
|
| |
| |
| |
| | |
Fixes: #24531
|
|/
|
| |
Closes https://github.com/neovim/neovim/issues/19838
|
|
|
|
|
|
|
| |
Co-authored-by: nuid64 <lvkuzvesov@proton.me>
Co-authored-by: Mike Smith <10135646+mikesmithgh@users.noreply.github.com>
Co-authored-by: XTY <xty@xty.io>
Co-authored-by: Empa <emanuel@empa.xyz>
Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(swayconfig): improve syntax highlighting (vim/vim#13060)
* syntax(swayconfig): improved highlighting
* syntax(swayconfig): adapt to i3config structure
https://github.com/vim/vim/commit/8b2457a3819826d90ad2b1677d213d9f924ec6c0
Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
runtime(rust): sync rust runtime files with upstream (vim/vim#13075)
https://github.com/vim/vim/commit/fc93594d562dbbd9da03c89754538f91efd0c7ca
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(i3config): syntax structure cleanup (vim/vim#13080)
* syntax(i3config): improved i3config highlighting
* syntax(i3config): refactor structure
https://github.com/vim/vim/commit/f5356bf6751fc1af77c8d27c7286639527fde3f2
Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
|
|
|
|
|
|
| |
Support Markdown code blocks in addition to <pre> blocks in Doxygen doc
comments.
Update doc comments in iter.lua as a test.
|