zeertzjq
cb62592bcb
fix(api)!: nvim_parse_cmd omit "count" "range" "reg" if not supported
2022-09-30 11:24:23 +08:00
Jonas Strittmatter
33dd917d7f
fix(filetype): add missing return to changelog detection function ( #20403 )
2022-09-29 16:26:19 +02:00
Sergey Berezhnoy
94718e479d
fix(query): fix unnatural order for inherits in treesitter queries ( #20298 )
...
close #20297
2022-09-29 16:25:07 +02:00
Famiu Haque
e46eef75ac
feat(nvim_cmd): allow using first argument as count
...
Allows `nvim_cmd` to use the first argument as count for applicable
commands. Also adds support for non-String arguments to `nvim_cmd`.
2022-09-29 19:31:40 +06:00
bfredl
e8ff432922
Merge pull request #20390 from bfredl/doc2
...
docs: mark cmdheight=0 and vim.ui_attach as experimental
2022-09-28 19:00:54 +02:00
Justin M. Keyes
16336c486e
feat(gen_help_html.lua): adapt to new parser
...
- adapt to parser changes from https://github.com/vigoux/tree-sitter-vimdoc/pull/16
- numerous other generator improvements
2022-09-28 18:34:20 +02:00
Christian Clason
a5effcedd2
build(deps): bump help parser and queries ( #20388 )
2022-09-28 16:29:35 +02:00
bfredl
47b821eccf
docs: mark cmdheight=0 and vim.attach_ui as experimental
...
These will require further work for user experience out of the box
during the 0.9 cycle.
2022-09-28 16:18:04 +02:00
Christian Clason
9ca313fb96
vim-patch:9fbdbb814f4a ( #20376 )
...
Update runtime files
9fbdbb814f
Skip ftplugin/vim.vim (vim9script change)
Drop indent/vim.vim and autoload/dist/vimindent.vim (vim9script rewrite)
2022-09-28 12:48:36 +02:00
zeertzjq
35e2c4a2ed
fix(lua): fix architecture-dependent behavior in usercmd "reg" ( #20384 )
...
I don't think using an integer as a NUL-terminated string can work on
big-endian systems, at least.
This is also not tested. Add a test.
Also fix a mistake in the docs of nvim_parse_cmd.
2022-09-28 18:27:59 +08:00
ObserverOfTime
f46060c4cb
vim-patch:9.0.0604: luacheckrc file is not recognized ( #20371 )
...
Problem: Luacheckrc file is not recognized.
Solution: Use lua filetype for luacheckrc. (closes vim/vim#11236 )
49c311c9b1
2022-09-27 16:10:19 +02:00
Christian Clason
fe0727a1bf
vim-patch:9.0.0602: new TypeScript extensions are not recognized
...
Problem: New TypeScript extensions are not recognized.
Solution: Recognize .mts and .cts files. (closes vim/vim#11237 )
7fc6c0e4da
2022-09-27 13:04:34 +02:00
Christian Clason
e176f9dacf
vim-patch:9.0.0600: GYP files are not recognized
...
Problem: GYP files are not recognized.
Solution: Recognize GYP files. (closes vim/vim#11242 )
d324742292
2022-09-27 12:39:09 +02:00
Christian Clason
760a8754c0
vim-patch:9.0.0599: latexmkrc files are not recognized
...
Problem: Latexmkrc files are not recognized.
Solution: Use Perl filetype for latexmkrc files. (closes vim/vim#11241 )
cde0319385
2022-09-27 12:37:44 +02:00
Justin M. Keyes
9a5ac06509
fix(docs): invalid :help links #20353
...
ref #20159
2022-09-26 06:56:07 -07:00
dundargoc
c815aadfcc
docs: fix typos ( #20150 )
...
Co-authored-by: Miguel Carneiro <mcarneiromorenas@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-09-26 17:43:23 +08:00
Justin M. Keyes
63be765182
fix(docs): invalid :help links #20345
...
Fix those naughty single quotes.
closes #20159
2022-09-25 16:58:27 -07:00
zeertzjq
f8a1cadccf
fix(filetype): use :setf instead of nvim_buf_set_option ( #20334 )
2022-09-25 16:29:25 +02:00
Justin M. Keyes
4686bda06c
Merge #20331 refactor(treesitter)!: rename x_position => x_pos
2022-09-25 08:37:05 -04:00
Christian Clason
2a5692c646
vim-patch:9.0.0583: only recognizing .m3u8 files is inconsistent ( #20342 )
...
Problem: Only recognizing .m3u8 files is inconsistent.
Solution: Also matc .m3u files. (issue vim/vim#11204 )
b9725bc7f6
2022-09-25 13:59:11 +02:00
Justin M. Keyes
3169fc54a1
refactor(treesitter): rename x_position => x_pos
...
"pos" has a long precedent as "position" in vim, and there is no reason
to use a verbose name here.
2022-09-25 13:46:15 +02:00
Louis Sven Goulet
2a3cb0893b
feat: ":write!" skips "file changed" warning #18665
...
Problem:
Cannot opt-out of "WARNING: The file has been changed since reading
it!!!", even with ":write!".
Solution:
Change ":write!" to skip the warning.
closes #7270
2022-09-24 18:57:10 -07:00
Christian Clason
f8b656c582
vim-patch:9.0.0566: Nim files are not recognized ( #20317 )
...
Problem: Nim files are not recognized.
Solution: Add patterns for Nim files. (Nbiba Bedis, closes vim/vim#11205 )
9fd1583c83
2022-09-24 12:59:37 +02:00
shaunsingh
caf5738fa9
fix(lsp): create missing directory before creating file ( #19835 )
...
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2022-09-24 12:46:21 +02:00
Christian Clason
24b5449b3d
vim-patch:9.0.0562: HSL playlist files are not recognized ( #20307 )
...
Problem: HSL playlist files are not recognized.
Solution: Add a pattern to recognize HSL palylist files. (Benoît Ryder,
closes vim/vim#11204 )
35fdd9a67d
2022-09-24 10:16:30 +02:00
Mike
14610332b2
fix(lsp): use correct function name in deprecated message ( #20308 )
...
fix: use correct function name in deprecated message
2022-09-23 19:20:56 -06:00
Justin M. Keyes
a867aa45f7
Merge #11967 generate :help HTML with treesitter
2022-09-22 10:03:38 -04:00
Justin M. Keyes
09b64d75bd
feat(docs): gen_help_html.lua
...
Problem:
The :help docs HTML generated is driven by an old awk script
`runtime/doc/makehtml.awk` that is hard to maintain (ad hoc parser and
no one has touched it in decades) and has bugs like:
- https://github.com/neovim/neovim.github.io/issues/96
- https://github.com/neovim/neovim.github.io/issues/97
Solution:
Use Lua + treesitter (https://github.com/vigoux/tree-sitter-vimdoc ) to
generate :help docs HTML. Also validates tag links.
fix https://github.com/neovim/neovim.github.io/issues/96
fix https://github.com/neovim/neovim.github.io/issues/97
TODO:
- delete doc_html build task
- delete runtime/doc/Makefile
- delete makehtml.awk
- delete maketags.awk
OUTPUT:
$ nvim -V1 -es --clean +"lua require('scripts.gen_help_html')"
output dir: /…/neovim.github.io/_site/doc/
generated (207 errors): api.txt => api.html
generated (122 errors): arabic.txt => arabic.html
generated (285 errors): autocmd.txt => autocmd.html
generated (641 errors): builtin.txt => builtin.html
generated (623 errors): change.txt => change.html
generated (65 errors): channel.txt => channel.html
generated (353 errors): cmdline.txt => cmdline.html
generated (3 errors): debug.txt => debug.html
generated (28 errors): deprecated.txt => deprecated.html
generated (193 errors): dev_style.txt => dev_style.html
generated (460 errors): develop.txt => develop.html
generated (19 errors): diagnostic.txt => diagnostic.html
generated (57 errors): diff.txt => diff.html
generated (818 errors): digraph.txt => digraph.html
generated (330 errors): editing.txt => editing.html
generated (368 errors): eval.txt => eval.html
generated (184 errors): fold.txt => fold.html
generated (61 errors): ft_ada.txt => ft_ada.html
generated (0 errors): ft_ps1.txt => ft_ps1.html
generated (20 errors): ft_raku.txt => ft_raku.html
generated (5 errors): ft_rust.txt => ft_rust.html
generated (41 errors): ft_sql.txt => ft_sql.html
generated (110 errors): gui.txt => gui.html
generated (79 errors): hebrew.txt => hebrew.html
generated (17 errors): help.txt => index.html
generated (104 errors): helphelp.txt => helphelp.html
generated (0 errors): if_cscop.txt => if_cscop.html
generated (23 errors): if_perl.txt => if_perl.html
generated (16 errors): if_pyth.txt => if_pyth.html
generated (9 errors): if_ruby.txt => if_ruby.html
generated (216 errors): indent.txt => indent.html
generated (634 errors): index.txt => vimindex.html
generated (320 errors): insert.txt => insert.html
generated (265 errors): intro.txt => intro.html
generated (9 errors): job_control.txt => job_control.html
generated (0 errors): lsp-extension.txt => lsp-extension.html
generated (214 errors): lsp.txt => lsp.html
generated (311 errors): lua.txt => lua.html
generated (592 errors): luaref.txt => luaref.html
generated (798 errors): luvref.txt => luvref.html
generated (663 errors): map.txt => map.html
generated (228 errors): mbyte.txt => mbyte.html
generated (228 errors): message.txt => message.html
generated (0 errors): mlang.txt => mlang.html
generated (761 errors): motion.txt => motion.html
generated (4 errors): nvim.txt => nvim.html
generated (226 errors): nvim_terminal_emulator.txt => nvim_terminal_emulator.html
generated (988 errors): options.txt => options.html
generated (567 errors): pattern.txt => pattern.html
generated (15 errors): pi_gzip.txt => pi_gzip.html
generated (10 errors): pi_health.txt => pi_health.html
generated (27 errors): pi_msgpack.txt => pi_msgpack.html
generated (2177 errors): pi_netrw.txt => pi_netrw.html
generated (41 errors): pi_paren.txt => pi_paren.html
generated (9 errors): pi_spec.txt => pi_spec.html
generated (218 errors): pi_tar.txt => pi_tar.html
generated (0 errors): pi_tutor.txt => pi_tutor.html
generated (235 errors): pi_zip.txt => pi_zip.html
generated (265 errors): print.txt => print.html
generated (31 errors): provider.txt => provider.html
generated (335 errors): quickfix.txt => quickfix.html
generated (572 errors): quickref.txt => quickref.html
generated (109 errors): recover.txt => recover.html
generated (14 errors): remote.txt => remote.html
generated (14 errors): remote_plugin.txt => remote_plugin.html
generated (351 errors): repeat.txt => repeat.html
generated (23 errors): rileft.txt => rileft.html
generated (12 errors): russian.txt => russian.html
generated (6 errors): scroll.txt => scroll.html
generated (106 errors): sign.txt => sign.html
generated (347 errors): spell.txt => spell.html
generated (784 errors): starting.txt => starting.html
generated (1499 errors): syntax.txt => syntax.html
generated (23 errors): tabpage.txt => tabpage.html
generated (257 errors): tagsrch.txt => tagsrch.html
generated (31 errors): term.txt => term.html
generated (0 errors): testing.txt => testing.html
generated (96 errors): tips.txt => tips.html
generated (57 errors): treesitter.txt => treesitter.html
generated (71 errors): uganda.txt => uganda.html
generated (74 errors): ui.txt => ui.html
generated (87 errors): undo.txt => undo.html
generated (17 errors): userfunc.txt => userfunc.html
generated (1 errors): usr_01.txt => usr_01.html
generated (89 errors): usr_02.txt => usr_02.html
generated (293 errors): usr_03.txt => usr_03.html
generated (46 errors): usr_04.txt => usr_04.html
generated (96 errors): usr_05.txt => usr_05.html
generated (54 errors): usr_06.txt => usr_06.html
generated (20 errors): usr_07.txt => usr_07.html
generated (241 errors): usr_08.txt => usr_08.html
generated (130 errors): usr_09.txt => usr_09.html
generated (50 errors): usr_10.txt => usr_10.html
generated (33 errors): usr_11.txt => usr_11.html
generated (32 errors): usr_12.txt => usr_12.html
generated (22 errors): usr_20.txt => usr_20.html
generated (75 errors): usr_21.txt => usr_21.html
generated (8 errors): usr_22.txt => usr_22.html
generated (3 errors): usr_23.txt => usr_23.html
generated (163 errors): usr_25.txt => usr_25.html
generated (13 errors): usr_26.txt => usr_26.html
generated (84 errors): usr_27.txt => usr_27.html
generated (173 errors): usr_28.txt => usr_28.html
generated (285 errors): usr_29.txt => usr_29.html
generated (280 errors): usr_30.txt => usr_30.html
generated (11 errors): usr_31.txt => usr_31.html
generated (13 errors): usr_32.txt => usr_32.html
generated (156 errors): usr_40.txt => usr_40.html
generated (134 errors): usr_41.txt => usr_41.html
generated (35 errors): usr_42.txt => usr_42.html
generated (19 errors): usr_43.txt => usr_43.html
generated (60 errors): usr_44.txt => usr_44.html
generated (13 errors): usr_45.txt => usr_45.html
generated (1 errors): usr_toc.txt => usr_toc.html
generated (69 errors): various.txt => various.html
generated (68 errors): vi_diff.txt => vi_diff.html
generated (437 errors): vim_diff.txt => vim_diff.html
generated (296 errors): visual.txt => visual.html
generated (181 errors): windows.txt => windows.html
generated 119 html pages
total errors: 23862
invalid tags: 537
2022-09-22 15:36:27 +02:00
Justin M. Keyes
40f0851bd8
docs: deprecate :checkhealth vimscript interface
2022-09-22 15:36:27 +02:00
Justin M. Keyes
bde6176c91
feat(treesitter): bundle :help parser and queries
...
parser from https://github.com/vigoux/tree-sitter-vimdoc
queries from nvim-treesitter
2022-09-22 15:36:27 +02:00
Lewis Russell
5c1b8d7bf8
docs(lua): correct docs for option accessor metatables ( #20256 )
2022-09-22 14:17:49 +01:00
Lewis Russell
679f3072f6
Merge pull request #20103 from lewis6991/refactor/vim_opt
2022-09-22 13:59:04 +01:00
bfredl
02f8ca59a8
fix(tests): indicate in test logs when nvim exit times out
...
When it happens it wastes 2 seconds which is NOT included in the
normal busted timing info. It is hard to correct this, but we
can at least print a warning when this happens.
2022-09-22 10:38:11 +02:00
Jonas Strittmatter
b4b05f160d
feat(filetype): expand environment variables in filetype patterns ( #20145 )
2022-09-21 15:58:57 -06:00
ofwinterpassed
ec94014cd1
fix(lsp): out of bounds error in lsp.util.apply_text_edits ( #20137 )
...
Co-authored-by: Jonas Strittmatter <40792180+smjonas@users.noreply.github.com>
2022-09-20 22:14:58 +02:00
Christian Clason
ae30e388de
vim-patch:9.0.0510: Chatito files are not recognized ( #20260 )
...
Problem: Chatito files are not recognized.
Solution: Add a pattern for Chatito files. (closes vim/vim#11174 )
7c046ae99b
2022-09-20 14:10:00 +02:00
Lewis Russell
abe2d90693
feat(lua): move compat module from runtime to test ( #20257 )
2022-09-20 11:15:32 +01:00
Lewis Russell
e762158305
docs(lua): opts in vim.keymap.{set,del}
can be optional ( #20255 )
2022-09-20 10:42:45 +01:00
Mathias Fußenegger
10196f1b46
fix(lsp): support false
result in handlers ( #20252 )
...
Closes https://github.com/neovim/neovim/issues/20111
2022-09-20 09:28:23 +02:00
Christian Clason
67df3347fd
vim-patch:9712ff1288f9 ( #20240 )
...
Update runtime files
9712ff1288
2022-09-18 15:20:20 +02:00
Christian Clason
8dc61713d9
vim-patch:9.0.0497: LyRiCs files are not recognized ( #20239 )
...
Problem: LyRiCs files are not recognized.
Solution: Add a pattern to detect LyRiCs files. (closes vim/vim#11155 )
65ee49decf
2022-09-18 14:16:24 +02:00
Christian Clason
e512d3ecf2
vim-patch:9.0.0479: in :def function all closures in loop get the sam… ( #20220 )
...
vim-patch:9.0.0479: in :def function all closures in loop get the same variables
Problem: In a :def function all closures in a loop get the same variables.
Solution: Use a separate list of variables for LOADOUTER and SAVEOUTER.
1aea184a0d
(note: patch description is wrong)
2022-09-16 17:52:08 +02:00
bfredl
0b7a3c173c
Merge pull request #20188 from bfredl/zerocmdline
...
feat(ui): use msg_grid based implementation for cmdheight=0
2022-09-16 10:07:50 +02:00
kylo252
0f93aa12fd
docs(autocmds): re-add buffer param to docstring ( #20204 )
2022-09-16 09:18:42 +02:00
Christian Clason
9ec4b20be6
fix(treesitter): return full metadata for get_captures_at_position ( #20203 )
...
fix(treesitter): get_captures_at_position returns metadata
Return the full `metadata` table for the capture instead of just the
priority.
Further cleanup of related docs.
2022-09-16 09:05:05 +02:00
Gregory Anders
982fef6018
fix(diagnostic): populate data key in DiagnosticChanged autocmd in reset ( #20207 )
...
Follow up to #20173 .
2022-09-15 11:03:07 -06:00
bfredl
708bd68651
feat(ui): use msg_grid based implementation for cmdheight=0
2022-09-15 12:13:43 +02:00
Christian Clason
ddb762f401
docs(treesitter): clean up and update treesitter.txt ( #20142 )
...
* add type annotations to code
* clean up and expand static documentation
* consistent use of tags for static and generated docs
2022-09-14 11:08:31 +02:00
Mathias Fußenegger
a8c9e721d9
feat(fs): extend fs.find to accept predicate ( #20193 )
...
Makes it possible to use `vim.fs.find` to find files where only a
substring is known.
This is useful for `vim.lsp.start` to get the `root_dir` for languages
where the project-file is only known by its extension, not by the full
name.
For example in .NET projects there is usually a `<projectname>.csproj`
file in the project root.
Example:
vim.fs.find(function(x) return vim.endswith(x, '.csproj') end, { upward = true })
2022-09-13 14:16:20 -06:00
Gregory Anders
1970d2ac43
feat(diagnostic): pass diagnostics as data to DiagnosticChanged autocmd ( #20173 )
2022-09-13 08:33:39 -06:00
zeertzjq
907fc8ac37
vim-patch:9.0.0449: there is no easy way to translate a key code into a string ( #20168 )
...
Problem: There is no easy way to translate a string with a key code into a
readable string.
Solution: Add the keytrans() function. (closes vim/vim#11114 )
cdc839353f
vim-patch:7b2d87220c6c
Add missing part of patch
7b2d87220c
2022-09-13 06:23:33 +08:00
Christian Clason
fd70e2bff2
Merge pull request #20141 from vigoux/ts-self-inherits
...
fix(treesitter): prevent endless loop on self-inheritence
docs(treesitter): suggest using extends to extend queries
2022-09-12 17:35:49 +02:00
Thomas Vigouroux
a3272cf452
docs(treesitter): suggest using extends
to extend queries
2022-09-12 17:14:27 +02:00
Christian Clason
afe01842ef
vim-patch:9.0.0448: SubRip files are not recognized ( #20167 )
...
Problem: SubRip files are not recognized.
Solution: Add a pattern for SubRip. (closes vim/vim#11113 )
5a4eb55122
2022-09-12 15:12:39 +02:00
zeertzjq
245ac6f263
vim-patch:8.2.5034: there is no way to get the byte index from a virtual column
...
Problem: There is no way to get the byte index from a virtual column.
Solution: Add virtcol2col(). (Yegappan Lakshmanan, closes vim/vim#10477 ,
closes vim/vim#10098 )
5a6ec10cc8
Cherry-pick tv_check_for_number_arg() from Vim.
Cherry-pick pathshorten() doc change.
2022-09-12 17:28:07 +08:00
Christian Clason
f98cff9575
vim-patch:9.0.0443: blueprint files are not recognized ( #20155 )
...
Problem: Blueprint files are not recognized.
Solution: Add a pattern for blueprint files. (Gabriele Musco, closes vim/vim#11107 )
cce82a55b8
2022-09-11 16:07:54 +02:00
Thomas Vigouroux
1939518eba
fix(treesitter): prevent endless loop on self-inheritence
...
Fixes #20139
2022-09-11 08:16:50 +02:00
Gregory Anders
9b4cab0126
fix(lsp): schedule removal of client object ( #20148 )
...
The execution of the LspDetach autocommands in the LSP client's on_exit
function are scheduled on the event loop to avoid making API calls in a
fast context; however, this means that by the time the LspDetach
autocommands finally run the client object has already been deleted.
To address this, we also schedule the deletion of the client on the
event loop so that it is guaranteed to occur after all of the LspDetach
autocommands have fired.
2022-09-10 18:56:29 -06:00
Christian Clason
91a2e7a571
vim-patch:71b6d3397649 ( #20144 )
...
Update runtime files
71b6d33976
2022-09-10 14:54:13 +02:00
Christian Clason
40f9f479b7
vim-patch:9.0.0434: gitignore files are not recognized ( #20143 )
...
Problem: gitignore files are not recognized.
Solution: Add patterns for the gitignore filetype. (closes vim/vim#11102 )
9ba2786f15
2022-09-10 13:30:54 +02:00
Christian Clason
9b0e1256e2
vim-patch:9.0.0427: Drupal theme files are not recognized ( #20138 )
...
Problem: Drupal theme files are not recognized.
Solution: Use php filetype for Drupl theme files. Remove trailing spaces.
(Rodrigo Aguilera, closes vim/vim#11096 )
8995c4cd4e
2022-09-09 18:48:12 +02:00
Christian Clason
ad2d6a624b
vim-patch:9.0.0424: gitattributes files are not recognized ( #20134 )
...
Problem: gitattributes files are not recognized.
Solution: Add patterns to match gitattributes files. (closes vim/vim#11085 )
7d56cfc861
2022-09-09 17:53:15 +02:00
Lewis Russell
038c711539
refactor(vim.opt): de-nest code
2022-09-09 12:38:15 +01:00
Lewis Russell
9272d20ea4
refactor(vim.opt): use local function syntax
2022-09-09 12:38:15 +01:00
Lewis Russell
ad972990ad
refactor(vim.opt): optimize append/prepend/remove
2022-09-09 12:38:15 +01:00
Lewis Russell
b364bc2c34
refactor(vim.opt): dry up and tidy
2022-09-09 12:38:10 +01:00
Lewis Russell
925a811990
refactor(vim.opt): remove value_mutator()
2022-09-09 09:54:54 +01:00
Lewis Russell
7533ceec13
refactor(vim.opt): unify vim.bo/wo building
2022-09-09 09:54:53 +01:00
Christian Clason
79a9b00671
build(deps): bump tree-sitter-viml to 0.2.0 ( #20121 )
2022-09-08 19:46:40 +02:00
Mathias Fußenegger
19a3b2c26e
docs(lsp): update rpc.start stdio limitations ( #20120 )
2022-09-08 10:25:16 -07:00
Lewis Russell
164752b380
refactor(vim.opt): remove make_meta_accessor()
2022-09-08 17:24:17 +01:00
Raphael
30ca6d23a9
fix(lsp): when buffer detach remove buffer from client attached buffers ( #20081 )
...
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2022-09-08 17:09:32 +02:00
Lewis Russell
514a1679dc
refactor(vim.opt): simplify get_option_metatype
2022-09-08 15:44:00 +01:00
Lewis Russell
b8de5ada80
refactor(vim.opt): replace _setup with lazy table
2022-09-08 15:42:17 +01:00
Lewis Russell
f21e2a51ba
refactor(vim.opt): remove enums
2022-09-08 15:32:26 +01:00
Lewis Russell
bc88691dbd
refactor(vim.opt): remove del arg
2022-09-08 15:32:26 +01:00
Christian Clason
08602ec1ab
vim-patch:9.0.0417: Jsonnet files are not recognized ( #20119 )
...
Problem: Jsonnet files are not recognized.
Solution: Add a pattern for Jsonnet files. (Cezary Drożak, closes vim/vim#11073 ,
closes vim/vim#11081 )
2a4c885d54
2022-09-08 16:06:00 +02:00
Mathias Fußenegger
11167ab6d5
feat(lsp): add range option to lsp.buf.format ( #19998 )
2022-09-08 11:33:04 +02:00
Christian Clason
8c59d7e6a7
Merge pull request #20093 from neovim/upstream-ts-util
...
* feat(treesitter): upstream get_{node,captures} utility functions
* refactor(treesitter): get_{nodes,captures}_at_{position,cursor}
2022-09-08 11:23:26 +02:00
bfredl
893b659e88
fix(treesitter): use the right loading order for base queries ( #20117 )
...
Use the first, not last, query for a language on runtimepath. Typically,
this implies that a user query will override a site plugin query, which
will override a bundled runtime query.
2022-09-08 11:17:29 +02:00
Thomas Vigouroux
0405594399
feat(treesitter)!: do not merge queries by default ( #20105 )
...
Problem: Treesitter queries for a given language in runtime were merged together,
leading to errors if they targeted different parser versions (e.g., bundled viml queries
and those shipped by nvim-treesitter).
Solution: Runtime queries now work as follows:
* The last query in the rtp without `; extends` in the header will be used as the base query
* All queries (without a specific order) with `; extends` are concatenated with the base query
BREAKING CHANGE: queries need to be updated if they are meant to extend other queries
2022-09-08 09:47:36 +02:00
Raphael
4af04df844
fix(docs): remove duplicate word
2022-09-08 14:33:17 +08:00
zeertzjq
99e6e0f221
docs(treesitter): fix doxygen
2022-09-08 12:54:41 +08:00
ii14
4dc4cf3467
fix(options): mark winhighlight
as list style ( #19477 )
...
Also add missing fcs, lcs and winhighlight to list of key-value options for `vim.opt`.
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-09-07 17:59:27 +02:00
Christian Clason
9d1d3a6707
vim-patch:9.0.0402: javascript module files are not recoginzed ( #20108 )
...
Problem: Javascript module files are not recoginzed.
Solution: Recognize "*.jsm" files as Javascript. (Brett Holman,
closes vim/vim#11069 )
bb6c4073e7
2022-09-07 15:55:39 +02:00
Thomas Vigouroux
fd1595514b
Use weak tables in tree-sitter code ( #17117 )
...
feat(treesitter): use weak tables when possible
Also add the defaulttable function to create a table whose values are created when a key is missing.
2022-09-07 08:39:56 +02:00
Sean Dewar
f32fd19f1e
fix(diagnostic): remove buf from cache on BufWipeout
( #20099 )
...
Doing so on `BufDelete` has issues:
- `BufDelete` is also fired for listed buffers that are made unlisted.
- `BufDelete` is not fired for unlisted buffers that are deleted.
This means that diagnostics will be lost for a buffer that becomes unlisted.
It also means that if an entry exists for an unlisted buffer, deleting that
buffer later will not remove its entry from the cache (and you may see "Invalid
buffer id" errors when using diagnostic functions if it was wiped).
Instead, remove a buffer from the cache if it is wiped out.
This means simply `:bd`ing a buffer will not clear its diagnostics now.
2022-09-06 20:55:03 -06:00
Lewis Russell
707edfc9e6
fix(ts): do not clobber spelloptions ( #20095 )
2022-09-06 19:22:05 +01:00
Christian Clason
d01cadd82f
fix(treesitter): don't support legacy syntax in start()
2022-09-06 17:33:44 +02:00
Thomas Vigouroux
75adfefc85
feat(extmarks,ts,spell): full support for spelling
...
- Added 'spell' option to extmarks:
Extmarks with this set will have the region spellchecked.
- Added 'noplainbuffer' option to 'spelloptions':
This is used to tell Neovim not to spellcheck the buffer. The old
behaviour was to spell check the whole buffer unless :syntax was set.
- Added spelling support to the treesitter highlighter:
@spell captures in highlights.scm are used to define regions which
should be spell checked.
- Added support for navigating spell errors for extmarks:
Works for both ephemeral and static extmarks
- Added '_on_spell_nav' callback for decoration providers:
Since ephemeral callbacks are only drawn for the visible screen,
providers must implement this callback to instruct Neovim which
regions in the buffer need can be spell checked.
The callback takes a start position and an end position.
Note: this callback is subject to change hence the _ prefix.
- Added spell captures for built-in support languages
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
2022-09-06 10:14:11 +01:00
bfredl
05893aea39
Merge pull request #20039 from zeertzjq/cmod-tab
...
fix(api)!: correctly deal with number before :tab
2022-09-06 10:32:23 +02:00
Christian Clason
95fd1ad83e
refactor(treesitter): get_{nodes,captures}_at_{position,cursor}
2022-09-06 10:15:23 +02:00
Quentin Rasmont
ffe98531b9
feat(treesitter): upstream get_node_at_cursor()
...
Util from the nvim-treesitter project.
2022-09-06 10:14:05 +02:00
bfredl
5b8d6e0b32
Merge pull request #15391 from vigoux/ts-lua-builtin
...
feat(treesitter): highlighting for core languages, enabled for Lua
2022-09-06 10:10:01 +02:00
Christian Clason
4bf005e9fd
vim-patch:partial 0daafaa7d99e ( #20083 )
...
Update runtime files
0daafaa7d9
skip vim9script ftplugin
create userfunc.txt from Neovim content (skip section 3, needs 9.0.0379)
2022-09-06 08:57:53 +02:00
Christian Clason
0822896efc
feat(treesitter): add vim.treesitter.start(), enable for Lua
...
* Add vim.treesitter.start() for starting treesitter highlighting via
ftplugin or autocommand (can be extended later for fold, indent,
matchpairs, ...)
* Add vim.treesitter.stop() for manually stopping treesitter
highlighting
* Enable treesitter highlighting for Lua if
`vim.g.ts_highlight_lua = true` is set in `init.lua`
2022-09-06 08:08:29 +02:00
Christian Clason
64cc78c9f3
feat(treesitter): add injections
2022-09-06 07:57:46 +02:00
Christian Clason
e85b8aa768
feat(treesitter): add viml parser and queries
2022-09-06 07:57:46 +02:00
Thomas Vigouroux
905dd49fec
feat(treesitter): bundle Lua parser and queries
...
parser from https://github.com/MunifTanjim/tree-sitter-lua
queries from nvim-treesitter
2022-09-06 07:57:46 +02:00
zeertzjq
ceb09701f2
feat(api): add "move" to nvim_input_mouse
2022-09-04 21:18:23 +08:00