<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/scripts/luacats_parser.lua, branch userregs_2</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>build: move all generator scripts to `src/gen/`</title>
<updated>2025-02-26T16:54:37+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2025-02-26T11:38:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=0f24b0826a27b7868a3aacc25199787e7453d4cc'/>
<id>0f24b0826a27b7868a3aacc25199787e7453d4cc</id>
<content type='text'>
- Move all generator Lua scripts to the `src/gen/`
- Add a `.luarc.json` to `src/gen/`
- Add a `preload.lua` to `src/gen/`
  - Add `src` to `package.path` so it aligns with `.luarc.json'
- Fix all `require` statements in `src/gen/` so they are consistent:
    - `require('scripts.foo')` -&gt; `require('gen.foo')`
    - `require('src.nvim.options')` -&gt; `require('nvim.options')`
    - `require('api.dispatch_deprecated')` -&gt; `require('nvim.api.dispatch_deprecated')`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Move all generator Lua scripts to the `src/gen/`
- Add a `.luarc.json` to `src/gen/`
- Add a `preload.lua` to `src/gen/`
  - Add `src` to `package.path` so it aligns with `.luarc.json'
- Fix all `require` statements in `src/gen/` so they are consistent:
    - `require('scripts.foo')` -&gt; `require('gen.foo')`
    - `require('src.nvim.options')` -&gt; `require('nvim.options')`
    - `require('api.dispatch_deprecated')` -&gt; `require('nvim.api.dispatch_deprecated')`
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lsp): deprecate non-method client functions</title>
<updated>2024-11-20T08:51:45+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-11-14T11:53:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=454ae672aad172a299dcff7c33c5e61a3b631c90'/>
<id>454ae672aad172a299dcff7c33c5e61a3b631c90</id>
<content type='text'>
Deprecated:
- `client.request()` -&gt; `client:request()`
- `client.request_sync()` -&gt; `client:request_sync()`
- `client.notify()` -&gt; `client:notify()`
- `client.cancel_request()` -&gt; `client:cancel_request()`
- `client.stop()` -&gt; `client:stop()`
- `client.is_stopped()` `client:is_stopped()`
- `client.supports_method()` -&gt; `client:supports_method()`
- `client.on_attach()` -&gt; `client:on_attach()`

Fixed docgen to link class fields to the full function doc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deprecated:
- `client.request()` -&gt; `client:request()`
- `client.request_sync()` -&gt; `client:request_sync()`
- `client.notify()` -&gt; `client:notify()`
- `client.cancel_request()` -&gt; `client:cancel_request()`
- `client.stop()` -&gt; `client:stop()`
- `client.is_stopped()` `client:is_stopped()`
- `client.supports_method()` -&gt; `client:supports_method()`
- `client.on_attach()` -&gt; `client:on_attach()`

Fixed docgen to link class fields to the full function doc.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(gen_vimdoc): correctly generate function fields</title>
<updated>2024-06-22T19:00:13+00:00</updated>
<author>
<name>TheLeoP</name>
<email>eugenio2305@hotmail.com</email>
</author>
<published>2024-06-21T19:44:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6c3f7e7e27a0ffcf6d58dc1f5ad2fce7e59a2d88'/>
<id>6c3f7e7e27a0ffcf6d58dc1f5ad2fce7e59a2d88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lua): improve type annotations</title>
<updated>2024-06-11T11:45:43+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-06-11T11:05:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=5e49ef0af3cb8dba658e5d0dc6a807f8edebf590'/>
<id>5e49ef0af3cb8dba658e5d0dc6a807f8edebf590</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: fix luals type warnings</title>
<updated>2024-05-27T18:48:46+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-05-25T18:35:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6e8a728e3dad747d0c46dc47a530b76e8997bc08'/>
<id>6e8a728e3dad747d0c46dc47a530b76e8997bc08</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): return correct match table in iter_captures()</title>
<updated>2024-03-27T10:39:46+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-03-25T22:06:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=7d971500847089ec8ade926a7f84d6bb3a51c8b0'/>
<id>7d971500847089ec8ade926a7f84d6bb3a51c8b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: improve/add documentation of Lua types</title>
<updated>2024-03-01T23:02:18+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-02-27T15:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=a5fe8f59d98398d04bed8586cee73864bbcdde92'/>
<id>a5fe8f59d98398d04bed8586cee73864bbcdde92</id>
<content type='text'>
- 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(docs): replace lua2dox.lua</title>
<updated>2024-02-27T14:41:17+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-02-15T17:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9beb40a4db5613601fc1a4b828a44e5977eca046'/>
<id>9beb40a4db5613601fc1a4b828a44e5977eca046</id>
<content type='text'>
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).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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).
</pre>
</div>
</content>
</entry>
</feed>
