aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua/plugins/treesitter.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2022-12-16 23:38:53 +0200
committersrdusr <trevorgray@srdusr.com>2022-12-16 23:38:53 +0200
commit8f4eae2782704484b498129a0a7d9044a4d73fbb (patch)
treee5980ba3f04aa07a32aca2361bfa65b32353684a /config/nvim/lua/plugins/treesitter.lua
parentdc714e9c0858b309f40f50be3254e42ee2b30b0c (diff)
parent52ed18452c16ed012e646df059859cb7925c1d8d (diff)
downloaddotfiles-8f4eae2782704484b498129a0a7d9044a4d73fbb.tar.gz
dotfiles-8f4eae2782704484b498129a0a7d9044a4d73fbb.zip
Merge commit '240510927f7694d19f8daa67d675d1685c199442' as 'config/nvim'
Diffstat (limited to 'config/nvim/lua/plugins/treesitter.lua')
-rw-r--r--config/nvim/lua/plugins/treesitter.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/config/nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..b081ca3
--- /dev/null
+++ b/config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,34 @@
+local status, treesitter = pcall(require, "nvim-treesitter.configs")
+if (not status) then return end
+
+treesitter.setup {
+ highlight = {
+ enable = true,
+ disable = {},
+ },
+ indent = {
+ enable = true,
+ disable = {},
+ --disable = { "python", "css" }
+ },
+ ensure_installed = {
+ "c",
+ "bash",
+ "lua",
+ "rust",
+ },
+ --ensure_installed = "all", -- one of "all" or a list of languages
+ --ignore_install = { "" }, -- List of parsers to ignore installing
+ autotag = {
+ enable = true,
+ },
+ efactor = {
+ highlight_definitions = { enable = true },
+ highlight_current_scope = { enable = true }
+ }
+}
+--vim.opt.foldmethod = "expr"
+--vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
+
+--local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
+--parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" }