Commit Graph
864 Commits
Author SHA1 Message Date
Rosen Stoyanov 8faa369791 docs(gen_help_html): wrap headings for narrow viewport #29903
Problem:
The headings and help tags overlap when browsing the docs in neovim.io/doc/user/ from a mobile phone.

Solution:
Apply the correct CSS rules so that the headings and help tags wrap
nicely below one another.
2024-08-20 05:56:37 -07:00
Ricardo Casía 766d503627 docs(lsp): annotate with vim.lsp.protocol.Methods enum #29521
Added the enum type annotation `vim.lsp.protocol.Methods` to provide some intellisense support.
2024-08-20 05:52:14 -07:00
Maria José Solano a901fb875f fix(docs): add missing properties to hl_info #30032 2024-08-16 08:36:23 -07:00
Yi Ming cc26cf0400 fix(docs): do not treat indexes as short_link 2024-08-06 18:18:34 +02:00
bfredl f926cc32c9 refactor(shada): rework msgpack decoding without msgpack-c
This also makes shada reading slightly faster due to avoiding
some copying and allocation.

Use keysets to drive decoding of msgpack maps for shada entries.
2024-08-05 11:12:44 +02:00
Mathias Fußenegger 0a0962a2e8 refactor(lsp): remove freeze() from gen_lsp (#29955)
To match the change in https://github.com/neovim/neovim/pull/29283
2024-08-02 13:00:11 +02:00
zeertzjq 3146433190 build(vim-patch.sh): use 7 hex digits for runtime patch file name (#29940)
7 digits are used in commit message, so also using this in patch file
name allows its proper deletion on PR creation.
2024-08-01 20:37:43 +08:00
zeertzjqandLemonBoy 545aafbeb8 vim-patch:9.1.0547: No way to get the arity of a Vim function (#29638)
Problem:  No way to get the arity of a Vim function
          (Austin Ziegler)
Solution: Enhance get() Vim script function to return the function
          argument info using get(func, "arity") (LemonBoy)

fixes: vim/vim#15097
closes: vim/vim#15109

https://github.com/vim/vim/commit/48b7d05a4f88c4326bd5d7a73a523f2d953b3e51

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-10 08:07:16 +08:00
zeertzjq 487f44a6c1 fix(lua): change some vim.fn.expand() to vim.fs.normalize() (#29583)
Unlike vim.fn.expand(), vim.fs.normalize() doesn't expand wildcards.
2024-07-09 19:17:50 +08:00
zeertzjq 9dc09a4cdd ci(lintcommit): allow capitalized letter after colon in description (#29480) 2024-06-26 05:08:15 +08:00
TheLeoP 6c3f7e7e27 fix(gen_vimdoc): correctly generate function fields 2024-06-22 20:00:13 +01:00
zeertzjq b923fcbaf0 build(vim-patch.sh): don't ignore changes to version*.txt (#29425)
Suggest adding them to news.txt instead.

Also don't ignore changes to intro.txt and sponsor.txt, as they don't
change much these days, and it's necessary to consider whether to
include their changes in Nvim's intro.txt.
2024-06-20 20:16:53 +08:00
Justin M. Keyes ceea6898a8 fix(gen_help_html): handle delimiter, heading #29415
Problem:
vimdoc grammar added new forms that are not handled in our HTML
generator. https://github.com/neovim/tree-sitter-vimdoc/pull/134

Solution:
Update `gen_help_html.lua`.

Fixes #29277
2024-06-19 09:45:40 -07:00
Will Hopkins e947f226be fix(types): use vararg return type annotation
build(types): allow vararg returns in function types
2024-06-11 16:36:29 +01:00
Lewis Russell 5e49ef0af3 refactor(lua): improve type annotations 2024-06-11 12:45:43 +01:00
dundargoc 6c7677e5d2 revert(commitlint): stop ignoring "fixup" commits (#29184)
This reverts 2875d45e79.

Allowing lintcommit to ignore "fixup" makes it too easy to fixup commits
to be merged on master as the CI won't give any indications that
something is wrong. Contributors can always squash their pull requests
if it annoys them too much.
2024-06-07 11:36:14 +08:00
Ilia Choly 8cbb1f20e5 refactor(lua): use tuple syntax everywhere #29111 2024-06-04 06:06:02 -07:00
Ilia Choly 9eb0426002 fix(luacats): allow all types inside tuples 2024-06-01 12:56:43 +01:00
Ilia Choly d62d181ce0 refactor(lsp): use tuple syntax in generated protocol types (#29110) 2024-05-31 16:48:05 +02:00
Ilia Choly 217828b20c fixup! docs(luacats): add tuple support 2024-05-31 15:00:17 +01:00
Ilia Choly d87ecfc8bc docs(luacats): add tuple support 2024-05-31 15:00:17 +01:00
Gregory Anders 0bdd602bf9 Merge pull request #27339 from MariaSolOs/completion
feat(lsp): completion side effects
2024-05-28 12:39:30 -05:00
Maria José Solano ff097f2091 feat(lsp): completion side effects 2024-05-27 14:53:28 -07:00
dundargoc 6e8a728e3d refactor: fix luals type warnings 2024-05-27 20:48:46 +02:00
dundargoc 93c55c238f test(lintdoc): check that input list is same length as output list (#28976) 2024-05-25 07:39:06 +08:00
dundargoc 6dc62c2e2b docs: extract health to its own file 2024-05-24 11:07:30 +02:00
Saien Govender c614969570 build(docs): update CSS #28896
Problem:
Not using minified version of bootstrap.
Don't need to load normalize with new version of bootstrap.
See https://github.com/neovim/neovim.github.io/pull/350

Solution:
Update link to bootstrap file.
Remove link to normalize.
2024-05-23 06:20:29 -07:00
dundargoc e8f7025de1 docs: move vim.health documentation to lua.txt
`vim.health` is not a "plugin" but part of our Lua API and the
documentation should reflect that. This also helps make the
documentation maintenance easier as it is now generated.
2024-05-22 20:15:17 +02:00
Jongwook Choi 7aaa4a51b7 build(vim-patch.sh): include commit subject #28767
Problem: vim-patch commits lack an informative title and summary in the
very first line of the commit message when the vim-revision is a Git SHA
hash, unlike when is a Vim version. This makes it difficult to discern
at a glance what changes are introduced by such vim-patch commits (in
git log, PR title, changelog generated by git-cliff, etc.).

BEFORE:

    vim-patch:abcdef123456

    runtime(vim): improve performance

    <some details>
    ...

Solution: Repeat the title of the upstream commit message, to improve
the clarity and visibility of the commit message.

AFTER:

    vim-patch:abcdef123456: runtime(vim): improve performance

    <some details>
    ...

Note: the `vim-patch:<hash>` token is still needed by `vim-patch.sh`
(but not necessarily in the very first line of the commit message) to
determine which vim patches have been applied. `<hash>` is internally
normalized to 7 hex digits.
2024-05-21 09:10:39 -07:00
Jongwook Choi 878dcf1980 docs(gen_help_html.lua): handle modeline and note nodes
Problem:

'modeline' and 'note' are unhandled in the online HTML documentation.

Some (not all) modelines are parsed by the vimdoc parser as a node of
type 'modeline'.

Solution:

- Ignore 'modeline' in HTML rendering.
- Render 'note' text in boldface.
2024-05-17 08:18:01 +02:00
Justin M. Keyes 31dc627969 docs: news #28773 2024-05-16 06:28:27 -07:00
Justin M. Keyes 668b5fc155 docs: nvim.appdata.xml, set faq to "flow" layout #28769 2024-05-16 01:53:33 -07:00
Jongwook Choi 174da7fe68 docs(gen_help_html.lua): fix broken pre text, and handle linewrap
Problem:

- Since #28678, pre-formatted text in the online documentation do not
  render whitespaces correctly: should be pre-like text, but shown like
  normal paragraph (see #28754).

- Code blocks with long lines should not be wrapped (e.g. see
  |dev-vimpatch-list-management|).

Solution:

- Use `white-space: pre-wrap`. Compared to `white-space: pre`, this
  option will make long lines including a very long URL wrapped.
  This properly fixes #28754 and #28678.

- Use horizontal scrollbar for the code blocks that are horizontally too
  long, instead of wrapping text. This will make the code easy to read
  while the pre-text block not interfering with the navigation bar.
2024-05-16 09:01:05 +02:00
zeertzjq 9ca81b0259 build(release.sh): set VIMRUNTIME when regenerating docs (#28765) 2024-05-16 07:21:19 +08:00
Justin M. Keyes 4399c4932d build(release.sh): use git cliff, drop old script 2024-05-16 00:19:17 +02:00
Justin M. Keyes 54044e6dce fix(release.sh): ze version is too big 2024-05-16 00:19:17 +02:00
Justin M. Keyes 01b6bff7e9 docs: news
Set dev_xx.txt help files to use "flow" layout.
2024-05-15 23:19:26 +02:00
zeertzjq ffb4b50e74 docs(lua): restore missing indexing for vim.bo and vim.wo (#28751) 2024-05-15 19:39:35 +08:00
gusain71 ebba7ae095 docs(gen_help_html.lua): wrap legacy help at word-boundary #28678
Problem:
On the page: https://neovim.io/doc/user/dev_vimpatch.html
The links extend beyond the container and thus end up behind the navigation to the right.

Solution:
Add these lines to get_help_html.lua:

    white-space: normal;
    word-wrap: break-word;
2024-05-14 04:23:43 -07:00
zeertzjqandChristian Brabandt 7a03cd1dba vim-patch:1c5728e0c4a9 (#28703)
runtime(doc): update and remove  some invalid links

closes: vim/vim#14748

https://github.com/vim/vim/commit/1c5728e0c4a9df930879f9f0ca108092d5902194

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-05-11 18:14:03 +08:00
zeertzjqandRestorer 854c362cc8 vim-patch:b23c1fc59650 (#28702)
runtime(doc): Add Makefile for the Vim documentation on Windows (vim/vim#13467)

* Makefile for the Vim documentation on Windows

* Corrected comments

https://github.com/vim/vim/commit/b23c1fc596501a8dfc0355ed8084dcbf018f7907

Co-authored-by: Restorer <69863286+RestorerZ@users.noreply.github.com>
2024-05-11 17:43:23 +08:00
James Trew 93940af1d4 docs(luacats): support backtick captured generic type
Problem:
While LuaCATS's generics system are still considered WIP by luals, they
currently support type captured generics.

See "Capture with Backtick" example:
https://luals.github.io/wiki/annotations/#generic

Solution:
Add support for it in the LuaCATS grammar
2024-05-07 14:33:14 +01:00
dundargoc 01e4a70d66 build: improve git-cliff CHANGELOG output
- Sort sections according to custom preference instead of
  alphabetically. It is ordered according to "most relevant" to "least
  relevant" to users.
- Sort commits alphabetically
- Don't uppercase the first letter of the commit message
2024-05-02 22:57:07 +02:00
Justin M. Keyes cb24a3907c docs: format vim_diff.txt for "flow" layout #28584 2024-04-30 09:37:45 -07:00
Justin M. Keyes dafa51c16d docs(api): sort unreleased nvim__ functions last #28580 2024-04-30 06:06:14 -07:00
Justin M. KeyesandKevin Pham 71cf75f96a docs: misc #24163
- Also delete old perl scripts which are not used since 8+ years ago.

fix #23251
fix #27367
ref https://github.com/neovim/neovim/issues/2252#issuecomment-1902662577

Helped-by: Daniel Kongsgaard <dakongsgaard@gmail.com>
Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
2024-04-30 04:30:21 -07:00
dundargoc 052498ed42 test: improve test conventions
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
2024-04-23 18:17:04 +02:00
Justin M. Keyes 9912a4c81b refactor(lua): deprecate tbl_flatten
Problem:
Besides being redundant with vim.iter():flatten(), `tbl_flatten` has
these problems:

- Has `tbl_` prefix but only accepts lists.
- Discards some results! Compare the following:
  - iter.flatten():
    ```
    vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable()
    ```
  - tbl_flatten:
    ```
    vim.tbl_flatten({1, { { a = 2 } }, { 3 } })
    ```

Solution:
Deprecate tbl_flatten.

Note:
iter:flatten() currently fails ("flatten() requires a list-like table")
on this code from gen_lsp.lua:

    local anonym = vim.iter({ -- remove nil
      anonymous_num > 1 and '' or nil,
      '---@class ' .. anonymous_classname,
    }):flatten():totable()

Should we enhance :flatten() to work for arrays?
2024-04-22 02:11:23 +02:00
dundargoc 7035125b2b test: improve test conventions
Work on https://github.com/neovim/neovim/issues/27004.
2024-04-08 22:51:00 +02:00
zeertzjq 978962f9a0 build(release.sh): regenerate docs after changing NVIM_API_PRERELEASE (#28229)
After #25574, the value of NVIM_API_PRERELEASE can affect docs, so docs
need to be regenerated after changing NVIM_API_PRERELEASE.
2024-04-08 17:46:41 +08:00