A very fast neovim config :D
at master 42 lines 1.2 kB view raw
1local M = { 2 "nvim-treesitter/nvim-treesitter", 3 build = ":TSUpdate", 4 event = "BufReadPost", 5 dependencies = { 6 "nvim-treesitter/nvim-treesitter-context", 7 }, 8 opts = { 9 highlight = { 10 enable = true, 11 use_languagetree = true, 12 disable = function(lang, buf) 13 local max_filesize = 100 * 1024 -- 100 KB 14 local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) 15 if ok and stats and stats.size > max_filesize then 16 return true 17 end 18 end, 19 }, 20 autopairs = { enable = true }, 21 autotag = { enable = true }, 22 indent = { enable = true }, 23 ensure_installed = { 24 "lua", 25 "luadoc", 26 "printf", 27 "vim", 28 "vimdoc", 29 "markdown", 30 "markdown_inline", 31 }, 32 sync_install = true, 33 auto_install = true, 34 ignore_install = {}, 35 }, 36 config = function(_, opts) 37 require("nvim-treesitter.configs").setup(opts) 38 require("treesitter-context").setup({ enable = true, max_lines = 3 }) 39 end, 40} 41 42return M