Commit Graph

25296 Commits

Author SHA1 Message Date
Christian Clason
9084948893
Merge pull request #22832 from clason/bump-Luv
build(deps): bump luv to HEAD
docs(luvref): update to version bump
2023-04-01 18:07:11 +02:00
Christian Clason
4720f0a662 docs(luvref): update to version bump 2023-04-01 17:26:09 +02:00
Christian Clason
2d840b6b77 build(deps): bump Luv to HEAD - 093a977b8 2023-04-01 17:26:04 +02:00
Gregory Anders
643c0ed571
feat: allow function passed to defaulttable to take an argument (#22839)
Pass the value of the key being accessed to the create function, to
allow users to dynamically generate default values.
2023-04-01 08:02:58 -06:00
Sizhe Zhao
6a4ebf894f
fix(health): stop using deprecated ts.language.inspect_language() (#22850) 2023-04-01 15:47:20 +02:00
Christian Clason
19110eddb9
Merge pull request #22837 from clason/ts-sync
build(deps): bump tree-sitter-viml to HEAD
fix(tests): adapt treesitter/highlight_spec priority test
fix(treesitter): update queries from nvim-treesitter
refactor(treesitter)!: rename help parser to vimdoc
docs(treesitter): add query injections
2023-04-01 15:39:25 +02:00
zeertzjq
4f66530af1
vim-patch:9.0.1434: crash when adding package already in 'runtimepath' (#22849)
Problem:    Crash when adding package already in 'runtimepath'.
Solution:   Change order for using 'runtimepath' entries. (closes vim/vim#12215)

39c9ec16ea
2023-04-01 21:34:55 +08:00
Christian Clason
438c3419df docs(treesitter): add query injections 2023-04-01 15:07:16 +02:00
Christian Clason
d7f7450017 refactor(treesitter)!: rename help parser to vimdoc 2023-04-01 15:07:16 +02:00
Christian Clason
2a298f2e48 fix(treesitter): update queries from nvim-treesitter
remove self-injection for C preprocessor macros (can be very slow)
2023-04-01 12:19:15 +02:00
Christian Clason
90fdaf55c9 fix(tests): adapt treesitter/highlight_spec priority test
Still relied on the old `@Foo`->`Foo` capture to highlight mechanism;
use capture with default highlight instead.
2023-04-01 12:19:15 +02:00
ii14
75e1b1d5c9
refactor: use bool type for global variables (#22842) 2023-04-01 08:56:44 +08:00
ii14
d5f6176e6d
refactor: add const and remove unnecessary casts (#22841) 2023-04-01 08:49:51 +08:00
Christian Clason
dee559d744 build(deps): bump tree-sitter-viml to HEAD 2023-03-31 15:58:19 +02:00
Lewis Russell
83bfd94d1d
refactor(loader): cache hash information
Whenever we run fs_stat() on a path, save this information in the loader
so it can be re-used.

- Loader.loadfile: Remove arguments `hash` as it is no longer needed.

- Loader.loader: Use _G.loadstring instead of Loader.load
  This allows plugins to wrap loadstring to inspection and profiling

- factor out read file logic
2023-03-31 13:05:22 +01:00
Sindre T. Strøm
b34097fe6d
fix(api): return both link and attributes with nvim_get_hl (#22824)
Problem: No way to get the actual highlight attributes for a linked
group through |nvim_get_hl()| (not the attributes from the link target).
Solution: Return the actual attributes as well as the link target name.
2023-03-31 12:52:53 +02:00
Akin
ed10e4ef60
fix(diagnostic): use correct field name for tags (#22835)
LSP tags are added to the diagnostic as "tags" but referred to as "_tags"
in the diagnostic underline handler
2023-03-31 11:23:19 +01:00
Lewis Russell
4cff3aceea
fix(loader): disable profiling by default 2023-03-31 09:43:13 +01:00
Lewis Russell
5bf2f4b3c2
fix(filetype): make recursive work...again (#22826) 2023-03-30 17:24:50 +01:00
Lewis Russell
226a6c3eae
feat(diagnostic): add support for tags
The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
2023-03-30 14:49:58 +01:00
Lewis Russell
8fa7d833cf
Merge pull request #22791 from lewis6991/refactor/loadermisc
refactor(loader): changes
2023-03-30 13:57:59 +01:00
Lewis Russell
e5fa2e3a5d
fix(autocmd): handle recursion for force set (#22820) 2023-03-30 11:35:13 +01:00
Lewis Russell
61e54f2636
feat: add vim.treesitter.language.get_filetypes() (#22643) 2023-03-30 10:26:28 +01:00
Lewis Russell
8b7fb668e4
fix(filetype): avoid recursive FileType autocmds (#22813) 2023-03-29 19:54:12 +01:00
Christian Clason
92005db760
build(deps): switch to Launchpad for libvterm and libtermkey (#22811)
Problem: www.leonerd.org.uk is sometimes unreachable

Solution: switch to Launchpad URLs for libvterm (official page) and
libtermkey (source mirror for Ubuntu package)
2023-03-29 14:39:11 +02:00
Christian Clason
196f69909d
vim-patch:9.0.1430: Livebook files are not recognized (#22808)
Problem:    Livebook files are not recognized.
Solution:   Add a pattern for Livebook files. (Mathias Jean Johansen,
            closes vim/vim#12203)

6400203517

Co-authored-by: Mathias Jean Johansen <mathias@mjj.io>
2023-03-29 10:23:52 +02:00
Michal Liszcz
b7748662ed
fix(api): Use local LastSet structure in nvim_get_option_info (#22741)
fix(api): use local LastSet structure in nvim_get_option_info

* nvim_get_option_info is deprecated.
  It is always using the global LastSet information as reported in #15232.
* nvim_get_option_info2 is added.
  The new function additionally accepts an 'opts' table {scope, buf, win}
  allowing to specify the option scope and query local options from another
  buffer or window.
2023-03-29 09:59:01 +02:00
dundargoc
eac75a971d
Merge pull request #22759 from dundargoc/build/wintools 2023-03-28 18:46:58 +02:00
dundargoc
81abd5c5c7 build: download wintools executables separately
The wintools executables are stored in a zip file, making it
inconvenient to bump these during releases. Instead, unpack the
executables in the deps repository and download each executable
separately.
2023-03-28 16:18:13 +02:00
dundargoc
b02ee27e51 build: drop curl.exe on Windows
Curl is already shipped by default on Windows 10 starting from versions
1803. As we already require version 1809 we can safely remove it.
2023-03-28 16:18:13 +02:00
zeertzjq
bad218cd64
vim-patch:9.0.1429: invalid memory access when ending insert mode (#22792)
Problem:    Invalid memory access when ending insert mode.
Solution:   Check if the insert_skip value is valid.

1a08a3e2a5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-27 09:37:04 +08:00
Lewis Russell
fd70a9dca1 refactor(loader): simplify tracking logic 2023-03-26 14:11:43 +01:00
Lewis Russell
25fa051fa1 feat(vim.fs): improve normalize
- Add options argument with an option to expand env vars
- Resolve '//' -> '/'
- Use in vim.loader
2023-03-26 13:30:11 +01:00
Lewis Russell
ffd8cd1a96 refactor(loader): add typing for package.loaders 2023-03-26 12:51:56 +01:00
Lewis Russell
fab8dab6b6 refactor(loader): remove BufWritePost autocmd 2023-03-26 12:47:06 +01:00
Lewis Russell
3c82ce0d62 refactor(loader): use vim.fs 2023-03-26 12:46:24 +01:00
Folke Lemaitre
2257ade3dc
feat(lua): add vim.loader
feat: new faster lua loader using byte-compilation
2023-03-26 11:42:15 +01:00
Jon Huhn
6a6191174a
test: fix flaky watchfiles tests (#22637) 2023-03-26 10:41:27 +01:00
zeertzjq
4863ca6b89
test: use exec_capture() in more places (#22787)
Problem:
Using `meths.exec2("code", { output = true })` is too verbose.

Solution:
Use exec_capture() in more places.
2023-03-26 10:49:32 +08:00
zeertzjq
4eef5ac453
vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)
Problem:    Cursor in wrong position when leaving insert mode.
Solution:   Update the w_valid flags.  Position the cursor also when not
            redrawing. (closes vim/vim#12137)

c174c2e58c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-26 09:24:04 +08:00
Andreas Schneider
e3dab4b326
fix: snprintf buffer overflow detected by -D_FORTIFY_SOURCE=3 (#22780)
Problem:
Wrong buffer size argument passed to snprintf() in set_cmdarg():
	Thread no. 1 (24 frames)
	 #8 snprintf at /usr/include/bits/stdio2.h:54
	 #9 set_cmdarg at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/eval.c:7044
	 #10 apply_autocmds_group at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/autocmd.c:1843
	 #11 apply_autocmds_exarg at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/autocmd.c:1549
	 #12 readfile at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:617
	 #13 buf_reload at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:5038
	 #14 buf_check_timestamp at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:4952
	 #15 check_timestamps at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/fileio.c:4678
	 #16 ex_checktime at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_cmds2.c:765
	 #17 execute_cmd0 at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:1620
	 #18 do_one_cmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:2275
	 #19 do_cmdline at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:584
	 #20 ex_execute at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/eval.c:7727
	 #21 execute_cmd0 at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:1620
	 #22 do_one_cmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:2275
	 #23 do_cmdline at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:584
	 #24 do_ucmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/usercmd.c:1661
	 #25 execute_cmd0 at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:1612
	 #26 do_one_cmd at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:2275
	 #27 do_cmdline at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/ex_docmd.c:584
	 #28 nv_colon at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/normal.c:4058
	 #29 normal_execute at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/normal.c:1172
	 #30 state_enter at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/state.c:88
	 #31 normal_enter at /usr/src/debug/neovim-0.8.2-2.fc38.x86_64/src/nvim/normal.c:471

Solution:
Subtract the offset from the buffer size.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2023-03-26 08:22:14 +08:00
bfredl
13eb6c2554
Merge pull request #22762 from bfredl/hl2cterm
fix(api): make nvim_get_hl return 'cterm' attrs properly
2023-03-25 19:26:45 +01:00
Evgeni Chasnovski
fe9cbcb3a5
feat(api): nvim_exec2(), deprecate nvim_exec() #19032
Problem:
The signature of nvim_exec() is not extensible per ":help api-contract".

Solution:
Introduce nvim_exec2() and deprecate nvim_exec().
2023-03-25 09:58:48 -07:00
Roberto Pommella Alegro
257d894d75
feat(lsp): render markdown in docs hover #22766
Problem:
LSP docs hover (textDocument/hover) doesn't handle HTML escape seqs in markdown.

Solution:
Convert common HTML escape seqs to a nicer form, to display in the float.
closees #22757

Signed-off-by: Kasama <robertoaall@gmail.com>
2023-03-25 12:46:07 -04:00
dundargoc
74f05a152d
docs(test): using cmake directly (without make) #22781 2023-03-25 09:33:42 -07:00
Ryan Jenkins
dc5a433025
docs: how to debug TUI using gdb/lldb #22771
docs: Add info to the `Debug: TUI` docs about gdb/lldb usage
2023-03-25 12:25:28 -04:00
Micah Halter
36ee10057a
fix(lsp): add missing silent check in lsp hover handler (#22763)
Fixup to #21531.
2023-03-25 21:01:39 +08:00
Jakub Łuczyński
42876ddc7a
docs: more details about vim.region (#21116) 2023-03-25 16:28:59 +08:00
Lucas Merritt
063e93864a
refactor(PVS/V1048): remove duplicated assignments (#21873) 2023-03-25 12:11:14 +08:00
zeertzjq
aab4443bb9
vim-patch:9.0.1426: indent wrong after "export namespace" in C++ (#22777)
Problem:    Indent wrong after "export namespace" in C++.
Solution:   Skip over "inline" and "export" in any order. (Virginia Senioria,
            closes vim/vim#12134, closes vim/vim#12133)

99e4ab2a1e

Co-authored-by: Virginia Senioria <91khr@users.noreply.github.com>
2023-03-25 09:27:42 +08:00