Also allow to get parser ranges.
This will be useful for language injection, allowing us to tweak the
parser's ranges on the fly.
Update runtime/lua/vim/treesitter.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com>
Runtime queries just work like ftplugins, that is:
- Queries in the `after` directory are sourced _after_ the "base" query
- Otherwise, the last define query takes precedence.
Queries can be found in the `queries` directory.
Update runtime/lua/vim/treesitter/query.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com>
In #8226 <A-x> and <M-x> were changed to behave like <Esc>x in insert
mode when no mapping exists. This commit backs out that change and
replaces it with a more general one that makes unmapped ALT and META
keypresses as <Esc>+char in all modes. This fixes an unnecessary and
confusing inconsistency between modes.
- The previous commit lost information in the tests. Instead, add some
more "normalization" substitutions in pcall_err(), so that the general
shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
Problem: 'verbose' value 16 causes duplicate output.
Solution: Combine levels 15 and 16 into one message. (Christian Brabandt,
closesvim/vim#6153)
823654bc06
54ce101 changed the way undo entries are created when adding decorations.
This creates all sorts of problems.This change fixes the problem by
reverting to the previous behavior.
The test of "replace environment" in the test module of
`test/functional/core/job_spec.lua` failed in case the bashrc file of
the user running the test has special actions in it (such actions were
printing to the screen from inside this file, or changing the bash mode
to be vi).
In order to fix this problem, the test now sets the shell to be
`/bin/sh` before running the command. Setting the shell to be `/bin/sh`
causes the running shell to run without the configuration of the user,
and so the test passes even in case of special .bashrc.
This change was done only for platforms other than Windows since it is
not relevant in windows.
The fix was applied to the specific test, even though it is possible
that related issues will arise in other tests. It seems like a big
overhead to make the fix work on all the possible tests, and it does not
worth this cost.
as well as copy_text_attr, text_to_screenline.
Display of folded line is now done via win_line, which reduces code
deduplication.
As fold_line was a trimmed down version of win_line, this change brings
new features such CursorLineNr highighting even on folded line, as well
as CursorLine highlighting.
On empty buffers, when editing the first line, the line is buffered, causing offset to be < 0. While the buffer is not actually empty, the buffered line has not been flushed (and should not be) yet, so the call is valid but an edge case.
- TUI: Fix a case where the cursor was not displayed after hiding the
cursor and then setting it to be displayed again.
- Change to reset everything before setting guicursor.
fixes#12800close#12811
Steps to reproduce:
nvim -u NORC
:set termguicolors
:hi nCursor guifg=red guibg=red
:hi iCursor guifg=green guibg=green
:hi cCursor guifg=blue guibg=blue
:set guicursor=n:block-nCursor,i:hor25-iCursor,c:ver25-cCursor
:set guicursor-=c:ver25-cCursor
Actual behaviour: Cursor is a blue vertical.
Expected behaviour: Cursor should be the default color block.
Problem: No 'incsearch' highlighting for :vimgrep and similar commands.
Solution: Parse the :vimgrep command and similar ones to locate the search
pattern. (Hirohito Higashi, closesvim/vim#3344)
264cf5cfaf