[[configの代わりにoptsを使いなさい (lazy.nvim)|configの代わりにoptsを使いなさい]] という公式の方針に従えないケースがいくつかあるのでまとめた。 ## nvim-treesitter [[nvim-tree.lua]]を `opts` で設定すると、少なくとも **[[Markdown]]のシンタックスハイライトが正しくされない** という問題が発生した。 ```lua return { "nvim-treesitter/nvim-treesitter", event = { "BufNewFile", "BufRead" }, build = ":TSUpdate", opts = { ensure_installed = { -- 中略 }, highlight = { enable = true, disable = { "ini" }, }, }, } ``` `config` を使う構成に戻したら解決した。 ```lua return { "nvim-treesitter/nvim-treesitter", event = { "BufNewFile", "BufRead" }, build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup({ ensure_installed = { -- 中略 }, highlight = { enable = true, disable = { "ini" }, }, }) end, } ``` `build` 周りのせいな気もするが、無理して `opts` にする必要もないので、`config` を使う用にする。