diff options
Diffstat (limited to 'nvim/lua/user/treesitter.lua')
-rw-r--r-- | nvim/lua/user/treesitter.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/nvim/lua/user/treesitter.lua b/nvim/lua/user/treesitter.lua new file mode 100644 index 0000000..41c29b8 --- /dev/null +++ b/nvim/lua/user/treesitter.lua @@ -0,0 +1,44 @@ +local M = { + "nvim-treesitter/nvim-treesitter", + commit = "226c1475a46a2ef6d840af9caa0117a439465500", + event = "BufReadPost", + dependencies = { + { + "JoosepAlviste/nvim-ts-context-commentstring", + event = "VeryLazy", + commit = "729d83ecb990dc2b30272833c213cc6d49ed5214", + }, + { + "nvim-tree/nvim-web-devicons", + event = "VeryLazy", + commit = "0568104bf8d0c3ab16395433fcc5c1638efc25d4" + }, + }, +} +function M.config() + local treesitter = require "nvim-treesitter" + local configs = require "nvim-treesitter.configs" + + configs.setup { + ensure_installed = { "lua", "markdown", "markdown_inline", "bash", "python" }, -- put the language you want in this array + -- ensure_installed = "all", -- one of "all" or a list of languages + ignore_install = { "" }, -- List of parsers to ignore installing + sync_install = false, -- install languages synchronously (only applied to `ensure_installed`) + + highlight = { + enable = true, -- false will disable the whole extension + disable = { "css" }, -- list of language that will be disabled + }, + autopairs = { + enable = true, + }, + indent = { enable = true, disable = { "python", "css" } }, + + context_commentstring = { + enable = true, + enable_autocmd = false, + }, + } +end + +return M |