<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/filetype.lua, branch rahm</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(filetype): make filetype detection work with :doautocmd (#31470)</title>
<updated>2024-12-06T12:57:21+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-12-06T12:57:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1077843b9bee550fe2ae1e3e700a9c135005d593'/>
<id>1077843b9bee550fe2ae1e3e700a9c135005d593</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: use `vim._with` where possible</title>
<updated>2024-06-28T17:58:31+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-06-08T19:40:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=aa6b9c677d83d76d448c3bb0973bf8d14bfdf922'/>
<id>aa6b9c677d83d76d448c3bb0973bf8d14bfdf922</id>
<content type='text'>
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with
`vim._with`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with
`vim._with`.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): source ftdetect/* after creating scripts.vim autocmds (#29445)</title>
<updated>2024-06-22T13:17:36+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-06-22T13:17:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5a8a34dafa2aa9e11df405745008543eef644bdc'/>
<id>5a8a34dafa2aa9e11df405745008543eef644bdc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): use unexpanded file name (#27931)</title>
<updated>2024-03-23T03:46:23+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-03-23T03:46:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2955c921ceaf5764e8d1592a78370d9ca3a268e2'/>
<id>2955c921ceaf5764e8d1592a78370d9ca3a268e2</id>
<content type='text'>
When the edited file is a symlink, the unexpanded file name is needed to
to achieve the same behavior as the autocommand pattern matching in Vim.
Neither args.file nor args.match are guaranteed to be unexpanded, so use
bufname() instead.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the edited file is a symlink, the unexpanded file name is needed to
to achieve the same behavior as the autocommand pattern matching in Vim.
Neither args.file nor args.match are guaranteed to be unexpanded, so use
bufname() instead.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): make sure buffer is valid before call nvim_buf_call (#24922)</title>
<updated>2023-08-30T15:14:58+00:00</updated>
<author>
<name>Hongbo Liu</name>
<email>hongboliu@tencent.com</email>
</author>
<published>2023-08-30T15:14:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=670c7609c85547ef041af8cf17139a396d6af050'/>
<id>670c7609c85547ef041af8cf17139a396d6af050</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): call on_detect before setting buffer filetype</title>
<updated>2023-08-24T17:48:21+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2023-08-24T17:48:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=020d1f626a3fbda84b84b2f57e8a85662a792a1a'/>
<id>020d1f626a3fbda84b84b2f57e8a85662a792a1a</id>
<content type='text'>
The on_detect functions returned by filetype.lua set buffer local
variables which are often used by filetype plugins. For example, the
on_detect function for shell buffers sets variables such as b:is_bash or
b:is_sh, which are used by the sh ftplugin.

When called after setting the buffer's filetype, these variables cannot
be used by the ftplugin (because they are not yet defined). Instead,
call on_detect before setting the buffer filetype so that any buffer
variables set by on_detect can be used in the ftplugin.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The on_detect functions returned by filetype.lua set buffer local
variables which are often used by filetype plugins. For example, the
on_detect function for shell buffers sets variables such as b:is_bash or
b:is_sh, which are used by the sh ftplugin.

When called after setting the buffer's filetype, these variables cannot
be used by the ftplugin (because they are not yet defined). Instead,
call on_detect before setting the buffer filetype so that any buffer
variables set by on_detect can be used in the ftplugin.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(runtime): respect 'rtp' order for all runtime files (#24335)</title>
<updated>2023-07-13T22:46:16+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2023-07-13T22:46:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=dbb840da01c72d8a311e0c55d3248d78a64b63a4'/>
<id>dbb840da01c72d8a311e0c55d3248d78a64b63a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(runtime)!: remove filetype.vim (#20428)</title>
<updated>2022-10-17T06:52:40+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2022-10-17T06:52:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=042eb74ff1ed63d79f8a642649cd6be6ec4b0eb9'/>
<id>042eb74ff1ed63d79f8a642649cd6be6ec4b0eb9</id>
<content type='text'>
Made obsolete by now graduated `filetype.lua` (enabled by default).

Note that changes or additions to the filetype detection still need to
be made through a PR to vim/vim as we port the _logic_ as well as tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Made obsolete by now graduated `filetype.lua` (enabled by default).

Note that changes or additions to the filetype detection still need to
be made through a PR to vim/vim as we port the _logic_ as well as tests.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): use :setf instead of nvim_buf_set_option (#20334)</title>
<updated>2022-09-25T14:29:25+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-09-25T14:29:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f8a1cadccff39923643fdea2e282be9fffa60e99'/>
<id>f8a1cadccff39923643fdea2e282be9fffa60e99</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): run filetype.match on StdinReadPost (#20070)</title>
<updated>2022-09-03T17:27:57+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2022-09-03T17:27:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=927d4d2a15b8474cd6c605df65ef53873cf73131'/>
<id>927d4d2a15b8474cd6c605df65ef53873cf73131</id>
<content type='text'>
Problem: filetype detection does not run on piped input
Solution: add `StdinReadPost` to main filetype.lua autocommand

Rationale: legacy filetype detection checked contents by sourcing
`scripts.vim` in separate autocommands, including on `StdinReadPost`.
For Lua filetype detection, this was moved into the main autocommand,
with bundled `scripts.vim` gated behind `g:do_legacy_filetype` (i.e.,
only user `scripts.vim` are sourced for compatibility by default). Adding
`StdinReadPost` to the main autocommand again runs content checks on
piped input without requiring code duplication and low-payoff
refactoring.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: filetype detection does not run on piped input
Solution: add `StdinReadPost` to main filetype.lua autocommand

Rationale: legacy filetype detection checked contents by sourcing
`scripts.vim` in separate autocommands, including on `StdinReadPost`.
For Lua filetype detection, this was moved into the main autocommand,
with bundled `scripts.vim` gated behind `g:do_legacy_filetype` (i.e.,
only user `scripts.vim` are sourced for compatibility by default). Adding
`StdinReadPost` to the main autocommand again runs content checks on
piped input without requiring code duplication and low-payoff
refactoring.</pre>
</div>
</content>
</entry>
</feed>
