<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/filetype.lua, branch master</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>docs: use "ev" convention in event-handlers</title>
<updated>2026-03-12T10:12:56+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-03-11T13:25:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7ea148a1dc1518bc8a6835c0329894a590135937'/>
<id>7ea148a1dc1518bc8a6835c0329894a590135937</id>
<content type='text'>
Problem:
In autocmd examples, using "args" as the event-object name is vague and
may be confused with a user-command.

Solution:
Use "ev" as the conventional event-object name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
In autocmd examples, using "args" as the event-object name is vague and
may be confused with a user-command.

Solution:
Use "ev" as the conventional event-object name.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): move fallback logic to vim.filetype.match() #30141</title>
<updated>2025-10-29T01:45:50+00:00</updated>
<author>
<name>Jonny Kong</name>
<email>jonnykong1996@gmail.com</email>
</author>
<published>2025-10-29T01:45:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e2cb675705221066522ae707ed5f572a0cf0ebcf'/>
<id>e2cb675705221066522ae707ed5f572a0cf0ebcf</id>
<content type='text'>
Problem:
Previously, the fallback logic to ".conf" was located outside of
`vim.filetype.match()` and directly within the AutoCmd definition. As a
result, `vim.filetype.match()` would return nil instead of ".conf" for
fallback cases (#30100).

Solution:
Added a boolean return value to `vim.filetype.match()` that indicates
whether the match was the result of fallback. If true, the filetype will
be set using `setf FALLBACK &lt;ft&gt;` instead of `setf &lt;ft&gt;`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Previously, the fallback logic to ".conf" was located outside of
`vim.filetype.match()` and directly within the AutoCmd definition. As a
result, `vim.filetype.match()` would return nil instead of ".conf" for
fallback cases (#30100).

Solution:
Added a boolean return value to `vim.filetype.match()` that indicates
whether the match was the result of fallback. If true, the filetype will
be set using `setf FALLBACK &lt;ft&gt;` instead of `setf &lt;ft&gt;`.</pre>
</div>
</content>
</entry>
<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>
</feed>
