Problem: No indention support when editing bpftrace files.
Solution: Add indention settings based on cindent with custom options.
closes: vim/vim#19030ee3f10af87
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
Problem: filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
new bicep-params and bicep filetype plugin
(Scott McKendry)
The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.
References:
Bicep Language Constants:
- 51392d32ca/src/Bicep.Core/LanguageConstants.cs (L23)
VS Code Extension definition:
- 51392d32ca/src/vscode-bicep/package.json (L47)closes: vim/vim#190264e722fdfdd
Co-authored-by: Scott McKendry <me@scottmckendry.tech>
Problem: 'fsync' option cannot be set per buffer
Solution: Make 'fsync' option global-local
(glepnir)
closes: vim/vim#190194d5b303726
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: When Vim is launched with a UNC directory, netrw treats it as a
relative path and compose it again.
Solution: This is due to `exists("g:netrw_cygwin")` always being true.
We can directly use `g:netrw_cygwin`.
closes: vim/vim#19015538da34ad3
Co-authored-by: tao <2471314@gmail.com>
Problem:
`on_accept` is a bit cumbersome to customize.
Solution:
* Before: users had to override the entire `on_accept` logic for their changes to be applied.
* Now: users can modify the item and return it to apply the modified changes, or return `nil` to fully customize how the changes are applied.
Problem: Changing `src` of already installed plugin currently takes
effect immediately inside `vim.pack.add()` and acts as "delete and
later fresh install". Although more robust, this might lead to
unintentional data loss (since plugin is deleted) if the plugin was
manually modified or the new source is not valid.
Also this introduces unnecessary differentiation between "change
`version`" and "change `src`" of already installed plugin.
Solution: Require an explicit `vim.pack.update()` to change plugin's
source. It is done by conditionally changing `origin` remote of the
Git repo. The effect does not require update confirmation in order to
have new changes fetched from the new `src` right away.
If in the future there are more types of plugins supported (i.e. not
only Git repos), also do extra work (like delete + install) during
`vim.pack.update()`.
Problem: Makefile syntax highlighting incorrectly ends function calls
when encountering ')' inside double or single quoted strings,
causing incorrect highlighting for the remainder of the line.
Solution: Add makeDString and makeSString to the contains list for
makeIdent regions. This allows strings to be recognized inside
variable references and function calls.
fixes: vim/vim#18687closes: vim/vim#18818519dc391d8
Co-authored-by: Beleswar Prasad Padhi <beleswarprasad@gmail.com>
Partially revert 2a33b499a3d7f46dc307234847a6562cef6cf1d8, where all
syn match makeIdent are moved before syn region makeIdent to match $()
(reason: see https://github.com/vim/vim/pull/18403#issuecomment-3341161566)
However this results in https://github.com/vim/vim/issues/18890 ,
because lines like
`$(a) =`
will first start a region search beginning with `$(`
but then the whole target including `)` will be matched by
`syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1`
which leaves the region search for the never-found `)` and let the
region matching overflow.
Same for
`$(a) ::`
`$(a) +=`
The solution is to move those greedy target match back, so they take
priority and prevents region match from happening.
fixes: vim/vim#18890closes: vim/vim#18938aded55463a
Co-authored-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Problem: Comment formatting does not work by default for bpftrace.
Solution: Change default 'formatoptions' similarly as C and many other
languages.
closes: vim/vim#189965e577c7aa8
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
Problem: bpftrace files are not recognized from the hashbang line.
Solution: Add a hashbang check (Stanislaw Gruszka)
closes: vim/vim#18992f2814754c0
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
Problem:
VimEnter clears foldinfo, so register_cbs is called again after
VimEnter. The duplicate parser callbacks break incremental fold
computation.
Solution:
Check if the callbacks are already registered.
Problem: vim.keymap.del has 'modes' as it's first argument while vim.keymap.set
has 'mode' as it's first argument despite both 'mode' and 'modes' taking in the
same type input of String or String[].
Solution: Updated vim.keymap.set docs to refer to it's first argument
as 'modes'.
Problem: Outdated query files in `runtimepath` can trigger errors
which are hard to diagnose.
Solution: Add section to `:check treesitter` that lists all query
files in `runtimepath`, sorted by language and query type. Files
are listed in `runtimepath` order so that the first of multiple entry
is typically the one that is used.
Note: Unlike the `nvim-treesitter` health check, this does not try
to parse the queries so will not flag incompatible ones (which would
be much more expensive).
Chapter 2: Fix missing "R" after 1e3e1ba067c79a when using register from insert
mode. While at it, consistently use upper case letter for CTRL-R in the
new-tutor.
related: vim/vim#18950757b42ab07
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: gcc.vim interprets "make: *** [Makefile" in the error message
"make: *** [Makefile:2: all] Error 1" as a valid filename.
Solution: Add pattern to extract the filename correctly. Note that this
doesn't remove the dangling "]" from the output ("all]").
closes: vim/vim#18956bd5e882a91
Problem:
The q keymap is already set in open_floating_preview, so maparg('q') is not empty.
Solution:
Add a health.style check before setting the q keymap.
Problem: When fuzzy is enabled and the prefix is not empty,
items are not sorted by fuzzy score before calling fn.complete.
Solution: Use matchfuzzypos to get the scores and sort the items
by fuzzy score before calling fn.complete.
By simplifying the way range is supported, we can fix a couple issues as
well as making it less complex and more efficient:
* For non-range LSP servers, don't send requests on WinScrolled. The
semantic tokens module has been reworked to only send one active
request at a time, as it was before range support was added. If range
is not supported, then send_request() only fires if there's been a
change to the buffer's document version.
* Cache the server's support of range and delta requests when attaching
to a buffer to save the lookup on each request.
* Range requests always use the visible window, so just use that for the
`range` param when sending requests when range is supported by the
server. This reduces the API surface area of send_request().
* Debounce the WinScrolled autocmd requests in the same the way requests
are debounced when the buffer contents are changing. Should allow
scrolling via mouse wheel or holding down "j" or "k" work a bit
smoother.
The previous iteration of range support allowed multiple active requests
to be in progress simultaneously. However, a bug was preventing any but
the most recent request to actually apply to the client's highlighting
state so that complexity was unused. It was effectively only using one
active request at a time but was just using range requests on
WinScrolled events instead of a full (or delta) request when the
document version changed.
Problem:
- Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
claims to be a "data-only" plugin, in fact it still provides some
user-facing commands because they haven't been upstreamed to Nvim.
Solution:
- Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp
restart`, `:lsp start` and `:lsp stop` respectively.
Co-authored-by: glepnir <glephunter@gmail.com>
Refactor capability checks in Client:_supports_registration and
Client:supports_method to properly handle dynamicRegistration and unknown
methods. Now, dynamic capabilities are checked before assuming support for
unknown methods, ensuring more accurate LSP feature detection.
Problem:
`vim.system()` doesn't invoke a shell, while the Vimscript function
`system()` does.
Solution:
Revert the change from 35af766de6 and use `vim.fn.system()` again to
actually invoke a shell.