nvim
This commit is contained in:
parent
1bfebf56b5
commit
b6bdf1e6c2
6 changed files with 21 additions and 5 deletions
|
|
@ -1 +0,0 @@
|
|||
vim.treesitter.start()
|
||||
|
|
@ -1 +0,0 @@
|
|||
vim.treesitter.start()
|
||||
|
|
@ -1 +0,0 @@
|
|||
vim.treesitter.start()
|
||||
|
|
@ -1 +0,0 @@
|
|||
vim.treesitter.start()
|
||||
|
|
@ -1 +0,0 @@
|
|||
vim.treesitter.start()
|
||||
|
|
@ -106,3 +106,24 @@ vim.api.nvim_create_user_command("FormatEnable", function()
|
|||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
|
||||
-- Enable treesitter
|
||||
|
||||
local fts = {
|
||||
"php",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"lua",
|
||||
"go",
|
||||
"elixir",
|
||||
"heex",
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = fts,
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue