Commit Graph

3726 Commits

Author SHA1 Message Date
Michael Lingelbach
b2fcfc65b7
lsp: client stop cleanups (#13877)
* lsp: client stop cleanups

* Add diagnostic clearing to client.stop() method used by nvim-lspconfig
* Clear diagnostic cache to prevent stale diagnostics on client restart

* lsp: Add test for vim.lsp.diagnostic.reset
2021-02-19 22:05:49 -05:00
Vikram Pal
4d5dbea4f4
[RFC] ":source" sources from current buffer if filename is omitted (#11444)
Fix https://github.com/neovim/neovim/issues/8722
2021-02-18 01:25:51 -05:00
Björn Linse
772421f6b1
Merge pull request #13692 from mjlbach/fix_cursor_respect_current_line
fix_cursor: do not change line number when edit will not impact cursor row
2021-02-16 18:32:38 +01:00
Björn Linse
c7a65fe6a1 buffer_updates: autoload episode III: revenge of the trees 2021-02-14 11:10:36 +01:00
Björn Linse
94622ca66b buffer updates: add on_reload callback and handle it in treesitter parser 2021-02-10 18:58:46 +01:00
Björn Linse
230f2ff381
Merge pull request #13903 from glacambre/fix_prompt_for_number
Clear prompt_for_number messages
2021-02-10 18:51:33 +01:00
glacambre
dbf3c5d953 Clear prompt_for_number messages
This fixes issues in GUIs:
https://github.com/akiyosi/goneovim/issues/94
https://github.com/glacambre/firenvim/issues/448
2021-02-10 13:04:02 +01:00
notomo
971e0ca903
fix(notify): Expected 3 arguments error (#13905) 2021-02-09 11:41:02 +01:00
Thomas Vigouroux
3094bb4e38 fix(buf_updates): send updates when putting past last line
Fixes #13710
2021-02-08 19:08:42 +01:00
Björn Linse
b2b47e4618
Merge pull request #13899 from chentau/set_text_fix
correctly mark changed regions for set_text
2021-02-08 19:08:43 +01:00
Matthieu Coudron
00423730b5
Merge pull request #13843 from teto/notif_provider
[RDY] Notification provider
2021-02-08 15:49:27 +01:00
chentau
05605bfc05 correctly mark changed regions for set_text 2021-02-07 13:50:29 -08:00
smolck
ad1a437835 vim.fn: add test for error 2021-02-04 09:22:27 -06:00
Björn Linse
209fb35acd tests: clean up lua/buffer_updates_spec.lua 2021-02-04 14:35:30 +01:00
Björn Linse
aa50369897 inccommand: preserve extmarks when undoing preview substitution 2021-02-04 14:33:37 +01:00
Matthieu Coudron
a90a43796a test: test vim-notify 2021-02-02 15:40:08 +01:00
Michael Lingelbach
563d7b694b tests: add test for cursor postion when deleting buffer lines 2021-01-31 12:43:48 -08:00
James McCoy
27a7a4d384
Use abort() instead of assert(false) for things that should never happen
assert() is compiled out for release builds, but we don't want to
continue running in these impossible situations.

This also resolves the "implicit fallthrough" warnings for the asserts
in switch cases.
2021-01-31 11:28:52 -05:00
James McCoy
db734ae994
test(job): Ensure job-specific env var overrides global env var 2021-01-31 07:54:21 -05:00
James McCoy
a199363be2
Pass environment on to pty processes on Windows
vim-patch:8.2.0239: MS-Windows: 'env' job option does not override existing vars

Problem:  MS-Windows: 'env' job option does not override existing
          environment variables.  (Tim Pope)
Solution: Set the environment variables later. (Yasuhiro Matsumoto,
          closes vim/vim#5485, closes vim/vim#5608)
355757aed6

Co-authored-by: erw7 <erw7.github@gmail.com>
2021-01-31 07:54:21 -05:00
James McCoy
7f50c69268
Use dict_T to pass env vars to process spawning code
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
2021-01-31 07:54:20 -05:00
Mathias Fußenegger
459a6c845e
lsp/tests: Ensure client is stopped in basic_init tests (#13798) 2021-01-27 15:32:07 +01:00
chentau
f0ccac0ba4 lint 2021-01-26 17:09:35 -08:00
Tony Chen
d95a465b43 Don't show entire context when completing 2021-01-26 17:04:32 -08:00
TJ DeVries
901dd79f6a feat: add completion to ':lua' 2021-01-26 17:04:31 -08:00
Matthieu Coudron
69103ff0cf
Merge pull request #13807 from spywhere/min-size-auto-sign
Auto sign column with minimum size support
2021-01-23 22:46:29 +01:00
Björn Linse
bdfd023f81
Merge pull request #13813 from notomo/fix-nvim-echo-clear
api(echo): should clear cmdline before echo
2021-01-22 09:59:02 +01:00
Björn Linse
b803bfa5aa
Merge pull request #13679 from chentau/gravity
Extmarks api: allow for gravity
2021-01-22 09:55:00 +01:00
notomo
d3989ea8e8 api(echo): should clear cmdline before echo 2021-01-21 21:49:42 +09:00
Sirisak Lueangsaksri
83ea08ddf3 opt: add tests (#13783) 2021-01-20 23:57:21 +07:00
notomo
8e86f5e460 api: nvim_echo 2021-01-20 16:41:39 +01:00
Thomas Vigouroux
d9c1586e4a
Merge pull request #13765 from jvgrootveld/ts-default-start-end-row-on-capture
treesitter: default start and end row when omitted
2021-01-20 10:32:48 +01:00
Mathias Fußenegger
3f63100d5b
LSP: Fix nil settings handling in workspace/configuration (#13708)
The `workspace/configuration` handler could fail with the following
error if `config.settings` is nil:

    runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)"

This ensures that `config.settings` is always initialized to an empty
table.
2021-01-18 19:33:10 +01:00
Michael Lingelbach
abbfaf286f
logs: make kXDGCacheHome if it doesn't exist (#13758) 2021-01-16 21:14:59 +01:00
“jvgrootveld”
a2818819bb treesitter: default start and end row when omitted
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.
2021-01-15 21:44:40 +01:00
Michael Lingelbach
ea8756f85d
logging: move to XDG_CACHE_HOME (#13739)
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`.
2021-01-13 23:20:21 +01:00
TJ DeVries
9f3b2a757b
lsp: Add severity_limit for other diagnostics features (#13528)
* lsp: Add severity_limit for other diagnostics

* docs and tests

* fix: lint

* Add to other types

* fix: lint
2021-01-12 12:58:50 -05:00
TJ DeVries
e0a4399adc
fix(lsp): Allow subsequent text document edits to pass (#13534)
* fix: Allow subsequent text document edits to pass

* fixup: cleaner code

* add tests
2021-01-11 11:39:11 -05:00
ffanzhang
0860d9c164
Use uv_os_homedir and current directory as backup when $HOME is not set (#13657)
Close https://github.com/neovim/neovim/issues/8614

Use uv_os_homedir and current directory as backup if HOME env is not set.
Allocate homedir only if var is not NULL.
2021-01-10 19:46:25 -05:00
Jan Edmund Lazo
5b897acfc1
test/old: restore test_backspace_opt.vim
Porting it to test/functional/legacy/backspace_opt_spec.lua
was a mistake.
Tests pass after commenting out some lines for Vi compatibility.

File is copied from Vim as of patch v8.2.0540.
Patch v8.2.0540 cannot be fully ported yet.
This file is a prequisite for future v8.2.x patches.
2021-01-05 09:47:38 -05:00
chentau
6127661024 forgot to update tests 2021-01-05 00:39:07 -08:00
Björn Linse
4cdc8b1efd input: consider "-- more --" state to be blocking, fixes #11899 2021-01-04 09:41:25 +01:00
chentau
10b278bdae allow for extmark gravity to be set through api 2021-01-03 13:59:24 -08:00
Thomas Vigouroux
fd960a33e4
fix: check for valid buffer handles in modify_keymap (#13543)
Fixes #13541
Neovim would crash when trying to map a key on non existant buffer
2021-01-03 19:14:18 +01:00
Björn Linse
a58d96a7ed buffer updates: mark sorted region as changed.
NB: currently this invalidates all extmarks inside the region.
Later on within-line extmarks could be preserved
2021-01-03 14:47:37 +01:00
Björn Linse
adb01190c4 tests: make treesitter its own category 2021-01-03 14:47:29 +01:00
Matthieu Coudron
48caf1df85
Merge pull request #13649 from mjlbach/move_from_nvim-lspconfig
LSP: Move workspace/configuration from nvim-lspconfig to core
2021-01-01 23:52:48 +01:00
Jan Edmund Lazo
5eccfd2b2e
Merge pull request #13655 from janlazo/vim-8.2.2255
vim-patch:8.1.{1241,1261,1275,1281,1549,1590,1881,2079,2322,2360,2411},8.2.{113,388,934,2255,2258,2260,2269}
2021-01-01 17:40:26 -05:00
Jan Edmund Lazo
52bfaea70e
test/win: skip vargs memory usage on Github Actions
This test can fail on any of the Windows builds
because Github Actions does not provide enough stability
and enough memory for all runners..

Check test requirements before running any test cases
to avoid duplicate checks.
2021-01-01 17:13:43 -05:00
Björn Linse
dac3b35ece
Merge pull request #11833 from bfredl/set_text
nvim_buf_set_text
2021-01-01 20:21:09 +01:00
Björn Linse
90f619f140
Merge pull request #13592 from bfredl/setmouse
ui: make 'mouse' handling in external UI more consistent
2021-01-01 20:04:09 +01:00
Björn Linse
39d098f9f9 api: set_text: fix some byte count issues
add byte count tests

update documentation
2021-01-01 19:51:58 +01:00
chentau
f7d01a65d5 api: set_text: more tests, and fixing lint
removing pending virtcol tests

Allow passing in empty array as a shorthand for array with empty string; add more documentation

add check for start_row as well
2021-01-01 19:51:58 +01:00
Tony Chen
45b14f88db api: set_text: rebase, update to new api, and add more tests 2021-01-01 19:51:45 +01:00
Blaž Hrastnik
29ad2ebc16 api: set_text: fix validation and some issues
fix double free because intermediary lines weren't xmemdup'd.

NL-for-NUL dance.

Normalize row indices and perform more validation.

Adjust the cursor position if it's on the right side of the replacement.

Tests and documentation.
2021-01-01 19:51:37 +01:00
Björn Linse
6db86cb2d3 ui: make 'mouse' handling in external UI more consistent
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.
2021-01-01 15:47:44 +01:00
erw7
5cf94effee
test, legacy/assert_spec.lua: fix few tests fail
Adjust failing tests to current behavior due to changes in assert_fails
behavior by fbd6a86.
2021-01-01 04:58:05 -05:00
Michael Lingelbach
f3bbc92476 LSP: add test for workspace/configuration handler 2021-01-01 01:40:46 -08:00
erw7
a66d63f36e
test, provider/define_spec.lua: fix few tests fail
fbd6a86 changes the behavior of :command-range and no longer allows
arbitrary numbers. Adjust tests to reflect this behavior.
2021-01-01 04:30:55 -05:00
Jan Edmund Lazo
b01a60b1aa
Revert "vim-patch:8.1.0822: peeking and flushing output slows down execution"
This reverts commit 0519a75f6e.
2020-12-31 16:44:53 -05:00
Jan Edmund Lazo
723e009214
Revert "vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc"
This reverts commit 44bb7147e4.

Avoid regression mentioned in c64cce906e (commitcomment-45554271)
2020-12-31 16:44:53 -05:00
Matthieu Coudron
9c68aac37b tests: check highlights work in open folds
to prevent a regression we just witnessed
2020-12-30 23:32:40 +01:00
Matthieu Coudron
b0215afc84
fix(fold): dont highlight search results on folded lines (#13616)
Behavior may change in future but for now stick to legacy behavior.
2020-12-29 01:19:24 +01:00
Jan Edmund Lazo
44bb7147e4
vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc
Problem:    Mode is not cleared when leaving Insert mode with mapped Esc.
Solution:   Clear the mode when redraw_cmdline is set. (closes vim/vim#4269)
4c25bd785a
2020-12-26 02:34:13 -05:00
Jan Edmund Lazo
0519a75f6e
vim-patch:8.1.0822: peeking and flushing output slows down execution
Problem:    Peeking and flushing output slows down execution.
Solution:   Do not update the mode message when global_busy is set.  Do not
            flush when only peeking for a character. (Ken Takata)
cb574f4154
2020-12-25 19:25:30 -05:00
Jan Edmund Lazo
8cf4a02bf2
vim-patch:8.1.2212: cannot see the selection type in :reg output
Problem:    Cannot see the selection type in :reg output. (Ayberk Aydın)
Solution:   Add c/l/b. (Christian Brabandt, closes vim/vim#5110, closes vim/vim#4546)
3691f1ee72

Patch v8.1.0999 is not ported so ":registers" does not omit register 1.
2020-12-25 10:17:00 -05:00
Lukas Reineke
88ae03bcdb
feat(sign):Allow signs to be 0 width (#13290)
Adds support for signs to be 0 cells wide. If all signs of the same
group have no width, the signcolumn will not be rendered for that group.
2020-12-24 17:33:52 +01:00
Björn Linse
95352f490a rpc: don't handle stale requests on already closed channel 2020-12-23 23:58:56 +01:00
Jan Edmund Lazo
b1711e6f92
foldcolumn: support "auto" (#13571)
"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
2020-12-20 15:20:42 -05:00
Björn Linse
2debabb080
Merge pull request #13355 from notomo/check-textlock-in-api
api: add textlock check
2020-12-16 15:40:21 +01:00
Björn Linse
5e202f69b3
Merge pull request #13367 from nvim-treesitter/offset-lang-injection
feat(treesitter): add offset predicate for language injection
2020-12-16 13:59:36 +01:00
notomo
30ef8c693c test: textlock api error 2020-12-16 21:57:24 +09:00
Thomas Vigouroux
25e20da550
feat(buffer_updates): allow ignoring when previewing
Also adds a test that we actually subscribe to buffer events when in
CMDPREVIEW.
2020-12-15 22:29:27 +01:00
Steven Sojka
929f194145 feat(treesitter): add offset predicate for language injection
refactor(treesitter): add directives to queries
2020-12-15 07:03:47 -06:00
Jan Edmund Lazo
da58242fb8
test/functional/eval: assert that executable() fixtures are executable 2020-12-11 22:59:43 -05:00
Jan Edmund Lazo
5ccc79e880
eval: executable(), exepath() accept strings only
Cherry-pick f_executable(), f_exepath(), check_for_string() from patch 8.2.2117.
Rename check_for_string() to tv_check_for_string().
7bb4e74c38

Close https://github.com/neovim/neovim/issues/13485
2020-12-11 21:20:20 -05:00
Jan Edmund Lazo
062576f679
vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)
Problem:    Cannot skip tests for specific MS-Windows platform.
Solution:   Add windowsversion().
0c1e3744ff
2020-12-11 19:45:22 -05:00
Edwin Pujols
f2ec058602
tests: Take into account magic hyphen. (#13518)
In Lua patterns the hyphen works like a non-greedy version of Vim's `*`.
- Use `%-` when you need a literal hyphen.
- If you don't need a regular expression at all, use something like
  ```
  string.find(text, pattern, 1, true)
  ```
  so that the pattern is regarded as a plain, non-magical string.
  See [1] and [2] in the Lua manual.

[1]: https://www.lua.org/manual/5.1/manual.html#pdf-Patterns
[2]: https://www.lua.org/manual/5.1/manual.html#pdf-string.find
2020-12-11 18:54:39 -05:00
Björn Linse
52e660e857
Merge pull request #13482 from dm1try/propagate_lua_file_loading_errors
runtime: propagate lua parsing errors while using "require"
2020-12-10 12:15:40 +01:00
Thomas Vigouroux
99007bcc12
Merge pull request #13450 from nvim-treesitter/fix-unknown-language-parser
fix(treesitter): don't throw an error for missing injected langs
2020-12-10 11:12:39 +01:00
dm1try
3421485253 runtime: propagate lua parsing errors while using "require" 2020-12-10 10:53:28 +01:00
Thomas Vigouroux
5855a3ea7b
Merge pull request #13449 from nvim-treesitter/fix-language-for-range
fix(treesitter): incorrect method name call
2020-12-06 23:27:38 +01:00
shirasaka
9601e7c5d5 ui: Fix win_hide distination grid
When create tab, win_hide sent to new tab and new tab's previous tab.
So, if created tab that not next tab (eg. $tabnew cmd),
send win_hide to not current tab, and fixed this.
2020-12-05 20:18:51 +09:00
Steven Sojka
e15c5f58df fix(treesitter): don't throw an error for missing injected langs 2020-12-04 16:56:29 -06:00
Steven Sojka
2985c17867 fix(treesitter): incorrect method name call 2020-12-04 16:15:47 -06:00
Björn Linse
6c344a75d4
Merge pull request #13173 from tjdevries/tjdevries/option_info
api: add option metadata
2020-12-04 13:45:32 +01:00
Björn Linse
17a58043a3 api/options: cleanup the fixup 2020-12-04 13:29:44 +01:00
TJ DeVries
ced951c2aa api/options: fixup 2020-12-04 13:29:44 +01:00
Mathias Fußenegger
f5e0f17968
lsp: Change diagnosticg.get_all to return {bufnr: Diagnostic[]} (#13310)
Allows users to associate the diagnostics with the right bufnr.
2020-12-03 14:22:15 -05:00
eightpigs
fa73bb70fc
lsp: Fix "unsupported_method" error when the buffer does not have an LSP Server (#13175) 2020-12-03 01:00:54 -05:00
Jan Edmund Lazo
d80f262f89
Merge pull request #13428 from janlazo/nvim-8.0.1525
vim-patch:8.0.{858,953,1525}
2020-12-01 19:02:38 -05:00
Björn Linse
72c22862dc
Merge pull request #12235 from dm1try/add_init_lua
add init.lua as an alternative user config
2020-12-01 18:54:50 +01:00
Jan Edmund Lazo
518fe0e8a2
test/wildmode_spec: override $PS1
User config may set $PS1 for a colored prompt.
It breaks the screen tests.
2020-12-01 08:52:34 -05:00
Jan Edmund Lazo
4b74996dbc
test/timer_spec: increase base timeout
The following keeps happening in my local environment
because the timeout is too short.

[  FAILED  ] test/functional/eval/timer_spec.lua @ 208: timers do not crash when processing events in the handler
test/functional/eval/timer_spec.lua:219: retry() attempts: 1
test/helpers.lua:73: Expected objects to be the same.
Passed in:
(number) 0
Expected:
(number) 1
2020-12-01 08:52:34 -05:00
Jan Edmund Lazo
56f5e3bd6b
vim-patch:8.0.1525: using :wqa exits even if a job runs in a terminal window
Problem:    Using :wqa exits even if a job runs in a terminal window. (Jason
            Felice)
Solution:   Check if a terminal has a running job. (closes vim/vim#2654)
7a76092a51
2020-12-01 08:52:33 -05:00
dm1try
33f324796c startup: allow lua files as session one 2020-12-01 10:51:31 +01:00
dm1try
767cd8b17b startup: add init.lua as an alternative user config, fixes #7895 2020-12-01 10:51:25 +01:00
dm1try
13b8857300 path: add helper for checking a file extension 2020-12-01 10:50:38 +01:00
Björn Linse
bed9839f46 ex_getln: add secret charm
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.
2020-12-01 00:57:52 +01:00
Matthieu Coudron
15e616a057
folds: use Folded highlight even with spell on (#13393)
the highlight was not used with spell enabled on folded lines.
Thanks to lervag for the nice report.
2020-11-29 14:26:59 +01:00
shade-of-noon
2d5dd85eef
screen.c: Allow showbreak to override cursorline. (#13372)
I also added relevant tests.

Close #13369
2020-11-25 16:47:03 +01:00
Björn Linse
ca7fa2a43a
Merge pull request #13357 from vigoux/luahl-priority
feat(luahl): add priority mechanism
2020-11-25 12:43:08 +01:00
Thomas Vigouroux
c0a6989d93
feat(luahl): add priority mechanism
Base priority is 0x1000, in order to stay kinda backward compatible.
Also set tree-sitter default highlight to 100 (middle-ish value)
2020-11-25 10:10:05 +01:00
Björn Linse
a6bd52d877
Merge pull request #13366 from bfredl/path3a
api: enable nvim_get_runtime_file to find subdirectories
2020-11-24 16:47:48 +01:00
Björn Linse
d285fa73da api: enable nvim_get_runtime_file to find subdirectories 2020-11-24 14:18:46 +01:00
Thomas Vigouroux
dd876a1548
Merge pull request #13322 from teto/remove_curwin
refactor: pass window to was_set_insecurely
2020-11-24 07:10:55 +01:00
Matthieu Coudron
7eb0c16dc8 fix(fold): use Folded highlight even with spell on
Partially addresses https://github.com/neovim/neovim/issues/12982. It's
more a quickfix while reworking folds.
2020-11-23 21:06:56 +01:00
Thomas Vigouroux
52d76f0a32
fix(treesitter): allow ranges in set_included_ranges 2020-11-23 15:09:32 +01:00
Steven Sojka
1a631026a9
feat(treesitter): add language tree
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>
2020-11-23 08:06:17 +01:00
James McCoy
4ad7092abf
test: Add GitHub actions support to helpers.isCI 2020-11-22 14:41:55 -05:00
Jan Edmund Lazo
e192a4600a
Merge pull request #13307 from janlazo/vim-8.1.0777
vim-patch:8.1.{323,777,933,938},8.2.{178,248,547,581,592,646,658,793,1608,1975,1991,1992,1993,1994,1998,1999,2003,2007,2008,2009}
2020-11-21 10:52:16 -05:00
Björn Linse
3c2402e5c2
Merge pull request #13250 from bfredl/missinglink
allow nvim_set_hl to break existing links
2020-11-21 13:11:17 +01:00
Björn Linse
a4986ab47f decorations: allow nvim_set_hl to break existing links
also add `default` flag to NOT break existing links/defs
2020-11-21 11:24:14 +01:00
Jan Edmund Lazo
172d5b6561
test: rewrite powershell tests to remove timeout
TSAN kept failing and Appveyor sometimes fails on the same test.
2020-11-20 19:55:17 -05:00
erw7
a539a12d72
test: add functional test for segmented response from terminal 2020-11-20 09:26:17 -05:00
erw7
6c1e1fe772
test,unit: Change test according to change of bg color response processing
Adjust the test for handle_background_color() according to
bd0275182b1c1b14c43dc4fc7e9f9da05071e56c.
2020-11-20 09:26:17 -05:00
James McCoy
978857e0c2
Merge pull request #12592 from jamessan/fix-mod-keys 2020-11-20 09:15:39 -05:00
Björn Linse
a119fe15da startup: load files from &packpath . '/start/{pluginname}'
Quoting the existing docs:

    Packages are loaded.  These are plugins, as above [&runtimepath], but
    found in the "start" directory of each entry in 'packpath'.  Every
    plugin directory found is added in 'runtimepath' and then the plugins
    are sourced.

Also tj didn't think I could do it.
2020-11-19 14:31:07 +01:00
James McCoy
a88bc4d95e
keymap: Preserve S- modifier when C- is present
Closes #12037
2020-11-16 18:52:23 -05:00
Thomas Vigouroux
6a2cd57886
fix(floatwin): don't always use winheight 2020-11-16 14:37:24 +01:00
Matthieu Coudron
1b8867ab39
Merge pull request #13293 from janlazo/vim-8.2.1976
vim-patch:8.2.{1979,1981,1982,1985,1987}
2020-11-15 18:18:12 +01:00
Jan Edmund Lazo
35874208b8
globals: eliminate "has_mbyte" macro
"has_mbyte" always evaluates to "true".
Continue dead code removal, started in https://github.com/neovim/neovim/pull/13275.
2020-11-14 17:23:51 -05:00
Mathias Fußenegger
0798ad3a3a
lsp: Expose all diagnostics (#13285)
* 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.
2020-11-14 14:39:05 -05:00
Jan Edmund Lazo
d8c69adbab
Merge pull request #12698 from erw7/fix-popupmenu-with-rl
ui: fix problem with the popupmenu when rightleft is set
2020-11-13 23:09:57 -05:00
James McCoy
7c4f349661
Merge pull request #13287 from jamessan/github-actions 2020-11-13 14:13:42 -05:00
Alvaro Muñoz
aaca2c1c4d
feat(lua): improve error message to make it actionable (#13276)
* improve error message to make it actionable
2020-11-13 19:50:03 +01:00
James McCoy
f23b906ddd
GHA: Skip tests that fail due to actions/runner#241 2020-11-13 13:36:57 -05:00
TJ DeVries
f75be5e9d5
lsp: vim.lsp.diagnostic (#12655)
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)
2020-11-12 22:21:34 -05:00
James McCoy
31366c44c4
Add PVS comment to new source files 2020-11-10 11:19:59 -05:00
Matthieu Coudron
e786fb5afb
Merge pull request #13244 from tk-shirasaka/fix/multigrid-click-foldcolumn
ui: Fix click on foldcolumn when ext_multigrid is enabled
2020-11-10 00:54:54 +01:00
Björn Linse
42ffa2d62e
Merge pull request #13205 from romgrk/add-bufmodified-autocmd
Implement BufModifiedSet autocmd
2020-11-09 12:23:14 +01:00
Rom Grk
11326761c7 test: update BufModifiedSet to be paranoid 2020-11-09 04:06:53 -05:00
shirasaka
19bb177512 Add test case for fold on multigrid 2020-11-09 15:05:23 +09:00
Rom Grk
45d9f4fe6f test: fix BufModifiedSet 2020-11-07 22:17:18 -05:00
Rom Grk
3628d1ef72 tests: add functional test for BufModifiedSet 2020-11-07 19:18:00 -05:00
Andrea Cedraro
4c7ad9527d
Add v:event flag on DirChanged signaling switching window (#13153)
Closes #9909
2020-11-07 12:02:06 -05:00
Björn Linse
e5d83a3bf3
Merge pull request #13117 from romgrk/add-scroll-events
Implement scroll autocommand
2020-11-07 15:13:20 +01:00
Rom Grk
cedfc1b747 my fight with the linter (tome II) 2020-11-06 23:44:32 -05:00
Björn Linse
1b0e4a5906 lua: make vim.inspect available early so it can be used for path debugging 2020-11-05 14:46:41 +01:00
Thomas Vigouroux
8e73cf6731
tree-sitter: ignore some tests on windows
Weirdl this test is failing, but can't reproduce locally, this is an
unnecessary blocker for this PR.
2020-11-03 10:39:36 +01:00
Rom Grk
13e0ca3e19 Merge branch 'master' into add-scroll-events 2020-11-03 03:11:08 -05:00
Jan Edmund Lazo
0d9fa42d83
fixup! startup: handle autoload and lua packages during startup 2020-11-02 22:37:07 -05:00
Björn Linse
c60c7375f5 startup: handle autoload and lua packages during startup
¡NO HAY BANDA!
2020-11-02 15:21:36 +01:00
Björn Linse
d1091bc658
Merge pull request #12870 from bfredl/themepark
Color themes (per window/line) and lua theme providers
2020-11-01 21:54:51 +01:00
Björn Linse
c146eddc8b api: add API for themes
co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function)

orange is sus??

NOVEMBER DAWN

erase the lie that is redraw_later()
2020-11-01 19:14:56 +01:00
Jan Edmund Lazo
ba1ff71078
Merge pull request #13197 from janlazo/vim-8.2.1925
vim-patch:8.2.{639,666,1925,1926,1929,1932}
2020-11-01 12:03:56 -05:00
Björn Linse
8821587748
Merge pull request #13192 from bfredl/nodeid
] treesitter: add node:id()
2020-11-01 17:27:38 +01:00
Jan Edmund Lazo
925ddd2839
vim-patch:8.2.1925: list/dict test fails
Problem:    List/dict test fails.
Solution:   Correct expected exception.
6d967125ad

Cherry-pick e_dictkey[] change from patch 8.2.1924.

N/A patches for version.c:

vim-patch:8.2.1929: MS-Windows: problem loading Perl 5.32

Problem:    MS-Windows: problem loading Perl 5.32.
Solution:   Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closes vim/vim#7234)
0289065e41

vim-patch:8.2.1932: compiler warnings when building with Athena GUI

Problem:    Compiler warnings when building with Athena GUI.
Solution:   Fix function signatures.
963734e316
2020-11-01 09:28:33 -05:00
Björn Linse
03c478ae53 treesitter: add node:id() 2020-11-01 14:59:17 +01:00
Jan Edmund Lazo
bc68653a86
Merge pull request #13167 from romgrk/vim-8.2.1909
vim-patch:8.2.1909: number of status line items is limited to 80
2020-10-31 20:31:42 -04:00
Rom Grk
10bf69a43e vim-patch:8.2.1909: number of status line items is limited to 80
Problem:    Number of status line items is limited to 80.
Solution:   Dynamically allocate the arrays. (Rom Grk, closes vim/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.
2020-10-31 19:54:06 -04:00
Rom Grk
a58d06ebfc tests: separate scroll test for horizontal/vertical scroll 2020-10-31 17:29:21 -04:00
Rom Grk
d9a58573fd tests: make scroll tests pass 2020-10-30 03:22:52 -04:00
Jan Edmund Lazo
3d6584223d
vim-patch:8.2.0131: command line is not cleared when switching tabs
Problem:    Command line is not cleared when switching tabs and the command
            line height differs.
Solution:   Set the "clear_cmdline" flag when needed. (Naruhiko Nishino,
            closes vim/vim#5495)
479950f6c9
2020-10-29 18:36:38 -04:00
Rom Grk
929d00db0f tests: add functional test for WinScrolled 2020-10-28 04:32:25 -04:00
Matthieu Coudron
a22fe09b90
Merge pull request #13154 from fsouza/fix-callback-logic
[RDY] lsp: fix fallback for callback in method_unsupported
2020-10-25 22:09:41 +01:00
Björn Linse
c3ef198132
Merge pull request #13077 from tjdevries/tjdevries/buf_apis_1
api: nvim_buf_delete
2020-10-25 18:46:57 +01:00
francisco souza
1f0f92f8ec
lsp: fix fallback for callback in method_unsupported
Missed this #12764. My bad :((
2020-10-25 08:17:34 -04:00
francisco souza
6312792d8a
lsp: only send buf requests to servers that support the request (#12764)
Refactors how required capabilities are detected and validated, and make
sure requests are only sent to clients that support it (and only fail if
no clients support the provided method).

The validation happens at the buf_request level, because we assume that
if someone is sending the request directly through the client, they know
what they're doing. Also, let unknown methods go through.

This is extracted from #12518 and closes #12755.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-10-25 00:28:15 -04:00
Rom Grk
bcf79c62bc tests: add test for Scroll autocmd 2020-10-24 05:48:00 -04:00
erw7
f5c9065f3e Fix popupmenu position issue 2020-10-23 12:36:32 +09:00
TJ DeVries
78556aba7d api: nvim_buf_delete 2020-10-22 16:08:32 -04:00
Alex Genco
ed0a70087a vim-patch:8.1.1056: no eval function for Ruby
Problem:    No eval function for Ruby.
Solution:   Add rubyeval(). (Ozaki Kiichi, closes vim/vim#4152)
e99be0e6d2
2020-10-21 10:20:21 -07:00
Björn Linse
38efa1730f
Merge pull request #13118 from bfredl/mudholland
A Mudholland Dr. Recast
2020-10-19 23:14:55 +02:00
Björn Linse
07cc231142 A Mudholland Dr. Recast
The commit summary maybe does not make sense, but calling a function
that does not wait on anything `wait()` makes even less sense.
2020-10-19 21:48:06 +02:00
TJ DeVries
0ad5b34170
Merge pull request #12053 from tjdevries/tjdevries/nicer_validate
vim.validate(): include stacktrace in message
2020-10-17 16:47:18 -04:00
Thomas Vigouroux
bdbc56f931 treesitter: allow custom parser for highlighter
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>
2020-10-12 18:23:14 +02:00
Björn Linse
d198aa511a
Merge pull request #13059 from vigoux/ts-runtime-queries
treesitter: runtime queries
2020-10-12 11:57:09 +02:00
Hansraj Das
1709210a53
Fix multiple typos (#13063)
* Fix multiple typos in `src/nvim/api/ui_events.in.h`
* Below spellings are corrected:
  * Definitions
  * Revision
  * Performance

* Typo fix `presense` should be presence

* Typo fix, follwed -> followed

* Typo fix, attemping -> attempting

* Typo fix, duplicate 'the'

* Typo fix, bounaries -> boundaries

* Revert "Typo fix, bounaries -> boundaries"

This reverts commit 24779e55e596f7534585938a7e532830ad2fa83c.

* Revert "Typo fix, duplicate 'the'"

This reverts commit 1d41d74f78736e67821a15edc9c174a2c3024f87.

* Revert "Typo fix, attemping -> attempting"

This reverts commit d8b2860dfcac366af7afae1f09946ed0aee4a34e.
2020-10-12 09:28:12 +02:00
Thomas Vigouroux
d3f544002c treesitter: runtime queries
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>
2020-10-11 21:18:28 +02:00
Jan Edmund Lazo
4a54472098
vim-patch:8.2.1101: no error when using wrong arguments for setqflist()
Problem:    No error when using wrong arguments for setqflist() or
            setloclist().
Solution:   Check for the error.
be7a50c22f
2020-10-11 01:24:54 -04:00
Björn Linse
0b615dae07 api: multiple decoration providers at once 2020-10-10 15:16:45 +02:00
Aufar Gilbran
a893593a9f
vim-patch:8.2.1488: text does not scroll when inserting above first line
Problem:    Text does not scroll when inserting above first line.
Solution:   Adjust off-by-one error. (Ken Takata, closes vim/vim#6739)
9dc1917f42
2020-10-07 23:41:50 +08:00
Aufar Gilbran
e852bad3a7
vim-patch:8.2.1345: Redraw error when using visual block and scroll
Problem:    Redraw error when using visual block and scroll.
Solution:   Add check for w_topline. ( closes vim/vim#6597)
f8992d47cd
2020-10-07 23:41:38 +08:00
TJ DeVries
7b89353985
lua: vim.wait allows control of fast events (#13053)
* lua: vim.wait allows control of fast events

* fixup: remove requirement of function for easier waiting

* fixup: lint

* fixup: bfredl comments
2020-10-06 12:58:05 -04:00
Matt Wozniski
2f06413dfb Treat unmapped ALT/META as ESC+c in all modes
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.
2020-10-05 15:27:04 -04:00
Justin M. Keyes
8e77d70e29 test/vim.validate(): assert normalized stacktrace
- 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()
2020-10-05 09:47:59 -04:00
TJ DeVries
aad7a74053 vim.validate(): include stacktrace in message 2020-10-05 09:47:59 -04:00
Jan Edmund Lazo
86ab4a1cb4
vim-patch:8.2.0841: 'verbose' value 16 causes duplicate output
Problem:    'verbose' value 16 causes duplicate output.
Solution:   Combine levels 15 and 16 into one message. (Christian Brabandt,
            closes vim/vim#6153)
823654bc06
2020-10-03 01:06:24 -04:00
Thomas Vigouroux
c10c2fab5b
Merge pull request #12968 from erw7/fix-substitute2
fix substitute problem with inccommand
2020-10-02 09:56:57 +02:00
erw7
620c8fdfe9 extmark: fix decoration ploblems with extmark
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.
2020-10-02 11:41:30 +09:00
erw7
8154c77bef screen.c: fix buffer overflow due to folding
fixes #12988.
2020-10-01 17:25:19 +09:00
KillTheMule
02dcc3c11a Fix byte updates for blockwise paste at buffer end 2020-09-30 21:28:21 +02:00
Thomas Vigouroux
c1a740ae33 bytetrack: add blockwise paste test 2020-09-30 20:10:06 +02:00
KillTheMule
ba515622fb Fix buffer_updates on blockwise paste
Fixes #12718.
2020-09-30 20:10:05 +02:00
Thomas Vigouroux
3c5141d2cf
treesitter: add string parser (#13008) 2020-09-30 09:32:43 -04:00
Thomas Vigouroux
d5adc8c00e
Merge pull request #12903 from justinmk/checkcores
lua/check_cores(): check uname instead of TRAVIS_OS_NAME
2020-09-30 08:18:05 +02:00
Jan Edmund Lazo
83ebe0c998
vim-patch:8.1.1992: the search stat moves when wrapping at the end of the buffer
Problem:    The search stat moves when wrapping at the end of the buffer.
Solution:   Put the "W" in front instead of at the end.
16b58ae9f3
2020-09-29 21:36:00 -04:00
Omri Sarig
f520c1ef85
test: Fix failing test in case of special .bashrc (#12920)
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.
2020-09-28 22:20:49 +02:00
Björn Linse
a958039f0a screen: more work on fold_line replacement 2020-09-24 19:31:58 +02:00
Matthieu Coudron
f8134f2fd1 screen.c: remove fold_line
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.
2020-09-24 15:43:25 +02:00
Björn Linse
3610d0091f test: buffer updates: add visual charwise paste test 2020-09-19 15:50:35 +02:00
Björn Linse
b7fc7ac6a1 buffer updates: fix issues with "change" operator 2020-09-19 10:01:00 +02:00
Björn Linse
4cc2a7af4b tests: lua buffer updates: reorg check_events() 2020-09-19 09:58:31 +02:00
Thomas Vigouroux
179f0bca18 buf_updates: fix wrong updates on linewise change 2020-09-18 17:54:49 +02:00
Thomas Vigouroux
6dc815530b
buf_updates: fix updates for empty buffers (#12926)
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.
2020-09-17 23:34:28 +02:00
Thomas Vigouroux
cecc45efb1 api(extmarks): allow extrange past final newline 2020-09-17 21:23:52 +02:00
Thomas Vigouroux
9a7f111db6 treesitter: filter updates on <CR>
This fixes an error when fo=ro, when hitting <CR> to insert a new
comment line.
2020-09-16 16:35:17 +02:00
Björn Linse
34c0f7af04 buf_attach: fix buffer updates with setline() 2020-09-16 13:50:16 +02:00
Björn Linse
ead2fcf4ee api: add nvim_buf_call to call function with curbuf changed to buffer 2020-09-13 09:11:38 +02:00
Thomas Vigouroux
e4b5efa51e fix: use luahl in treesitter 2020-09-13 07:46:39 +02:00
erw7
397be5d380 UI: fix cursor not displayed after hiding and un-hiding #12811
- 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 #12800
close #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.
2020-09-12 11:42:42 -07:00
Justin M. Keyes
34e4d2f25e lua/check_cores(): check uname instead of TRAVIS_OS_NAME 2020-09-12 11:12:04 -07:00
Jan Edmund Lazo
b23907e7ce
Merge pull request #12721 from aufarg/vim-8.1.0265
[RDY] vim-patch:8.1.{265,271,273,274,275,277,278,279,280,281,282,284,286,291,295,296,320,321,339,351,392,399,552}
2020-09-12 10:51:59 -04:00
Thomas Vigouroux
a8f71676a1 fix(bufupdates): avoid sending empty updates 2020-09-11 14:48:10 +02:00
Thomas Vigouroux
f0e258cf85 fix(bytetrack): send correct events when opening lines
a bit of test cleanup

ärrår

feeel

SPLIT

fix: sned correct updates on <CR>
2020-09-11 14:38:58 +02:00
Aufar Gilbran
77bb48e740 vim-patch:8.1.0295: no 'incsearch' highlighting for :vimgrep and similar
Problem:    No 'incsearch' highlighting for :vimgrep and similar commands.
Solution:   Parse the :vimgrep command and similar ones to locate the search
            pattern. (Hirohito Higashi, closes vim/vim#3344)
264cf5cfaf
2020-09-11 10:33:20 +08:00
Aufar Gilbran
ab7e101540 vim-patch:8.1.0291: 'incsearch' highlighting not used for :sort
Problem:    'incsearch' highlighting not used for :sort.
Solution:   Handle pattern in :sort command.
81f56536b1
2020-09-11 10:33:20 +08:00
Aufar Gilbran
e8a8b9ed08 vim-patch:8.1.0271: 'incsearch' doesn't work for :s, :g or :v
Problem:    'incsearch' doesn't work for :s, :g or :v.
Solution:   Also use 'incsearch' for other commands that use a pattern.
b0acacd767
2020-09-11 10:31:41 +08:00
Björn Linse
f239134fee tests: disable hl glitch test for now, will be fixed in luahl (next PR) 2020-09-10 06:50:04 +02:00
Thomas Vigouroux
82fb6a8818 fix lints 2020-09-09 21:22:21 +02:00
Björn Linse
bc86f76c0a api/buffer: add "on_bytes" callback to nvim_buf_attach
This implements byte-resolution updates of buffer changes.
Note: there is no promise that the buffer state is valid inside
the callback!
2020-09-09 21:22:21 +02:00
Thomas Vigouroux
1ff064126d treesitter: revert wrong optimization in highlights 2020-09-09 16:00:19 +02:00
Justin M. Keyes
59712f6dbe
win: avoid duplicate separators in $PATH #12869
Seems like redundant env var separators (";" on Windows) in $PATH can
cause weird behavior. From #7377:

> After some time, system(['win32yank', '-o']) and system('win32yank -o')
> start returning different results: specifically first returns an
> empty string.
>
> 1. $PATH weirdly contains double semicolon followed by path to the
>    “installation directory” (unpacked directory from archive).
> 2. If I run `let $PATH=substitute($PATH, ';;', ';', 'g')` the problem is fixed.

close #7377
ref 224f99b85d
2020-09-08 20:47:22 -07:00
erw7
aa45579206
win/env: fix stdpath()/XDG_* initialization, parsing #12829
- Windows environment variables are semicolon-separated, but some logic
  was assuming colon (:). This broke initialization and parsing of
  XDG_CONFIG_DIRS, XDG_DATA_DIRS, 'runtimepath', stdpath(), etc.
- test/defaults_spec: enable tests on Windows

ref #12793
2020-09-07 22:40:12 -07:00
Justin M. Keyes
c1d395a6d6
UI: forward 'mousefocus' option #12863
close #12849
ref eb4aab7173
2020-09-06 11:40:07 -07:00
James McCoy
d6b280799f
Merge pull request #12802 from jamessan/travis-ubuntu-bump 2020-09-06 12:52:37 -04:00
James McCoy
83a7b1b5db
test/helpers: Run $SYMBOLIZER to decode sanitizer logs, if it is set 2020-09-06 12:09:36 -04:00
Björn Linse
b397f31ede tests: update query.list_predicates() test 2020-09-06 10:33:13 +02:00
Thomas Vigouroux
dc579c420b treesitter: Use excplicit names in tests 2020-09-06 10:30:40 +02:00
Justin M. Keyes
bedab7e87b
provider: align all foo#Detect() functions #12839
Problem: ruby#Detect() and node#Detect() don't return a [prog, err] pair
which means callers must special-case them.

Solution: align their return signatures with the perl/pythonx providers.
2020-09-05 15:02:46 -07:00
Justin M. Keyes
858c056133
Support for :perl, :perlfile, :perldo and perleval() (#12809)
* support for :perl, :perlfile, :perldo and perleval()

* document that the perl provider doesn't currently work on Windows

* document that the perl legacy interface is now also supported

* added perleval() documentation

* import legacy perl interface tests

* only perl 5.22+ is supported

* healtcheck: use g:perl_host_prog if its set instead

using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
2020-09-05 13:55:06 -07:00
Jacques Germishuys
8705fbf77c healtcheck: use g:perl_host_prog if its set instead
using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
2020-09-05 13:09:15 +01:00
Björn Linse
866308c3de API: be less breaking in the christmas tree decorations 2020-09-04 19:11:26 +02:00
Björn Linse
1e14dacd08
Merge pull request #12847 from nvim-treesitter/ts-list-predicates
treesitter: allow to list supported predicates
2020-09-04 17:01:49 +02:00
Thomas Vigouroux
3fd6e3b923 treesitter: allow to list supported predicates 2020-09-04 15:24:23 +02:00
Björn Linse
49f5b57587 decor: sketch new decorations API
return decorations back

lol no nvim_buf_get_virtual_text

share decorations that are hl only to avoid alloc avalanche
2020-09-03 15:40:24 +02:00
Björn Linse
d3302573ba extmark: move id to dict in nvim_buf_set_extmark 2020-09-03 10:23:52 +02:00
Thomas Vigouroux
4bcf54478a
Merge pull request #12814 from theHamsta/escape-queries
treesitter: avoid escaping complete query strings
2020-09-01 12:50:21 +02:00
Björn Linse
04ab26b885
Merge pull request #12736 from vigoux/ts-iter-children
treesitter: allow to iterate over node children
2020-09-01 10:52:55 +02:00
DDoSolitary
c14a9f6fcc
g📋 allow command given as a list #12775
fixes #12768
2020-09-01 00:27:38 -07:00
Thomas Vigouroux
18217b987f treesitter: add node:field() to get field children 2020-09-01 08:57:55 +02:00
Stephan Seitz
b058c671d2 treesitter: avoid escaping complete query strings
Escape "\\" only for `vim-match?` not for `match?`
Fixes #12595
2020-08-31 17:24:38 +02:00
Thomas Vigouroux
e123fd0a5d treesitter: allow to iterate over node children 2020-08-31 13:42:30 +02:00
Thomas Vigouroux
24b5f69a49
fix(win): ignore closing wins in win_findbuf #12798
This caused segfaults when calling win_findbuf in an `on_detach`
callback, when the callback was triggered when closing the last window
containing the buffer.
2020-08-31 00:53:10 -07:00
Justin M. Keyes
c2662210b5
docs, remove 'guifontset' #11708
- remove redundant autocmd list
  This "grouped" list is useless, it only gets in the way when searching
  for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes #11960
- options: remove 'guifontset'. Why:
  - It is complicated and is used by almost no one.
  - It is unlikely to be implemented by Nvim GUIs (complicated to parse,
    specific to Xorg...).
2020-08-31 00:51:35 -07:00
Anmol Sethi
3229ba0cde
lsp: Fix bad sortText comparison (#12485)
The spec indicates we have to fallback to comparing by label
if sortText is falsy.

Closes #12431
2020-08-30 22:29:47 -07:00
Jacques Germishuys
9bef25314e support for :perl, :perlfile, :perldo and perleval() 2020-08-30 17:19:05 +01:00
Jan Edmund Lazo
45615cedd1
vim-patch:8.2.1472: ":argdel" does not work like ":.argdel" as documented
Problem:    ":argdel" does not work like ":.argdel" as documented. (Alexey
            Demin)
Solution:   Make ":argdel" work like ":.argdel". (closes vim/vim#6727)
            Also fix giving the error "0 more files to edit".
7b22117c4e
2020-08-17 23:34:39 -04:00
TJ DeVries
3ccdbc570d
lua: add vim.register_keystroke_callback (#12536)
* feat: Add vim.register_keystroke_callback

* fixup: Forgot to remove mention of old option

* fixup: Answer jamessan comments

* fixup: Answer norcalli comments

* fixup: portability

* Update runtime/doc/lua.txt

Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
2020-08-14 10:03:17 -04:00
TJ DeVries
aa48c1c724
Merge pull request #12739 from vigoux/ts-refactor-predicates
treesitter: refactor
2020-08-14 08:33:50 -04:00
Thomas Vigouroux
d7b12e58df treesitter: add and test vim-match? predicate 2020-08-13 20:30:15 +02:00
Thomas Vigouroux
58e37d7df8 treesitter: add contains? predicate 2020-08-13 20:30:15 +02:00
Thomas Vigouroux
613068071e treesitter: refactor and use lua regexes 2020-08-13 20:30:15 +02:00
TJ DeVries
e797d0658c fix: runtimepath always updates lua package.path 2020-08-10 16:48:35 -04:00
Jan Edmund Lazo
0393eec3ea
tests/terminal/tui: wait 1ms to avoid data race in FreeBSD 2020-08-02 12:00:02 -04:00
Jan Edmund Lazo
ed41ac08cf
vim-patch:8.2.1004: line numbers below filler lines not always updated
Problem:    Line numbers below filler lines not always updated.
Solution:   Don't break out of the win_line() loop too early. (Christian
            Brabandt, closes vim/vim#6294, closes vim/vim#6138)
511feec6f0
2020-08-02 12:00:00 -04:00
Jan Edmund Lazo
1e6bf6f17a
vim-patch:8.2.0072: memory test still fails on Cirrus CI
Problem:    Memory test still fails on Cirrus CI.
Solution:   Allow for a tiny bit more tolerance in the upper limit.
bb062c1588

Check memory usage after  Neovim sourced the Vimscript files.
https://github.com/neovim/neovim/pull/12679

N/A patches for version.c:

vim-patch:8.2.0062: memory test is flaky on FreeBSD

Problem:    Memory test is flaky on FreeBSD.
Solution:   Add a short sleep before getting the first size.
e7538ae997

vim-patch:8.2.0071: memory test often fails on Cirrus CI

Problem:    Memory test often fails on Cirrus CI.
Solution:   Allow for more tolerance in the upper limit.  Remove sleep.
1832d12aea
2020-08-02 12:00:00 -04:00
Jan Edmund Lazo
c207886bdf
vim-patch:8.1.2172: spell highlight is wrong at start of the line
Problem:    Spell highlight is wrong at start of the line.
Solution:   Fix setting the "v" variable. (closes vim/vim#5078)
7751d1d1a3

Skip spell tests in OpenBSD.

Nvim or screen likely crashed.
Revist once issue #12104 is fixed.
Skip the test for the following reasons:
- unknown regression caused by https://github.com/neovim/neovim/issues/12104
- cannot revert failing test from ed0d135247
2020-08-02 12:00:00 -04:00
James McCoy
1153ac9036
Merge pull request #12699 from jamessan/getn 2020-07-31 10:27:57 -04:00