| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: famiu <famiuhaque@protonmail.com>
|
| |
| |
| | |
This is a small function but used a lot in some plugins.
|
| |
| |
| |
| |
| |
| |
| | |
Some LSP servers (tailwindcss, rome) are known to request registration
for `workspace/didChangeWatchedFiles` even when the corresponding client
capability does not advertise support. This change adds an extra check
in the `client/registerCapability` handler not to start a watch unless
the client capability is set appropriately.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Json lines files are not recognized.
Solution: Add a pattern to detect "jsonl" files. (issue vim/vim#7520)
https://github.com/vim/vim/commit/6fadbc1e8c1f4c5b03eb6a78aeb023ca2c2a9a7d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| | |
Ref nvim-treesitter/nvim-treesitter#4748
|
| |
| |
| |
| |
| |
| | |
- Add bindings to Treesitter ts_parser_set_logger and ts_parser_logger
- Add logfile with path STDPATH('log')/treesitter.c
- Rework existing LanguageTree loggin to use logfile
- Begin implementing log levels for vim.g.__ts_debug
|
| |
| |
| | |
Fixes #20419
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: HiPhish <hiphish@posteo.de>
Co-authored-by: Julio B <julio.bacel@gmail.com>
Co-authored-by: T727 <74924917+T-727@users.noreply.github.com>
Co-authored-by: camoz <camoz@users.noreply.github.com>
Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: USD filetype is not recognized.
Solution: Add patterns for USD filetype. (Colin Kennedy, closes vim/vim#12370)
https://github.com/vim/vim/commit/b848ce6b7e27f24aff47a4d63933e0f96663acfe
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Problem: Typst filetype is not recognized.
Solution: Distinguish between sql and typst. (Gaetan Lepage, closes vim/vim#12363)
https://github.com/vim/vim/commit/4ce1bda869e4ec0152d7dcbe1e491ceac5341d5e
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current behaviour of `:Man` is to only work with "number" sections.
This is caused by wrong assumptions about man sections naming.
Also, there was similar assumption about length of section dirs
in `paths` variable.
fixes #23485
Signed-off-by: Vadim Misbakh-Soloviov <git@mva.name>
|
| |
| |
| |
| |
| | |
feat(lua): add hl priority opts on_yank
Signed-off-by: marcoSven <me@marcosven.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
responses (#23484)
perf(lsp): load buffer contents once when processing semantic token responses
Using _get_line_byte_from_position() for each token's boundaries was a
pretty huge bottleneck, since that function would load individual buffer
lines via nvim_buf_get_lines() (plus a lot of extra overhead). So each
token caused two calls to nvim_buf_get_lines() (once for the start
position, and once for the end position).
For semantic tokens, we only attach to buffers that have already been
loaded, so we can safely just get all the lines for the entire buffer at
once, and lift the rest of the _get_line_byte_from_position()
implementation directly while bypassing the part that loads the buffer
line.
While I was looking at get_lines (used by _get_line_byte_from_position),
I noticed that we were checking for non-file URIs before we even looked
to see if we already had the buffer loaded. Moving the buffer-loaded
check to be the first thing done in get_lines() more than halved the
average time spent transforming the token list into highlight ranges vs
when it was still using _get_line_byte_from_position. I ended up
improving that loop more by not using get_lines, but figured the
performance improvement it provided was worth leaving in.
|
| | |
|
| | |
|
| |
| |
| | |
Fixes #23423
|
| |
| |
| | |
Some small general fixes found working on developing async parsing.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Luau files are not recognized.
Solution: Add a patter for Luau files. (Amaan Qureshi, closes vim/vim#12317)
https://github.com/vim/vim/commit/2dcfe9ae1df61e1249520ed435dd8cf60e157103
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
|
| |
| |
| |
| | |
5ms (#23375)
|
| |
| |
| |
| |
| |
| | |
When injections are added or removed make sure to:
- invoke 'changedtree' callbacks for when new trees are added.
- invoke 'changedtree' callbacks for when trees are invalidated
- redraw regions when languagetree children are removed
|
| |
| |
| | |
and set by default in `ftplugin/query.lua`
|
| |\
| | |
| | | |
Add vim.iter benchmark to benchmark test suite
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Packing and unpacking return values impairs performance considerably.
In an attempt to avoid creating tables as much as possible we can
instead pass return values between functions (which does not require
knowing the number of values a function might return). This makes the
code more complex, but improves benchmark numbers non-trivially.
|
| |/
| |
| |
| | |
Co-authored-by: clason <clason@users.noreply.github.com>
Co-authored-by: lewis6991 <lewis6991@users.noreply.github.com>
|
| | |
|
| |\
| | |
| | | |
Create iter_spec and vim.iter module
|
| | |
| | |
| | |
| | | |
vim.iter is now both a function and a module (similar to vim.version).
|
| |/
| |
| |
| |
| |
| | |
Using nvim_replace_termcodes is too verbose, add vim.keycode for
translating keycodes.
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* vim-patch:9.0.1478: filetypes for *.v files not detected properly
Problem: Filetypes for *.v files not detected properly.
Solution: Use the file contents to detect the filetype. (Turiiya,
closes vim/vim#12281)
https://github.com/vim/vim/commit/80406c26188219f3773b2e9c49160caeeb386ee2
Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com>
Co-authored-by: Jonas Strittmatter <40792180+smjonas@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Busted configuration files are not recognized.
Solution: Recognize busted configuration files as Lua. (Craig MacEachern,
closes vim/vim#12209)
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
| | |
|
| |
| |
| |
| |
| | |
This is a more robust method for tagging a packed table as it completely
eliminates the possibility of mistaking an actual table key as the
packed table tag.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`vim.split('a:::', ':', {trimempty=true})` trims inner empty items.
Regression from 9c49c1047079427ff0a2356cb37302934845108e
Solution:
Set `empty_start=false` when first non-empty item is found.
close #23212
|
| |
| |
| |
| |
| |
| |
| | |
(#23209)
fix(treesitter playground): wrong range of a node displayed in playground
The call parameters order of the function `get_range_str` is flipped for the last two arguments compared to the declaration.
|
| |\
| | |
| | | |
fix(iter): allow table values in iterator pipelines
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was originally meant as a convenience but prevents possible
functionality. For example:
-- Get the keys of the table with even values
local t = { a = 1, b = 2, c = 3, d = 4 }
vim.iter(t):map(function(k, v)
if v % 2 == 0 then return k end
end):totable()
The example above would not work, because the map() function returns
only a single value, and cannot be converted back into a table (there
are many such examples like this).
Instead, to convert an iterator into a map-like table, users can use
fold():
vim.iter(t):fold({}, function(t, k, v)
t[k] = v
return t
end)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If pack() is called with a single value, it does not create a table; it
simply returns the value it is passed. When unpack is called with a
table argument, it interprets that table as a list of values that were
packed together into a table.
This causes a problem when the single value being packed is _itself_ a
table. pack() will not place it into another table, but unpack() sees
the table argument and tries to unpack it.
To fix this, we add a simple "tag" to packed table values so that
unpack() only attempts to unpack tables that have this tag. Other tables
are left alone. The tag is simply the length of the table.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Jenkinsfiles are not recognized as groovy.
Solution: Add a pattern for Jenkinsfiles. (closes vim/vim#12236)
https://github.com/vim/vim/commit/142ffb024dd5123090c2fd02f55702e76520f1df
Co-authored-by: dundargoc <gocdundar@gmail.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Strace filetype detection is expensive.
Solution: Match with a cheap pattern first. (Federico Mengozzi,
closes vim/vim#12220)
https://github.com/vim/vim/commit/6e5a9f948221b52caaaf106079cb3430c4dd7c77
Co-authored-by: Federico Mengozzi <19249682+fedemengo@users.noreply.github.com>
|
| |
| |
| |
| |
| | |
vim.iter wraps a table or iterator function into an `Iter` object with
methods such as `filter`, `map`, and `fold` which can be chained to
produce iterator pipelines that do not create new tables at each step.
|
| | |
|
| |
| |
| |
| | |
- vim.diagnostic.config() now accepts a function for the virtual_text.prefix
option, which allows for rendering e.g., diagnostic severities differently.
|