Commit Graph

26296 Commits

Author SHA1 Message Date
Lewis Russell
2db719f6c2
feat(lua): rename vim.loop -> vim.uv (#22846) 2023-06-03 12:06:00 +02:00
Sebastian Lyng Johansen
c65e2203f7
docs(iter): add emmylua type to iter module (#23845) 2023-06-03 09:18:05 +02:00
Christian Clason
a8ee4c7a81
build(deps): bump luajit to HEAD - 51fb2f2c3 (#23886) 2023-06-02 19:41:47 +02:00
luukvbaal
c45a111e35
vim-patch:9.0.1599: Cursor not adjusted when 'splitkeep' is not "cursor" (#23884)
Problem:    Cursor not adjusted when near top or bottom of window and
            'splitkeep' is not "cursor".
Solution:   Move boundary checks to outer cursor move functions, inner
            functions should only return valid cursor positions. (Luuk van
            Baal, closes vim/vim#12480)

a109f39ef5
2023-06-02 23:26:41 +08:00
dundargoc
aa130d0c7e
docs: small fixes (#23619)
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Gustavo Ferreira <gustavo.ferreira@imaginecurve.com>
Co-authored-by: Kai Moschcau <mail@kmoschcau.de>
Co-authored-by: Lampros <hauahx@gmail.com>
2023-06-02 22:59:58 +08:00
zeertzjq
4b60267f82
feat(:source): source current ft=lua buffer as Lua code (#23802) 2023-06-02 21:00:55 +08:00
Justin M. Keyes
36fd2fcaae
docs(html): define anchors for search engine #23879
Problem:
Selecting a search result from the Algolia Docsearch widget does not
navigate to a page anchor. The docs HTML provides `<a name=…>` anchors
_near_ the `<h1>`/`<h2>`/… headings, but Algolia Docsearch expects the
anchors to be _defined on_ the headings. That's also "semantically"
nicer. https://docsearch.algolia.com/docs/manage-your-crawls/

Solution:
Set `id` on the heading element instead of placing `<a name=…>` nearby.

related: 3913ebbfcd #23839
2023-06-02 02:45:23 -07:00
zeertzjq
80814d1535
ci: remove ci/ from cache key (#23878)
The ci/ directory is now only used for Cirrus, not for GitHub Actions.
2023-06-02 17:38:42 +08:00
zeertzjq
843c1bed95
fix(health): stop job properly on timeout (#23877) 2023-06-02 17:23:45 +08:00
zeertzjq
9f3c4c1526
vim-patch:9.0.1597: cursor ends up below the window after a put (#23873)
Problem:    Cursor ends up below the window after a put.
Solution:   Mark w_crow and w_botline invalid when changing the cursor line.
            (closes vim/vim#12465)

8509014add

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-06-02 08:48:49 +08:00
zeertzjq
a0375b68c1
vim-patch:9.0.1598: screenchar() and others are wrong with DBCS 'encoding' (#23872)
Problem:    screenchar(), screenchars() and screenstring() do not work
            properly when 'encoding' is set to a double-byte encoding.
Solution:   Fix the way the bytes of the characters are obtained.
            (issue vim/vim#12469)

47eec6716b
2023-06-02 04:31:17 +08:00
Gregory Anders
7ade44fefe
Merge pull request #23871 from gpanders/lsp-position-encoding
Add support for LSP positionEncoding capability
2023-06-01 12:10:48 -05:00
Gregory Anders
15641f38cf feat(lsp): include positionEncodings in default client capabilities 2023-06-01 11:46:37 -05:00
Gregory Anders
fb54e6980e feat(lsp): set client offset_encoding if server supports positionEncoding
If the server sends the positionEncoding capability in its
initialization response, automatically set the client's offset_encoding
to use the value provided.
2023-06-01 11:34:23 -05:00
zeertzjq
afb70eba8c
Merge pull request #23789 from luukvbaal/spell
vim-patch:9.0.{1585,1595}
2023-06-01 21:29:14 +08:00
zeertzjq
51fd328184 refactor(drawscreen): avoid spell check on folded or filler lines 2023-06-01 20:51:02 +08:00
Luuk van Baal
ac1ad9651e vim-patch:9.0.1595: line pointer becomes invalid when using spell checking
Problem:    Line pointer becomes invalid when using spell checking.
Solution:   Call ml_get() at the right places. (Luuk van Baal, closes vim/vim#12456)

e84c773d42
2023-06-01 14:30:21 +02:00
Luuk van Baal
316c877034 vim-patch:9.0.1585: weird use of static variables for spell checking
Problem:    Weird use of static variables for spell checking.
Solution:   Move the variables to a structure and pass them from win_update()
            to win_line(). (Luuk van Baal, closes vim/vim#12448)

30805a1aba
2023-06-01 14:30:15 +02:00
zeertzjq
7801091062
vim-patch:9.0.1596: :registers command does not work in sandbox (#23866)
Problem:    :registers command does not work in sandbox.
Solution:   Add flag to the command. (closes vim/vim#12473)

eb43b7f053

Co-authored-by: Julio B <julio.bacel@gmail.com>
2023-06-01 20:28:16 +08:00
Folke Lemaitre
1ff4562502
fix(api): dont change curwin for nvim_win_set_width 2023-06-01 12:42:06 +02:00
Folke Lemaitre
68e7a6a6dc
test: added tests for set_height with winminheight=0 and a winbar 2023-06-01 12:23:42 +02:00
Folke Lemaitre
a3751f5de2
fix(api): dont change curwin for nvim_win_set_height 2023-06-01 11:44:08 +02:00
zeertzjq
2bdef6dd2a
fix(column): don't overflow sign column with extmark signs (#23854) 2023-06-01 16:20:31 +08:00
Raphael
be5e361154
fix(lsp): add param assert in client_is_stopped (#23857) 2023-06-01 08:38:38 +02:00
zeertzjq
68e2d72295
ci(issue-open-check): don't add "doc" label
"doc" label doesn't exist and mentioning "doc" doesn't mean anything.
2023-05-31 08:54:35 +08:00
Justin M. Keyes
3913ebbfcd
docs(html): algolia docsearch #23839
Need to manually include this in the generated docs html because it
doesn't use the website's (jekyll) layout template.

Maintenance notes:
https://github.com/neovim/neovim.github.io/#maintenance

Related: ce9aef12eb
2023-05-30 17:32:38 -07:00
zeertzjq
7e3ff8afa4
test(extmarks): folding inline virt_text on empty line (#23847) 2023-05-31 06:50:37 +08:00
jdrouhard
58618d208a
feat(lsp)!: promote LspRequest to a full autocmd and enrich with additional data (#23694)
BREAKING CHANGE: LspRequest is no longer a User autocmd but is now a
first class citizen.

LspRequest as a User autocmd had limited functionality. Namely, the only
thing you could do was use the notification to do a lookup on all the
clients' requests tables to figure out what changed.

Promoting the autocmd to a full autocmd lets us set the buffer the
request was initiated on (so people can set buffer-local autocmds for
listening to these events).

Additionally, when used from Lua, we can pass additional metadata about
the request along with the notification, including the client ID, the
request ID, and the actual request object stored on the client's
requests table. Users can now listen for these events and act on them
proactively instead of polling all of the requests tables and looking
for changes.
2023-05-30 20:56:29 +02:00
Folke Lemaitre
dd3fa64573
fix(lsp): fix dynamic registration of code actions (#23826) 2023-05-30 19:15:07 +02:00
zeertzjq
f215a2aeaa
vim-patch:8.2.3689: ex_let_one() is too long (#23830)
Problem:    ex_let_one() is too long.
Solution:   Split into multiple functions.

3ccb579516

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-30 22:56:27 +08:00
luukvbaal
70da793c5e
fix(statusline): corrupted screen with minwid sign item in 'statuscolumn' (#23823) 2023-05-30 20:56:12 +08:00
zeertzjq
55f6a1cab0
vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register (#23817)
Problem:    Incsearch not triggered when pasting clipboard register on the
            command line.
Solution:   Also set "literally" when using a clipboard register. (Ken Takata,
            closes vim/vim#12460)

9cf6ab1332

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-05-30 07:18:12 +08:00
Omar El Halabi
e8776074f5
vim-patch:9.0.1591: some "gomod" files are not recognized (#23820)
Problem:    Some "gomod" files are not recognized.
Solution:   Check for "go.mod" file name before checking out the contents.
            (Omar El Halabi, closes vim/vim#12462)

c9fbd2560f
2023-05-30 06:44:23 +08:00
zeertzjq
2028d1e2bc
vim-patch:9.0.1586: error for using two messages with ngettext() differing in "%" (#23816)
Problem:    Checking translations gives an error for using two messages with
            ngettext() that differ in "%" items.
Solution:   Adjust the check script to tolerate omitting one "%" item.

78ee62563e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-29 22:14:01 +08:00
Christian Clason
b8a2220f5e
vim-patch:9.0.1587: Corn config files are not recognized (#23807)
Problem:    Corn config files are not recognized.
Solution:   Add a pattern for Corn config files. (Jake Stanger, closes vim/vim#12449)

05843e8960

Co-authored-by: Jake Stanger <mail@jstanger.dev>
2023-05-29 10:25:05 +02:00
zeertzjq
9dd48f7832
fix(substitute): properly check if preview is needed (#23809) 2023-05-29 08:44:52 +08:00
dundargoc
c48f94d1f3
build: remove LOG_LIST_ACTIONS option and related code
It has not been used for a long time and the likelihood of it still working is
low.
2023-05-28 16:34:47 +02:00
Ghjuvan Lacambre
5a3752889c
fix(NVIM_APPNAME): show error message if $NVIM_APPNAME is invalid
Closes https://github.com/neovim/neovim/issues/23056.
2023-05-28 16:04:54 +02:00
Tom Praschan
d561830a52
build: align .clang-format rules with uncrustify config
Difference can be seen e.g. in qf_add_entry(), where clang-format
previously would want to place each parameter declaration on its own
line (BinPackParameter: false), while uncrustify behaves if as
BinPackParameters was set to true.

Same goes for BinPackArguments.

See
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#BinPackParameters
and
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#binpackarguments
2023-05-28 15:39:43 +02:00
dundargoc
8206954a67
build: remove LOG_DEBUG option
Its usecase is too specific to warrant an option. The same effect can be
achieved by passing `-DCMAKE_C_FLAGS=-DNVIM_LOG_DEBUG` in the command
line when building neovim.
2023-05-28 15:28:53 +02:00
Christian Clason
03a2c5b772
fix(ftplugin): source Lua files after Vimscript files per directory (#23801)
Problem: Lua ftplugins in runtime take precedence over Vimscript
ftplugins in user configs (even in `after/`).
Solution: Source ftplugins separately per directory, first Vimscript
then Lua.
2023-05-28 15:13:44 +02:00
Christian Clason
8e17054a23
vim-patch:9.0.1584: not all meson files are recognized (#23797)
Problem:    Not all meson files are recognized.
Solution:   Add "meson.options". (Liam Beguin, closes vim/vim#12444)

1ba0b9e36f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-28 11:47:07 +02:00
zeertzjq
9c41a81dec
fix(extmarks): fix virt_text_hide off-by-one hiding (#23795) 2023-05-28 17:29:44 +08:00
zeertzjq
4dd43e31db
fix(extmarks): don't show virt lines for end mark (#23792) 2023-05-28 17:22:25 +08:00
zeertzjq
f29acc5073
test(extmarks): add tests for #14201 #20004 #20885 (#23794) 2023-05-28 16:28:10 +08:00
Folke Lemaitre
ddd92a70d2
feat(lsp): initial support for dynamic capabilities (#23681)
- `client.dynamic_capabilities` is an object that tracks client register/unregister
- `client.supports_method` will additionally check if a dynamic capability supports the method, taking document filters into account. But only if the client enabled `dynamicRegistration` for the capability
- updated the default client capabilities to include dynamicRegistration for:
    - formatting
    - rangeFormatting
    - hover
    - codeAction
    - hover
    - rename
2023-05-28 07:51:28 +02:00
zeertzjq
e41b2e34b4
test(extmarks): add test for virt_text_hide with 'smoothscroll' (#23791) 2023-05-28 11:09:25 +08:00
zeertzjq
7a8402ac31
vim-patch:9.0.1583: get E304 when using 'cryptmethod' "xchacha20v2" (#23790)
Problem:    Get E304 when using 'cryptmethod' "xchacha20v2". (Steve Mynott)
Solution:   Add 4th crypt method to block zero ID check.  Avoid syncing a swap
            file before reading the file. (closes vim/vim#12433)

3a2a60ce4a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-28 08:06:30 +08:00
zeertzjq
b46f61ac05
vim-patch:9.0.1582: :stopinsert may not work in a popup close handler (#23785)
Problem:    :stopinsert may not work in a popup close handler. (Ben Jackson)
Solution:   Restore stop_insert_mode when appropriate. (closes vim/vim#12452,
            closes vim/vim#12434)

a40c0bcc83
2023-05-27 22:15:22 +08:00
zeertzjq
510e1f131b
fix(extmarks): make right_align and win_col work on wrapped line (#23759) 2023-05-27 21:36:16 +08:00