<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/filetype.lua, branch usermarks</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>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>
<entry>
<title>feat(runtime)!: enable filetype.lua by default (#19216)</title>
<updated>2022-07-07T16:53:47+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2022-07-07T16:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=72877bb17d70362f91a60b31bf0244dbf8ed58ae'/>
<id>72877bb17d70362f91a60b31bf0244dbf8ed58ae</id>
<content type='text'>
* revert to filetype.vim by setting `g:do_legacy_filetype`
* skip either filetype.lua or filetype.vim via `g:did_load_filetypes`

(Running both is no longer required and therefore no longer supported.)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* revert to filetype.vim by setting `g:do_legacy_filetype`
* skip either filetype.lua or filetype.vim via `g:did_load_filetypes`

(Running both is no longer required and therefore no longer supported.)</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): remove call to vim.fn.resolve and pass filename to match function</title>
<updated>2022-07-06T14:25:51+00:00</updated>
<author>
<name>smjonas</name>
<email>jonas.strittmatter@gmx.de</email>
</author>
<published>2022-07-06T14:25:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f9683f28236599a7082f43304a9685fad8ee8e00'/>
<id>f9683f28236599a7082f43304a9685fad8ee8e00</id>
<content type='text'>
For example on MacOS, /etc/hostname.file is symlinked to
/private/etc/hostname.file. We only care about the original file path though.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example on MacOS, /etc/hostname.file is symlinked to
/private/etc/hostname.file. We only care about the original file path though.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(filetype): fix filetype patterns</title>
<updated>2022-07-06T14:25:23+00:00</updated>
<author>
<name>smjonas</name>
<email>jonas.strittmatter@gmx.de</email>
</author>
<published>2022-07-06T14:25:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f3c78a4465942db62cf231b9eedc5107ad46e655'/>
<id>f3c78a4465942db62cf231b9eedc5107ad46e655</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(filetype)!: allow vim.filetype.match to use different strategies (#18895)</title>
<updated>2022-06-26T16:41:20+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2022-06-26T16:41:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f3ce06cfa139ca3fb142cf5adf96a2ecc4d8f551'/>
<id>f3ce06cfa139ca3fb142cf5adf96a2ecc4d8f551</id>
<content type='text'>
This enables vim.filetype.match to match based on a buffer (most
accurate) or simply a filename or file contents, which are less accurate
but may still be useful for some scenarios.

When matching based on a buffer, the buffer's name and contents are both
used to do full filetype matching. When using a filename, if the file
exists the file is loaded into a buffer and full filetype detection is
performed. If the file does not exist then filetype matching is only
performed against the filename itself. Content-based matching does the
equivalent of scripts.vim, and matches solely based on file contents
without any information from the name of the file itself (e.g. for
shebangs).

BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead 
of `vim.filetype.match(name, bufnr)`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables vim.filetype.match to match based on a buffer (most
accurate) or simply a filename or file contents, which are less accurate
but may still be useful for some scenarios.

When matching based on a buffer, the buffer's name and contents are both
used to do full filetype matching. When using a filename, if the file
exists the file is loaded into a buffer and full filetype detection is
performed. If the file does not exist then filetype matching is only
performed against the filename itself. Content-based matching does the
equivalent of scripts.vim, and matches solely based on file contents
without any information from the name of the file itself (e.g. for
shebangs).

BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead 
of `vim.filetype.match(name, bufnr)`</pre>
</div>
</content>
</entry>
<entry>
<title>feat(filetype): remove side effects from vim.filetype.match (#18894)</title>
<updated>2022-06-09T19:12:36+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2022-06-09T19:12:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=58323b1fe2e494cf6a75f108780e21c08996c08e'/>
<id>58323b1fe2e494cf6a75f108780e21c08996c08e</id>
<content type='text'>
Many filetypes from filetype.vim set buffer-local variables, meaning
vim.filetype.match cannot be used without side effects. Instead of
setting these buffer-local variables in the filetype detection functions
themselves, have vim.filetype.match return an optional function value
that, when called, sets these variables. This allows vim.filetype.match
to work without side effects.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many filetypes from filetype.vim set buffer-local variables, meaning
vim.filetype.match cannot be used without side effects. Instead of
setting these buffer-local variables in the filetype detection functions
themselves, have vim.filetype.match return an optional function value
that, when called, sets these variables. This allows vim.filetype.match
to work without side effects.</pre>
</div>
</content>
</entry>
<entry>
<title>chore: format runtime with stylua</title>
<updated>2022-05-09T14:31:55+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2022-05-09T09:23:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=aefdc6783cb77f09786542c90901a9e7120bea42'/>
<id>aefdc6783cb77f09786542c90901a9e7120bea42</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ftdetect): source plugins in autogroup (#18237)</title>
<updated>2022-04-23T15:57:38+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2022-04-23T15:57:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5c53e29ca9f5e86dd905cae134c78aa341ead157'/>
<id>5c53e29ca9f5e86dd905cae134c78aa341ead157</id>
<content type='text'>
In `filetype.lua`, source runtime `ftdetect` scripts within the `filetypedetect` augroup, same as `filetype.vim` (and only do so if `g:did_load_ftdetect` does not exist).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In `filetype.lua`, source runtime `ftdetect` scripts within the `filetypedetect` augroup, same as `filetype.vim` (and only do so if `g:did_load_ftdetect` does not exist).</pre>
</div>
</content>
</entry>
</feed>
