| Commit message (Collapse) | Author | Age |
|
|
|
| |
Set dev_xx.txt help files to use "flow" layout.
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`vim.validate` is too slow, mainly because of `vim.spairs`.
Solution:
Collect all errors in via `pairs`, and sort the errors via `spairs`.
|
|
|
|
| |
~10% faster.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
vim.fs.normalize() normalizes too much vim.loader and is slow.
Solution:
Make it faster by doing less. This reduces the times spent in
vim.fs.normalize in vim.loader from ~13ms -> 1-2ms.
Numbers from a relative benchmark:
- Skipping `vim.validate()`: 285ms -> 230ms
- Skipping `path_resolve_dot()`: 285ms -> 60ms
- Skipping `double_slash`: 60ms -> 35ms
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/28484.
Closes https://github.com/neovim/neovim/issues/28719.
Co-authored-by: Chris <crwebb85@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com>
Co-authored-by: Jonathan Raines <jonathan.s.raines@gmail.com>
Co-authored-by: Yi Ming <ofseed@foxmail.com>
Co-authored-by: Zane Dufour <zane@znd4.me>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
| |
If a client for a server was already running and lsp.start was called in
an unloaded buffer it started another client instead of bailing out.
|
| |
|
| |
|
|
|
|
| |
Make the LSP protocol typings up-to-date with LSP protocol (upcoming)
version 3.18, before and in preparation for the Nvim 0.10.0 release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doesn't have a huge impact, but showed up in profile output using
`require("jit.p").start("i1", "/tmp/profile")`
before:
31% joinpath
25% fs.lua:0
13% normalize
13% skip
8% _watchfunc
5% gsplit
3% spairs
after:
34% skip
29% fs.lua:0
12% joinpath
7% normalize
5% _watchfunc
5% spairs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-normalizing a path after a `joinpath` isn't necessary. Calling
`normalize` on each child directory had quite a bit of impact when
traversing a large directory.
A simple test showed:
Before: ~144ms
After: ~80ms
running the following logic against a dir with 4367 child folders and
25826 files:
local files = {}
local start = uv.hrtime()
for name, type in vim.fs.dir(path, { depth = max_depth }) do
table.insert(files, { name, type })
end
local duration = uv.hrtime() - start
Relates to https://github.com/neovim/neovim/issues/23291
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The column width 10 for parser name (lang) is too short.
For example, `markdown_inline` has 15 characters, which results in a
slight misalignment with other lines.
e.g. it looked like:
```
- OK Parser: markdown ABI: 14, path: .../parser/markdown.so
- OK Parser: markdown_inline ABI: 14, path: .../parser/markdown_inline.so
- OK Parser: php ABI: 14, path: .../parser/php.so
```
Solution: Use column width 20. As of now, the longest name among those
available in nvim-treesitter has length 18 (`haskell_persistent`).
e.g.:
```
- OK Parser: markdown ABI: 14, path: .../parser/markdown.so
- OK Parser: markdown_inline ABI: 14, path: .../parser/markdown_inline.so
- OK Parser: php ABI: 14, path: .../parser/php.so
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The nvim_win_xx_ns function family introduced in ba0370b1d718d473d0ef51c35d88b98ba220082b
needs more bake-time. Currently it's narrowly defined for windows, but
other scopes ("buffer") and features are likely in the future.
Solution:
- Rename the API with double-underscore to mark it as EXPERIMENTAL.
TODO/FUTURE:
- Rename and change the signature to support more than just "window"
scope, and for other flexibility.
- Open question: we could choose either:
- "store scopes on namespaces", or
- "store namespaces on scopes (w:/b:/…)"
|
|
|
|
|
|
|
|
| |
Problem:
nvim_win_remove_ns does not follow `help dev-naming` API naming conventions.
Solution:
Rename it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: mdd files detected as zsh filetype
Solution: detect '*.mdd' files as sh filetype, add links
to reference documentation (Wu, Zhenyu)
closes: vim/vim#14741
https://github.com/vim/vim/commit/63f2a5b8adfb570792b9a7cbfff1c350913bbe3e
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
filetype, determine zsh-modules '*.pro' from from it's content
(Wu, Zhenyu)
closes: vim/vim#14737
https://github.com/vim/vim/commit/887a38cee78c472fe406da60751fbba4a6ec19dd
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The file watcher backends for Linux have too many limitations and
doesn't work reliably.
Solution:
disable didChangeWatchedFiles on Linux
Ref: #27807, #28058, #23291, #26520
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: jj files are not recognized
Solution: recognize '*.jjdescription' files as jj filetype
(Gregory Anders)
See: https://github.com/martinvonz/jj
closes: vim/vim#14733
https://github.com/vim/vim/commit/6a4ea471d28107c4078e106ace1bdc0c54bf946b
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
As suggested in
https://github.com/neovim/neovim/pull/28483#discussion_r1586878457 and
https://github.com/neovim/neovim/pull/28483#discussion_r1586878226
|
| | |
|
| |
| |
| |
| | |
As suggested in https://github.com/neovim/neovim/pull/28483#discussion_r1581712828
|
| | |
|
| |
| |
| |
| | |
See https://github.com/neovim/neovim/pull/28483#discussion_r1583344120
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Rename the field `result` to `params` in the `data` table for
`LspProgress` autocmds. This aligns with LspNotify.
The previous name was chosen because the initial handler implementation
mistakenly had a parameter name `result` instead of `params` for the
`$/progress` LSP "notification" handler. However, `params` would be a
more appropriate name that is more consistent with the underlying LSP
type (`ProgressParams`).
See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress
|
|
|
|
|
|
|
|
| |
Problem:
UINT32_MAX + 1 passed to vim._foldupdate.
Solution:
Clip the end row from treesitter asap to avoid such issues.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
inlay_hint `enable(<no args>)` does not activate inlay hints on open
buffers. If a buffer does not have a corresponding `bufstate` in
`bufstates`, then `enable` all buffers will not take effect on it.
Solution:
Make the effective range determined by the loaded buffers.
Fix #28624
|
|
|
|
|
|
|
|
|
| |
Revert the default LSP mappings before the 0.10 release as these might
need some further consideration. In particular, it's not clear if "c"
prefixed maps in Normal mode are acceptable as defaults since they
interfere with text objects or operator ranges.
We will re-introduce default mappings at the beginning of the 0.11
release cycle, this reversion is only for the imminent 0.10 release.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
runtime(doc): correct getscriptinfo() example (vim/vim#14718)
When "sid" is specified, it returns a List with a single item.
https://github.com/vim/vim/commit/ad4881cb3c04048242f69dc77af2dde889c9beea
|
|
|
| |
Some parsers for, e.g., LaTeX or PHP have anonymous nodes like `"\"` or `"\text"` that behave wonkily (especially the first example) in the `InspectTree` window, so this PR escapes them by adding another backslash in front of them
|
|
|
| |
ref #28624
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reverts e0d92b9cc20b58179599f53dfa74ca821935a539 #28502
Problem:
`vim.ui.open()` has a `pcall()` like signature, under the assumption
that this is the Lua idiom for returning result-or-error. However, the
`result|nil, errmsg|nil` pattern:
- has precedent in:
- `io.open`
- `vim.uv` (`:help luv-error-handling`)
- has these advantages:
- Can be used with `assert()`:
```
local result, err = assert(foobar())
```
- Allows LuaLS to infer the type of `result`:
```
local result, err = foobar()
if err then
...
elseif result then
...
end
```
Solution:
- Revert to the `result|nil, errmsg|nil` pattern.
- Document the pattern in our guidelines.
|
|
|
|
|
|
| |
This avoids redraw when adding/removing an empty namespace for a window.
This also avoids marktree traversal when clearing a namespace that has
already been cleared, which is added as a benchmark.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Experimental and subject to future changes.
Add a way to redraw certain elements that are not redrawn while Nvim is waiting
for input, or currently have no API to do so. This API covers all that can be
done with the :redraw* commands, in addition to the following new features:
- Immediately move the cursor to a (non-current) window.
- Target a specific window or buffer to mark for redraw.
- Mark a buffer range for redraw (replaces nvim__buf_redraw_range()).
- Redraw the 'statuscolumn'.
|
|/
|
| |
vim.diagnostic.enable and vim.diagnostic.is_enabled() use the same pattern.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines:
Interface conventions ~
- When accepting a buffer id, etc., 0 means "current buffer", nil means "all
buffers". Likewise for window id, tabpage id, etc.
- Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()|
Solution:
Implement globally enabling inlay hints.
* refactor(lsp): do not rely on `enable` to create autocmds
* refactor(lsp): make `bufstates` a defaulttable
* refactor(lsp): make `bufstate` inherit values from `globalstate`
* feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default
* test(lsp): add basic tests for enable inlay hints for all buffers
* test(lsp): add test cases cover more than one buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: inko files are not recognized
Solution: Detect '*.inko' as ink filetype
(Yorick Peterse)
See:
- https://github.com/inko-lang/inko.vim
- https://inko-lang.org/
closes: vim/vim#14699
https://github.com/vim/vim/commit/a01968448a0bdf04d9e4a822d32732a304849238
Co-authored-by: Yorick Peterse <git@yorickpeterse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: templ files are not recognized
Solution: Detect '*.templ' files as filetype templ
(Tristan Knight)
See:
- https://github.com/a-h/templ
- https://templ.guide/
closes: vim/vim#14697
https://github.com/vim/vim/commit/54e79157c536c631b2f9b3dfefec30b9b966ed97
Co-authored-by: tris203 <admin@snappeh.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: stylus files not recognized
Solution: Detect '*.styl' and '*.stylus' as stylus filetype,
include indent, filetype and syntax plugin
(Philip H)
closes: vim/vim#14656
https://github.com/vim/vim/commit/2d919d2744a99c9bb9e79984e85b8e8f5ec14c07
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#27131)" (#28585)
This reverts commit 15e77a56b711102fdc123e15b3f37d49bc0b1df1.
Subpriorities were added in https://github.com/neovim/neovim/pull/27131
as a mechanism for enforcing query order when using iter_matches in the
Tree-sitter highlighter. However, iter_matches proved to have too many
complications to use in the highlighter so we eventually reverted back
to using iter_captures (https://github.com/neovim/neovim/pull/27901).
Thus, subpriorities are no longer needed and can be removed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: .out files recognized as tex files
Solution: Do not set an explicit filetype until it is clear what this
should be (shane.xb.qian)
closes: vim/vim#14670
https://github.com/vim/vim/commit/e35478bc9d48189322432248105d3b24e0efb3d0
Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Kbuild files are not recognized.
Solution: Detect Kbuild files as make files.
(Bruno Belanyi)
closes: vim/vim#14676
https://github.com/vim/vim/commit/5cbc9a69e529361e1725f422b8cd6157fe0adc33
Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
|