In the documentation for `vim.lsp.util.open_floating_preview`
the opts table keys were prefixed with `--` instead of `---`,
preventing capture by docgen.
Problem: Cannot paste a block without adding padding.
Solution: Add "zp" and "zP" which paste without adding padding. (Christian
Brabandt, closesvim/vim#8289)
2fa9384ca1
Cherry-pick Test_normal_z_error() from patch v8.2.0369.
Problem: Problem restoring 'packpath' in session.
Solution: Let "skiprtp" also apply to 'packpath'.
d23b714d8b
Port Test_mksession_skiprtp() to lua functional test.
Problem: Problems when restoring 'runtimepath' from a session file.
Solution: Add the "skiprtp" item in 'sessionoptions'.
635bd60804
Allow "terminal" value for sessionoptions even if it's no-opt
because patch v8.0.1592 is not ported yet.
Omit vim9 test, Test_mksession_skiprtp().
Problem: 'quickfixtextfunc' does not get window ID of location list.
Solution: Add "winid" to the dict argument. (Yegappan Lakshmanan,
closesvim/vim#6222)
7ba5a7eff3
Problem: It is not possible to customize the quickfix window contents.
Solution: Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closesvim/vim#5465)
858ba06d5f
Patch 8.2.2524 added the support for the fields 'foldopen', 'foldclose'
and 'foldsep' to the 'fillchars' option in Vim:
http://ftp.vim.org/pub/vim/patches/8.2/8.2.2524
Update the credits in intro.txt based on Vim credits.
For the case of Clojure and other Lisp syntax highlighting, it is
necessary to create huge regexps consisting of hundreds of symbols with
the pipe (|) character. To make things more difficult, these Lisp
symbols sometimes consists of special characters that are themselves
part of special regexp characters like '*'. In addition to being
difficult to maintain, it's performance is suboptimal.
This patch introduces a new predicate to perform 'source' matching in
amortized constant time. This is accomplished by compiling a hash table
on the first use.
Problem: Cannot get the search statistics.
Solution: Add the searchcount() function. (Fujiwara Takuya, closesvim/vim#4446)
e8f5ec0d30
Additional changes:
- Tests weren't passing because the test ran assuming the cursor was at
start of buffer but append() left the cursor at end of buffer .
So cursor is moved to start of buffer after append.
- searchcount() added to list of builtin functions.
Update runtime files.
cb80aa2d53
Omit runtime/doc/tabpage.txt.
Patch v8.2.1401 is not ported yet.
Port optwin.vim changes without gettext().
Patch v8.2.1544 is not ported yet.
Problem: Mixing up "long long" and __int64 may cause problems. (John
Marriott)
Solution: Pass varnumber_T to vim_snprintf(). Add v:numbersize.
f9706e9df0
Problem: The eval.txt help file is too big.
Solution: Split off testing support to testing.txt. Move function details
to where the functionality is explained.
ed997adaa1
Vim commit 5477506a9f01d40fad2e8f0555bc37adee30478f
contains the duplicate tag fix in runtime/doc/testing.txt.
Problem: Cannot read back the prompt of a prompt buffer.
Solution: Add prompt_getprompt(). (Ben Jackson, closesvim/vim#6851)
077cc7aa0e
Updated prompt_getprompt() doc to cb80aa2d53
and removed mention of method syntax usage (not supported by Nvim).
Problem: Cannot sort using locale ordering.
Solution: Add a flag for :sort and sort() to use the locale. (Dominique
Pellé, closesvim/vim#7237)
55e29611d2
The current guidance for install Python packages is to use
python -m pip install <package_name>
Instead of
pip install <package_name>
This ensures that one is using the version of pip that is tied to the
environment's interpreter (and, thusly, its packages). This has [been
endorsed by a core
maintainer](https://snarky.ca/why-you-should-use-python-m-pip/) as
being the recommended way to invoke pip.
As there currently are a few places where the old invocation was used,
attempt to bring them in line.
Fixes#14234
[skip ci]
Changes from original include:
- "See |terminal-window|" -> "See |terminal|".
- Remove mention of using CTRL-W window commands in insert mode.
- Converted usage example to use the Nvim job and channel API.
- Removed logging from usage example, as ch_logfile() has no direct Nvim
counterpart.
- Fixed some small grammar/spelling mistakes.
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.
Use v:_null_string, not non-existent env var, for null string tests.
Mention v:_null_string in id() because id(v:_null_string) returns (nil).
Problem: Debugger can't break on a condition. (Charles Campbell)
Solution: Add ":breakadd expr". (Christian Brabandt, closesvim/vim#859)
c6f9f739d3
Do not port "has_watchexpr()" to avoid dead code.
"has_watchexpr()" always returns 0 because "debug_expr" is always 0.
Restore "eval_expr()" as a wrapper to allocate "typval_T" for "eval0()".
Remove it in later patches.
Include "typval_compare()" changes from patch v8.1.0958,
partially ported in 8b60368c1b.
Close https://github.com/neovim/neovim/pull/12373
N/A patches for version.c:
vim-patch:8.2.2720: GTK menu tooltip moves the cursor
Problem: GTK menu tooltip moves the cursor.
Solution: Position the cursor after displaying the tooltip. Do not show the
tooltip when editing the command line.
01ac0a1f66
...signs is slow
Problem: Placing a larger number of signs is slow.
Solution: Add functions for dealing with a list of signs. (Yegappan
Lakshmanan, closes#4636)
Problem: When 'matchpairs' is empty every character beeps. (Marco Hinz)
Solution: Bail out when no character in 'matchpairs' was found.
(closesvim/vim#8053) Add assert_nobeep().
5b8cabfef7
Problem: col('.') may get outdated column value.
Solution: Add a note to the help how to make this work and add a test for
it. (closesvim/vim#7971)
18b7d86d7f
Problem: shiftwidth() does not take 'vartabstop' into account.
Solution: Use the cursor position or a position explicitly passed.
Also make >> and << work better with 'vartabstop'. (Christian
Brabandt)
f951416a83
Problem: Cannot parse a date/time string.
Solution: Add strptime(). (Stephen Wall, closes #)
10455d43fe
N/A patches for version.c:
vim-patch:8.1.2344: Cygwin: warning for using strptime()
Problem: Cygwin: warning for using strptime().
Solution: Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata,
closesvim/vim#5265) Use 700 for _XOPEN_SOURCE for mkdtemp().
6a228c6463
Problem: Insufficient tests for tags; bug in using extra tag field when
using an ex command to position the cursor.
Solution: Fix the bug, add more tests. (Yegappan Lakshmanan, closesvim/vim#5439)
830c1afc9d
With the new implementation added in
https://github.com/neovim/neovim/pull/14079 I think this is now working
well enough to enable it by default.
There are high CPU usage issues popping up now and then and they might
at least partially be related to the full-text sync.
* Allow specifying a languageId for a lsp
For some languages the filetype might not match the languageId the
language server accepts. In these cases the config for the language
server can contain a function which gets the current buffer and filetype
and returns a languageId. When it isn't provided the filetype is used
instead.
Example:
```lua
require'lspconfig'.sourcekit.setup{
get_language_id = function(bufnr, ft)
return 'swift'
end;
}
```
Closes#13093
* lsp: Change to get_language_id
Co-authored-by: Jan Dammshäuser <mail@jandamm.de>
port termdebug dissasembly window only (termdebug.vim)
This patch adds disassembly window to Termdebug
:Asm should bring up disassembly window
or setting:
g:termdebug_disasm_window
Values greater than 1 will set disasm window height.
Code works by calling gdb disassemble command, demangling output and
storing in Termdebug-asm-listing buffer + window.
Current pc address is parsed from 'addr=' cursor msg and we search for
that address in the disasm window. When the search fails, we execute a
new "disassemble $pc" command.
When in a location without a proper stack frame, "disassemble $pc" can
fail and in this case we add a +length argument and try again.
Tested with x86_64 gdb v10.1 and v8.2.1, and aarch64 gdb v7.12.
Problem: ":highlight clear" does not restore default link.
Solution: Remember the default link and restore it. (Antony Scriven,
closesvim/vim#6970, closesvim/vim#4405)
213da551de
Problem: 'scroll' option can change when setting the statusline or tabline
but the option context is not updated.
Solution: Update the script context when the scroll option is changed as a
side effect. (Christian Brabandt, closesvim/vim#7533)
746670604a
Currently it's not 100% clear that without setting these, using the autocomds
to utilize the `textDocument/documentHighlight` functionality, nothing will
actually be visible since the highlight groups don't have any details. This
just adds in a couple simple extra notes to make sure that's done
Problem: Named function arguments are never optional.
Solution: Support optional function arguments with a default value. (Andy
Massimino, closesvim/vim#3952)
42ae78cfff
Problem: Can't get the exit value in VimLeave or VimLeavePre autocommands.
Solution: Add v:exiting like in Neovim. (Yegappan Lakshmanan, closesvim/vim#7395)
f0068c5154
Rearrange VimVarIndex enums and vimvars[] entries to sync with Vim.
N/A patches for version.c:
vim-patch:8.2.2535: MS-Windows: cannot run all vim9 tests
Problem: MS-Windows: cannot run all vim9 tests.
Solution: Make test_vim9 target work.
723ef5db98
Update vim_diff.txt to reflect the following patches:
patch 8.1.1113: making an autocommand trigger once is not so easy
patch 8.2.2128: there is no way to do something on CTRL-Z
patch 8.2.2508: cannot change the character displayed in non existing lines
patch 8.2.2518: 'listchars' should be window-local
Problem: The session file does not restore the alternate file.
Solution: Add ":balt". Works like ":badd" and also sets the buffer as the
alternate file. Use it in the session file. (closesvim/vim#7269,
closesvim/vim#6714)
59d8e56e04
Include minimal test_buffer.vim from patch 8.2.0243 for Test_balt().
Add entry for :balt to runtime/doc/index.txt from vim/vim#7819.
Before #12937, the only way to specify the `$TERM` for a pty job was
through the `TERM` key in the job's opts dict. This was shuttled to the
child process throug a special field on the PtyProcess object and
injected into the environment after forking.
Now that we have a proper way to specify the environment for a job, we
can simply ensure that the env dict has a proper `TERM` set and avoid
the extra shuttling of data around.
This deprecates the use of the `TERM` option, but will still honor it if
present, although at a lower priority than a `TERM` present in the env
dict.
This also fixes#13874 because we're no longer trying to overwrite
`TERM` in the env dict with the special pty `term_name`. Doing so
raises an internal error because of the existing key which, under
certain circumstances, would cause the "hit enter" prompt. However,
since the child process had already forked, there was no way for the
user to acknowledge the prompt and we would just hang there.
Problem: When using ":sleep" the cursor is always displayed.
Solution: Do not display the cursor when using ":sleep!". (Jeremy Lerner,
closesvim/vim#7688)
e2edc2ed4a
Cursor showing/hiding is moved from core to TUI.
":sleep!" behaves the same as ":sleep".
Add support for default start and end row when omitted in the
query:iter_captures and query:iter_matches functions.
When the start and end row values are omitted, the values of the given
node is used. The end row value is incremented by 1 to include the node end
row in the match.
Updated tests and docs accordingly.
while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
Problem: No 'backspace' value allows ignoring the insertion point.
Solution: Add the "nostop" and 3 values. (Christian Brabandt, closesvim/vim#5940)
aa0489e12d
Problem: Cannot easily get all the current marks.
Solution: Add getmarklist(). (Yegappan Lakshmanan, closes#6032)
cfb4b47de0
Cherry-pick the column number fix from patch v8.2.0871
because patch v8.2.0871 cannot be fully ported
without the method patches.
Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
Problem: Quickfix entries do not suport a "note" type.
Solution: Add support for "note". (partly by Yegappan Lakshmanan,
closesvim/vim#5527, closesvim/vim#6216)
e928366de5
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)
Behaviour of tui.c is unaffected by this change.
Problem: Cannot navigate to errors before/after the cursor.
Solution: Add the :cbefore and :cafter commands. (Yegappan Lakshmanan,
closesvim/vim#4340)
cf6a55c4b0
Problem: No error for quickfix commands with negative range.
Solution: Add ADDR_UNSIGNED and use it for quickfix commands. Make
assert_fails() show the command if the error doesn't match.
25190db225
N/A patches for version.c:
vim-patch:8.2.0113: "make cmdidxs" fails
Problem: "make cmdidxs" fails.
Solution: Allow address for ":cquit". Add --not-a-term to avoid a delay.
9b24dfcb9f
Problem: Cannot see the selection type in :reg output. (Ayberk Aydın)
Solution: Add c/l/b. (Christian Brabandt, closesvim/vim#5110, closesvim/vim#4546)
3691f1ee72
Patch v8.1.0999 is not ported so ":registers" does not omit register 1.
"set foldcolumn=auto" is documented but not supported.
Support it by making it behave as "auto:1", similar to "signcolumn".
Close https://github.com/neovim/neovim/pull/13561
Opt in to this secret world using
set wildchar=0
" already the default, but remove if non-zero existing config:
set wildcharm=0
now you can map 'wildmode' just like any mode:
cnoremap <tab> <c-z>
function! Spacey()
return getcmdline()[-1:] == "/" ? "\<bs>" : ""
endfunc
cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"
Possibly asked questions:
What about backwards compatibility?
====
Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.
Doesn't `<c-z>` mean suspend?
====
Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.
My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
* First implementation of workspace folders
* Add completion for current directory
* Add tracking of workspace folders
* Add workspace folder listing
* Add checks on adding/removing workspaces
* Add appropriate initialization options
* Add documentation
* Make workspaceFolders available wherever client is
Problem: Cannot get window type for autocmd and preview window.
Solution: Add types to win_gettype(). (Yegappan Lakshmanan, closesvim/vim#6277)
0fe937fd86
Cherry-pick test_preview.vim,test_window_cmd.vim changes
from patch v8.2.0522.
Problem: MS-Windows: shell commands fail if &shell contains a space.
Solution: Use quotes instead of escaping. (closesvim/vim#4920)
2efc44b3f0
Always double-quote &shell if it contains a space.
Neovim does not support escaping space with backslash, unlike Vim.
N/A patches for version.c:
vim-patch:8.0.1455: if $SHELL contains a space then 'shell' is incorrect
Problem: If $SHELL contains a space then the default value of 'shell' is
incorrect. (Matthew Horan)
Solution: Escape spaces in $SHELL. (Christian Brabandt, closesvim/vim#459)
4bfa8af141
vim-patch:8.2.1194: test failure because shell prompt differs
Problem: Test failure because shell prompt differs.
Solution: Set the shell prompt.
a4dc6f92bb
Implement the LanguageTree structure to enable language injection.
This is done be removing the old Parser metatable and replacing by the
new structure, with the same API (almost).
Some noticeable differences :
- `parser:parse()` now returns a table of trees
- There is no incremental parsing for child (injected) languages
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* lsp: Remove duplicate `diagnostics` fallback in diagnostic.display
* lsp: Expose all diagnostics
Before the changes in #12655 it was possible to retrieve all diagnostics
via `vim.lsp.util.diagnostics_by_buf`.
This adds a `diagnostic.get_all()` to enable users to retrieve all
diagnostics.
Use cases for that could include loading all diagnostics into the
quickfix list, or to build an enhanced goto_next that can move across
buffers.
Breaking Changes:
- Deprecated all `vim.lsp.util.{*diagnostics*}()` functions.
- Instead, all functions must be found in vim.lsp.diagnostic
- For now, they issue a warning ONCE per neovim session. In a
"little while" we will remove them completely.
- `vim.lsp.callbacks` has moved to `vim.lsp.handlers`.
- For a "little while" we will just redirect `vim.lsp.callbacks` to
`vim.lsp.handlers`. However, we will remove this at some point, so
it is recommended that you change all of your references to
`callbacks` into `handlers`.
- This also means that for functions like |vim.lsp.start_client()|
and similar, keyword style arguments have moved from "callbacks"
to "handlers". Once again, these are currently being forward, but
will cease to be forwarded in a "little while".
- Changed the highlight groups for LspDiagnostic highlight as they were
inconsistently named.
- For more information, see |lsp-highlight-diagnostics|
- Changed the sign group names as well, to be consistent with
|lsp-highlight-diagnostics|
General Enhancements:
- Rewrote much of the getting started help document for lsp. It also
provides a much nicer configuration strategy, so as to not recommend
globally overwriting builtin neovim mappings.
LSP Enhancements:
- Introduced the concept of |lsp-handlers| which will allow much better
customization for users without having to copy & paste entire files /
functions / etc.
Diagnostic Enhancements:
- "goto next diagnostic" |vim.lsp.diagnostic.goto_next()|
- "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()|
- For each of the gotos, auto open diagnostics is available as a
configuration option
- Configurable diagnostic handling:
- See |vim.lsp.diagnostic.on_publish_diagnostics()|
- Delay display until after insert mode
- Configure signs
- Configure virtual text
- Configure underline
- Set the location list with the buffers diagnostics.
- See |vim.lsp.diagnostic.set_loclist()|
- Better performance for getting counts and line diagnostics
- They are now cached on save, to enhance lookups.
- Particularly useful for checking in statusline, etc.
- Actual testing :)
- See ./test/functional/plugin/lsp/diagnostic_spec.lua
- Added `guisp` for underline highlighting
NOTE: "a little while" means enough time to feel like most plugins and
plugin authors have had a chance to refactor their code to use the
updated calls. Then we will remove them completely. There is no need to
keep them, because we don't have any released version of neovim that
exposes these APIs. I'm trying to be nice to people following HEAD :)
Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
:cquit can use count to set the exit code
patch 8.2.0095: cannot specify exit code for :cquit
:tchdir tab-local current-directory
patch 8.1.1218: cannot set a directory for a tab page
Autocmd Events:
- DirChanged
patch 8.0.1459: cannot handle change of directory
- TextYankPost
patch 8.0.1394: cannot intercept a yank command
tabpagenr() "#" argument
g<Tab> goes to the last-accessed tabpage.
patch 8.2.1401: cannot jump to the last used tabpage
hl-QuickFixLine
patch 8.0.0641: cannot set a separate highlighting for the quickfix line
v:event
patch 8.0.1394: cannot intercept a yank command
K in help documents can be used like CTRL-].
Updated as part of a runtime update.
4c05fa08c9
- Describe query components (capture, match, pattern). Not
well-described in tree-sitter documentation.
- Describe Query() object. Not actually described anywhere in
documenation.
Problem: Pragmas are indented all the way to the left.
Solution: Add an option to indent progmas like normal code. (Max Rumpf,
closesvim/vim#5468)
d881b516da
N/A patches for version.c:
vim-patch:8.1.2030: tests fail when build with normal features and terminal
Problem: Tests fail when build with normal features and terminal.
(Dominique Pelle)
Solution: Disable tests that won't work. (closesvim/vim#4932)
997d42427e
vim-patch:8.1.2063: some tests fail when +balloon_eval_term is missing
Problem: Some tests fail when +balloon_eval_term is missing but
_balloon_eval is present. (Dominique Pelle)
Solution: Check the right feature in the test. (closesvim/vim#4962)
1e82a784ac
vim-patch:8.2.1938: wiping out a terminal buffer makes some tests fail
Problem: Wiping out a terminal buffer makes some tests fail.
Solution: Do not wipe out the terminal buffer unless wanted.
a46765a797
Problem: Number of status line items is limited to 80.
Solution: Dynamically allocate the arrays. (Rom Grk, closesvim/vim#7181)
8133cc6bf4
The members of stl_item_T have not been prefixed with stl_ contrary to
the vim patch because the amount of stl_ prefixes on single lines of
code in that region was hurtful to readability.
Language servers can already send log messages to the client while the
server is still being initialized.
This currently leads to "client has shut down" messages which are
confusing to the user as the server is properly starting.
To fix this this changes the `get_client_by_id` method to also return a
client if it is still initializing.
Problem: Can't do something just before leaving Insert mode.
Solution: Add the InsertLeavePre autocommand event. (closesvim/vim#7177)
b53e13a91a
N/A patches for version.c:
vim-patch:8.1.1877: graduated features scattered
Problem: Graduated features scattered.
Solution: Put graduated and obsolete features together.
ffc0716af8
vim-patch:8.2.1875: warning when building GTK gui
Problem: Warning when building GTK gui.
Solution: Add missing function parameter.
3da855c8e2
vim-patch:8.2.1877: test for function list fails
Problem: Test for function list fails.
Solution: Move "obsolete" comments one line up.
b8f519e538
vim-patch:8.2.1878: GTK: error for redefining function
Problem: GTK: error for redefining function. (Tony Mechelynck)
Solution: Remove "gtk_" prefix from local functions and prepend "gui_" to
global functions.
8a99e66b4f
vim-patch:8.2.1881: cannot build with GTK3
Problem: Cannot build with GTK3.
Solution: Adjust form functions.
692d1a51e7
vim-patch:8.2.1883: compiler warnings when using Python
Problem: Compiler warnings when using Python.
Solution: Adjust PyCFunction to also have the second argument. Use "int"
return type for some functions. Insert "(void *)" to get rid of
the remaining warnings.
4ce5fe4c87
Problem: trim() always trims both ends.
Solution: Add an argument to only trim the beginning or end. (Yegappan
Lakshmanan, closesvim/vim#6126)
2245ae18e3
Problem: Not enough testing for the Ruby interface.
Solution: Add more tests. (Dominique Pelle, closesvim/vim#3252)
edd6aacb01
Modified some tests to make them pass for Neovim.
Some tests will always fail because +ruby is externalized in Neovim.
Skip failing ruby tests for now.
Problem: Quickfix buffer shows up in list, can't get buffer number.
Solution: Make the quickfix buffer unlisted when the quickfix window is
closed. get the quickfix buffer number with getqflist().
(Yegappan Lakshmanan, closesvim/vim#4113)
647e24ba3d
Problem: Cannot easily change the current quickfx list index.
Solution: Add the "idx" argument to setqflist(). (Yegappan Lakshmanan,
closesvim/vim#3701)
5b69c22fd2
Problem: Dictionary with string keys is longer than needed.
Solution: Use *{key: val} for literaly keys.
d5abb4c877
Vim's popup,textprop features are N/A.
Neovim has not polyfilled their APIs.
Skip docs and tests for these features.
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.
Problem: 'verbose' value 16 causes duplicate output.
Solution: Combine levels 15 and 16 into one message. (Christian Brabandt,
closesvim/vim#6153)
823654bc06
Problem: Spell checking doesn't work for CamelCased words.
Solution: Add the "camel" value in the new option 'spelloptions'.
(closesvim/vim#1235)
362b44bd4a