Can I tell Neovim not to load a bundled indentation file? For example, when I edit a .tex file, "share/nvim/runtime/indent/tex.vim" loads automatically. I don't want those settings. Do I have to override them, or can I just put something in my local "indent/tex.lua" to stop the defaults from loading? (If so, what?)
Edit: If I replace my local indent/tex.lua
with indent/tex.vim
and say let b:did_indent = 1
that works fine. But I want to know how to do this using Lua. A pointer to documentation of how to access the appropriate namespace is all I really need.
Edit 2: Commenters say that having vim.b.did_indent = 1
in my local indent/tex.lua
(not under after
) should have the same effect as putting let b:did_indent = 1
in indent/tex.vim
. I have tried these two approaches (one at a time), and they do not have the same effect. (The files contain only one line, as just stated.) In particular, when I use the tex.vim
file, the value of indentexpr
is the empty string (as I wish and expect). But when I use the tex.lua
file, the value of indentexpr
is GetTeXIndent()
, which is what I am trying to avoid.
vim.b.did_indent = 1
in my localindent/tex.lua
(notafter
) it does not turn off the default indenting. If I instead createindent/tex.vim
with the contentlet b:did_indent = 1
, it does turn off the default indenting. I think (?) the two shd have the same effect. Thanks!