| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| | |
An implication of this current approach is that `NVIM_API_LEVEL` should be
bumped when a new Lua function is added.
TODO(future): add a lint check which requires `@since` on all new functions.
ref #25416
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** The documentation for `TSNode` and `TSTree` methods is
incomplete from the LSP perspective. This is because they are written
directly to the vimdoc, rather than in Lua and generated to vimdoc.
**Solution:** Migrate the docs to Lua and generate them into the vimdoc.
This requires breaking up the `treesitter/_meta.lua` file into a
directory with a few different modules.
This commit also makes the vimdoc generator slightly more robust with
regard to sections that have multiple help tags (e.g. `*one* *two*`)
|
| |
| |
| |
| |
| |
| |
| | |
Some composite/compound types even as basic as `(string|number)[]` are
not currently supported by the luacats LPEG grammar used by gen_vimdoc.
It would be parsed & rendered as just `string|number`.
Changeset adds better support for these types.
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15784
https://github.com/vim/vim/commit/f416a2220fbd457c3d3389fb0be59bee534a7491
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
allow alphanumeric + some characters (#30630)
closes: vim/vim#15783
https://github.com/vim/vim/commit/ae62fe5c289e148b92b1d0bb912dcce7ebe14602
Co-authored-by: Milly <milly.ca@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
value "abbr,kind,menu" (glepnir).
Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.
closes: vim/vim#14006
closes: vim/vim#15760
https://github.com/vim/vim/commit/6a89c94a9eeee53481ced1a1260a177bffde4c0f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The `_watch.watch()` strategy may fail if the given path does not exist:
…/vim/_watch.lua:101: ENOENT: no such file or directory
stack traceback:
[C]: in function 'assert'
…/vim/_watch.lua:101: in function <…/vim/_watch.lua:61>
[string "<nvim>"]:5: in main chunk
- `_watch.watch()` actively asserts any error returned by `handle:start()`.
- whereas `_watch.watchdirs()` just ignores the result of `root_handle:start()`.
Servers may send "client/registerCapability" with "workspace/didChangeWatchedFiles"
item(s) (`baseUri`) which do not actually exist on the filesystem:
https://github.com/neovim/neovim/issues/28058#issuecomment-2189929424
{
method = "client/registerCapability",
params = {
registrations = { {
method = "workspace/didChangeWatchedFiles",
registerOptions = {
watchers = { {
globPattern = {
baseUri = "file:///Users/does/not/exist",
pattern = "**/*.{ts,js,mts,mjs,cjs,cts,json,svelte}"
}
},
...
}
Solution:
- Remove the assert in `_watch.watch()`.
- Show a once-only message for both cases.
- More detailed logging is blocked until we have `nvim_log` / `vim.log`.
fix #28058
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: can set cedit to an invalid value
Solution: Check that the value is a valid key name
(Milly)
closes: vim/vim#15778
https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708
Co-authored-by: Milly <milly.ca@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When typing `:h usr` it redirects to usr_01.txt, but I'd argue
usr_toc.txt is more useful as you can see an overview of all manuals.
When I usr `:h usr` I personally always intend to go to `usr_toc`.
closes: vim/vim#15779
https://github.com/vim/vim/commit/baee8448d1dc803d01ed61beff2a135827b1b8e3
Co-authored-by: dundargoc <gocdundar@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: For :InspectTree, indent size (`&shiftwidth`) for the tree
viewer may be incorrect.
This is because the tree viewer buffer with the filetype `query` does
not explicitly configures the tab size, which can mismatch with the
default indent size (2) assumed by TSTreeView's implementation.
Solution: Set shiftwidth to be the same as TSTreeViewOpts specifies,
which defaults to 2.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.
(Note that this is not a preview feature.)
======================== LIMITATION ========================
According to the syntactical details of JEP 467:
> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.
the following example:
------------------------------------------------------------
/// A summary sentence.
/// A list:
/// - Item A.
/// - Item B.
///
/// Some code span, starting here `
/// 1 + 2 ` and ending at the previous \`.
------------------------------------------------------------
should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
/// - Item A.
/// - Item B.
///
/// Some code span, starting here `
/// 1 + 2 ` and ending at the previous \`.
------------------------------------------------------------
Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted. For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).
References:
https://openjdk.org/jeps/467
https://spec.commonmark.org/0.31.2
closes: vim/vim#15740
https://github.com/vim/vim/commit/85f054aa3f0fb9530712d0897e3c8ba29946fad4
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Co-authored-by: Tim Pope <code@tpope.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: http files not recognized
Solution: detect '*.http' as http filetype, include
http filetype plugin (Riley Bruins)
Based on the specification found
[here](https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md)
closes: vim/vim#15762
https://github.com/vim/vim/commit/de6c1d1182076b10212342fd2d441267fbe43a22
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Linematch used to use strchr to navigate a string, however strchr does
not supoprt embedded NULs.
Solution:
Use `mmfile_t` instead of `char *` in linematch and introduce `strnchr()`.
Also remove heap allocations from `matching_char_iwhite()`
Fixes: #30505
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: No clear way to check whether parsers are available for a given
language.
Solution: Make `language.add()` return `true` if a parser was
successfully added and `nil` otherwise. Use explicit `assert` instead of
relying on thrown errors.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Language names are only registered for filetype<->language
lookups when parsers are actually loaded; this means users cannot rely
on `vim.treesitter.language.get_lang()` or `get_filetypes()` to return
the correct value when language and filetype coincide and always need to
add explicit fallbacks.
Solution: Always return the language name as valid filetype in
`get_filetypes()`, and default to the filetype in `get_lang()`. Document
this behavior.
|
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15758
https://github.com/vim/vim/commit/6db3fc5632c877062d759356c025fe06e9dc3630
Co-authored-by: hokorobi <hokorobi.hokorobi@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
indent config file
Some gnu indent options take negative numbers (e.g. --indent-label).
Add matching for an optional single '-' before the number.
closes: vim/vim#15754
https://github.com/vim/vim/commit/ee20fc8062b43eb8e52014978ed8f200158a7efd
Co-authored-by: John M Devin <john.m.devin@gmail.com>
|
| |
| |
| |
| |
| | |
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: bun and deno history files not recognized
Solution: detect '.bun_repl_history' and 'deno_history.txt' as
javascript filetype (Wu, Zhenyu)
closes: vim/vim#15761
https://github.com/vim/vim/commit/8a2aea8a623ba183dc0703a47970463b105a9399
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15759
https://github.com/vim/vim/commit/c3989f184d4dd1ee817c06bb3c04d5471382dd04
Co-authored-by: hokorobi <hokorobi.hokorobi@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
fixes: vim/vim#15757
https://github.com/vim/vim/commit/998f018df37088455bd68ad79da3d16bc4ad9bbe
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Headings in :help do not stand out visually.
Solution:
Define a non-standard `@markup.heading.1.delimiter` group and
special-case it in `highlight_group.c`.
FUTURE:
This is a cheap workaround until we have #25718 which will enable:
- fully driven by `vimdoc/highlights.scm` instead of using highlight
tricks (`guibg=bg guifg=bg guisp=fg`)
- better support of "cterm" ('notermguicolors')
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15734
https://github.com/vim/vim/commit/2c41dad3873e71cdd4076907cf35e985d0d7a0d1
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15746
https://github.com/vim/vim/commit/d9af78b9450362847b344f8dc0f68d015b428d03
Co-authored-by: Milly <milly.ca@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add 'fex' to b:undo_ftplugin variable
closes: vim/vim#15728
https://github.com/vim/vim/commit/a7229c8a99129608e9d651441cca6e6d3079ef56
Co-authored-by: John M Devin <john.m.devin@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.
|
| |
| |
| |
| | |
- Don't assume b:undo_ftplugin is set when first modifying it.
- Don't assume b:undo_ftplugin already contains some resetting.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fixes: vim/vim#15717
closes: vim/vim#15718
https://github.com/vim/vim/commit/be551dacb87a0542afd8b5c17b89e6749f2dc355
Co-authored-by: Peter Aronoff <peter@aronoff.org>
|
| |
| |
| |
| | |
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>
|