mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
refactor!: update to Neovim 0.7 APIs
* set highlight groups via nvim_set_hl * define autocommands via nvim_create_autocmd * port plugin/nvim-treesitter.vim to Lua * port healthcheck to Lua
This commit is contained in:
parent
bc25a6a5c4
commit
07eb437bb1
8 changed files with 168 additions and 148 deletions
|
|
@ -195,7 +195,10 @@ local indent_funcs = {}
|
|||
function M.attach(bufnr)
|
||||
indent_funcs[bufnr] = vim.bo.indentexpr
|
||||
vim.bo.indentexpr = "nvim_treesitter#indent()"
|
||||
vim.api.nvim_command("au Filetype " .. vim.bo.filetype .. " setlocal indentexpr=nvim_treesitter#indent()")
|
||||
vim.api.nvim_create_autocmd("Filetype", {
|
||||
pattern = vim.bo.filetype,
|
||||
command = "setlocal indentexpr=nvim_treesitter#indent()",
|
||||
})
|
||||
end
|
||||
|
||||
function M.detach(bufnr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue