init.vim に以下を追記してみてください。
lua << EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = 'all',
highlight = { enable = true },
}
EOF
追記
lua require('plugin').setup()
を書いていないから動かないものと思って上記の回答を書きましたが、そもそもnvim-treesitter
については不要だったので、完全に間違いです。
同様の現象を手元で再現させようとしましたが、できませんでした。(:TSInstall
などのコマンドは使用可能な状態でした。)
私が再現させるために使用した環境は以下です。
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az316-460
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/share/nvim"
Run :checkhealth for more info
init.vim
const s:cache_home = empty($XDG_CACHE_HOME) ? expand('~/.cache') : $XDG_CACHE_HOME
if &runtimepath !~# '/dein.vim'
const s:dein_dir = s:cache_home . '/dein/repos/github.com/Shougo/dein.vim'
if !isdirectory(s:dein_dir)
execute printf('!git clone https://github.com/Shougo/dein.vim.git %s', s:dein_dir)
endif
execute printf('set runtimepath^=%s', substitute(fnamemodify(s:dein_dir, ':p'), '[/\\]$', '', ''))
endif
const s:path = s:cache_home . '/dein'
if dein#load_state(s:path)
const s:base_dir = fnamemodify(expand($MYVIMRC), ':h')
const s:deintoml = s:base_dir . '/dein.toml'
call dein#begin(s:path, [ $MYVIMRC, s:deintoml ])
call dein#load_toml(s:deintoml)
call dein#end()
call dein#save_state()
endif
if dein#check_install()
call dein#install()
endif
filetype plugin indent on
syntax enable
dein.toml
[[plugins]]
repo = 'Shougo/dein.toml'
lazy = false
[[plugins]]
repo = 'nvim-treesitter/nvim-treesitter'
lazy = true
on_evnet = 'BufReadPost'