Commit Graph

17 Commits

Author SHA1 Message Date
a89ce89742 docs: fix typos (#27868)
Co-authored-by: ite-usagi <77563904+ite-usagi@users.noreply.github.com>
Co-authored-by: v-sim <56476039+v-sim@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Quico Augustijn <quico.public@gmail.com>
Co-authored-by: nhld <nahnera@gmail.com>
Co-authored-by: francisco souza <108725+fsouza@users.noreply.github.com>
2024-03-28 09:32:32 +08:00
a09ddd7ce5 docs(editorconfig): move to source 2024-03-10 23:20:44 +00:00
04232a19cc fix(type): remove incorrect arguments from vim.rpc* 2024-03-07 09:38:50 +00:00
a5fe8f59d9 docs: improve/add documentation of Lua types
- Added `@inlinedoc` so single use Lua types can be inlined into the
  functions docs. E.g.

  ```lua
  --- @class myopts
  --- @inlinedoc
  ---
  --- Documentation for some field
  --- @field somefield integer

  --- @param opts myOpts
  function foo(opts)
  end
  ```

  Will be rendered as

  ```
  foo(opts)

    Parameters:
      - {opts} (table) Object with the fields:
               - somefield (integer) Documentation
                 for some field
  ```

- Marked many classes with with `@nodoc` or `(private)`.
  We can eventually introduce these when we want to.
2024-03-01 23:02:18 +00:00
9beb40a4db feat(docs): replace lua2dox.lua
Problem:

The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.

Solution:

Re-implement the flow using Lua, LPEG and treesitter.

- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
  - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
  - LPEG for C parsing (see `scripts/cdoc_parser.lua`)
  - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
  - Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
   - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
2024-02-27 14:41:17 +00:00
35f453f65d fix: type warnings in shared.lua 2024-02-15 11:32:50 +00:00
4d91604c88 docs: add lua typing for vim.NIL 2024-01-15 08:45:30 +00:00
84bbe4b0ca fix(lua): disallow vim.wait() in fast contexts
`vim.wait()` cannot be called in a fast callback since the main loop
cannot be run in that context as it is not reentrant

Fixes #26122
2023-11-27 09:09:21 +00:00
44f698bb1a docs: update vim.schedule param name and type
Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721
and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
2023-09-23 01:54:24 +10:00
2e92065686 docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
b1cfb299df docs: various clarifications (#24876) 2023-08-26 08:35:05 +08:00
2736cb3adf docs(lua): vim.str_utf_{start,end,pos} #24424
Closes #24422
2023-07-29 07:08:32 -07:00
cfcda91827 docs(lua): add missing word in docs for vim.empty_dict (#24401) 2023-07-22 15:42:25 +08:00
6e9b204afb fix: doc errors 2023-07-17 17:09:16 +01:00
69d49727d7 fix: luacheck 2023-07-17 16:32:56 +01:00
c2d7c2826c docs(lua): change *lua-foo* -> *vim.foo* 2023-07-17 16:25:29 +01:00
0ac3c4d631 docs(lua): move function docs to lua files 2023-07-17 16:25:28 +01:00