| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change fixes an issue where glob patterns like `{a,ab}` would not
match `ab` because the first option `a` matches, then the end of the
string is expected but `b` is found, and LPeg does not backtrack to try
the next option `ab` which would match. The fix here is to also append
the rest of the pattern to the generated LPeg pattern for each option.
This changes a glob `{a,ab}` from being parsed as
("a" or "ab") "end of string"
to
("a" "end of string" or "ab" "end of string")
Here, matching against `ab` would try the first option, fail to match,
then proceed to the next option, and match.
The sacrifice this change makes is dropping support for nested `{}`
conditions, which VSCode doesn't seem to support or test AFAICT.
Fixes #28931
Co-authored-by: Sergey Slipchenko <faergeek@gmail.com>
|
| | |
|
|\ \
| | |
| | | |
refactor(io): make rstream use a linear buffer
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If you like it you shouldn't put a ring on it.
This is what _every_ consumer of RStream used anyway, either by calling
rbuffer_reset, or rbuffer_consumed_compact (same as rbuffer_reset
without needing a scratch buffer), or by consuming everything in
each stream_read_cb call directly.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's a function to perform operations in their own sealed context,
similar to pythons `with`. This helps ease operations where you need to
perform an operation in a specific context, and then restore the
context.
Marked as private for now as it's not ready for public use. The current
plan is to start using this internally so we can discover and fix any
problems. Once this is ready to be exposed it will be renamed to
`vim.with`.
Usage:
```lua
local ret = vim._with({context = val}, function()
return "hello"
end)
```
, where `context` is any combination of:
- `buf`
- `emsg_silent`
- `hide`
- `horizontal`
- `keepalt`
- `keepjumps`
- `keepmarks`
- `keeppatterns`
- `lockmarks`
- `noautocmd`
- `options`
- `sandbox`
- `silent`
- `unsilent`
- `win`
(except for `win` and `buf` which can't be used at the same time). This
list will most likely be expanded in the future.
Work on https://github.com/neovim/neovim/issues/19832.
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
|
| |
| |
| |
| |
| | |
Problem: `man cmake` shows "8;;https://cmake.orghttps://cmake.org8;;"
Solution: Remove noise so that it shows as "https://cmake.org".
See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
|
| |
| |
| |
| | |
ref https://github.com/neovim/neovim/pull/28432
ref https://github.com/neovim/neovim/issues/28469
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Text edits with the same position (both line and character) were being
reverse sorted prior to being applied which differs from the lsp spec
Solution:
Change the sort order for just the same position edits
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)"
This reverts commit 2e6d295f799c27372e5c0c44727fa613c81717fd.
* Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)"
This reverts commit 5c33815448e11b514678f39cecc74e68131d4628.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot have buffer-local value for 'completeopt'
(Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).
Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.
fixes: vim/vim#5487
closes: vim/vim#14922
https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: typos in some comments
(after v9.1.0466)
Solution: fix comments
(zeertzjq)
closes: vim/vim#14919
https://github.com/vim/vim/commit/551d8c372e49ed630fd95c6422a0ee62d00902c5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We currently check $COLORTERM in the TUI process to determine if the
terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor"
or "24bit" then we automatically assume that the terminal supports
truecolor, but if $COLORTERM is set to any other value we still query
the terminal.
The `rgb` flag of the UI struct is a boolean which only indicates
whether the UI supports truecolor, but does not have a 3rd state that we
can use to represent "we don't know if the UI supports truecolor". We
currently use `rgb=false` to represent this "we don't know" state, and
we use XTGETTCAP and DECRQSS queries to determine at runtime if the
terminal supports truecolor. However, if $COLORTERM is set to a value
besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear
indication that the terminal _does not_ support truecolor, so it is
incorrect to treat `rgb=false` as "we don't know" in that case.
Instead, in the TUI process we only check for the terminfo capabilities.
This must be done in the TUI process because we do not have access to
this information in the core Neovim process when `_defaults.lua` runs.
If the TUI cannot determine truecolor support from terminfo alone, we
set `rgb=false` to indicate "we don't know if the terminal supports
truecolor yet, keep checking". When we get to `_defaults.lua`, we can
then check $COLORTERM and only query the terminal if it is unset.
This means that users can explicitly opt out of truecolor determination
by setting `COLORTERM=256` (or similar) in their environment.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
using :set completopt+=fuzzy (glepnir).
closes: vim/vim#14878
https://github.com/vim/vim/commit/a218cc6cdabae1113647b817c4eefc2b60a6902f
Co-authored-by: glepnir <glephunter@gmail.com>
|
| | |
|
| |
| |
| |
| | |
Follow up to https://github.com/neovim/neovim/pull/28943
Fixes https://github.com/neovim/neovim/issues/29163
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Unsetting global variables earlier in #28578 to avoid
recursiveness, caused superfluous or even unlimited
showmode().
Solution: Partly revert #28578 so that the globals are unset at the end
of showmode(), and avoid recursiveness for ext UI by adding a
recursive function guard to each generated UI call that may
call a Lua callback.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
existing filetype plugins with the new default value
(Riley Bruins)
closes: vim/vim#14843
https://github.com/vim/vim/commit/0a0830624a260660c7fa692ecb7e6e5de09114ba
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Typos in test files.
Solution: Correct the typos. (Dominique Pellé, closes vim/vim#9175)
https://github.com/vim/vim/commit/923dce2b07ff185c0ef661f3eca47bc17655f01b
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The default commentstring for C/C++ can lead to invalid code
when commenting and does not match the Nvim codebase.
Solution: Change commentstring to `// %s` as used by Neovim. Also
set all commentstrings that derive from the default C string explicitly
(and correctly).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
(İlyas Akın)
see: https://github.com/lint-staged/lint-staged
closes: vim/vim#14897
https://github.com/vim/vim/commit/7577afd5efd0f7ebf0dbbca09713185024263ed7
Co-authored-by: İlyas Akın <ilyas.akin@kuika.com>
|
| |
| |
| |
| |
| | |
the `complete()` mechanism doesn't play nicely with trailing newlines or
tabs. A newline causes it to insert a null character, showing up as
`^@`.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Left shift is incorrect with vartabstop and shiftwidth=0
Solution: make tabstop_at() function aware of shift direction
(Gary Johnson)
The problem was that with 'vartabstop' set and 'shiftwidth' equal 0,
left shifts using << were shifting the line to the wrong column. The
tabstop to the right of the first character in the line was being used
as the shift amount instead of the tabstop to the left of that first
character.
The reason was that the tabstop_at() function always returned the value
of the tabstop to the right of the given column and was not accounting
for the direction of the shift.
The solution was to make tabstop_at() aware of the direction of the
shift and to choose the tabtop accordingly.
A test was added to check this behavior and make sure it doesn't
regress.
While at it, also fix a few indentation/alignment issues.
fixes: vim/vim#14864
closes: vim/vim#14887
https://github.com/vim/vim/commit/88d4f255b7b7a19bb4f6489e0ad0956e47d51fed
Co-authored-by: Gary Johnson <garyjohn@spocom.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Test for what 8.2.4436 fixes does not check for regression.
Solution: Set several options. (Ken Takata, closes vim/vim#9830)
https://github.com/vim/vim/commit/2dada73a4ebffe2582af472ce362abd3116b58c9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vartabs test fails on MS-Windows.
Solution: Use iso8859-1 'encoding'. (Ken Takata, closes vim/vim#9818)
https://github.com/vim/vim/commit/0f113e4f7b698fc94c1a8377afdb7249329beaee
Co-authored-by: K.Takata <kentkt@csc.jp>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash with weird 'vartabstop' value.
Solution: Check for running into the end of the line.
https://github.com/vim/vim/commit/4e889f98e95ac05d7c8bd3ee933ab4d47820fdfa
Code change is N/A as it's superseded by virtual text changes.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
|
| |
| |
| |
| |
| |
| | |
Problem: Numberwidth may depend on number of signs with text in the
buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
handled properly for legacy and extmark signs alike.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: minor issues in test_filetype with rasi test
(after 9.1.0453)
Solution: re-sort test_filetype, fix wrong syntax.txt help tags
https://github.com/vim/vim/commit/f3dd6f617c65a9b939697362efe6833eb2778612
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: rasi files are not recognized
Solution: regonize '*.rasi' files as rasi filetype,
include a filetype and syntax plugin
(Pierrick Guillaume)
ported from: https://github.com/Fymyte/rasi.vim
closes: vim/vim#14821
https://github.com/vim/vim/commit/280e5b13ca568ed592a894140bf1ac74356f4b33
Co-authored-by: Pierrick Guillaume <pierguill@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: No test for escaping '<' with shellescape()
Solution: Add a test. Use memcpy() in code to make it easier to
understand. Fix a typo (zeertzjq).
closes: vim/vim#14876
https://github.com/vim/vim/commit/88c8c547d5fc380e5685c2b01ec564ccdf9b259a
|
|
|
|
|
|
|
| |
`lsp.util.buf_versions` was already derived from changedtick (`on_lines`
from `buf_attach` synced the version)
As far as I can tell there is no need to keep track of the state in a
separate table.
|
| |
|
|
|
|
|
|
|
|
| |
The `complete()` mechanism matches completion candidates against
the typed text, so strict pre-filtering isn't necessary.
This is a first step towards supporting postfix snippets (like
`items@insert` in luals)
|
|
|
|
|
|
|
|
|
|
|
| |
(#29090)
Problem: Testing the shell option is incomplete and spread out.
Solution: Move shell tests to one file and increase coverage. (Yegappan
Lakshmanan, closes vim/vim#8464)
https://github.com/vim/vim/commit/054794c20f6322bbd9482c4124041dc0a140c78e
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|\
| |
| | |
refactor(shada): remove ShaDaReadDef secondary wrapper
|
| |
| |
| |
| |
| |
| | |
`FileDescriptor` is already a wrapper around an fd and a buffer.
By allowing to just use the buffer without an fd, it can
already handle in-memory reads.
|
| | |
|
| |
| |
| |
| | |
This allows the mappings to work with a count and also enables new ]D
and [D mappings to go to the last/first diagnostic in the buffer.
|
|\ \
| | |
| | | |
feat(lsp): completion side effects
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Deprecate vim.diagnostic.goto_prev() and vim.diagnostic.goto_next() in
favor of a unified vim.diagnostic.jump() interface.
We cannot name the function "goto()" because some of our tooling
(luacheck and stylua) fail to parse it, presumably because "goto" is a
keyword in newer versions of Lua.
vim.diagnostic.jump() also allows moving to a specific diagnostic and
moving by multiple diagnostics at a time (useful for creating mappings
that use v:count).
|
| |/
|/|
| |
| | |
Problem: Unable to update the screen for external cmdline during cmdpreview.
Solution: Flush the cmdline UI before cmdpreview state.
|
| |
| |
| |
| |
| |
| |
| |
| | |
On Windows, '{' is currently not treated as a wildcard char, so another
wildcard char is needed for the pattern to be treated as a wildcard.
It may be worth trying to make '{' always a wildcard char in the future,
but that'll be a bit harder as it'll be necessary to make sure '{' is
escaped at various places.
|