From b94eefa6b58f274bb61db4e792105c3959cf2022 Mon Sep 17 00:00:00 2001 From: Ethan Morgan Date: Sat, 14 Feb 2026 16:40:16 +0000 Subject: init dotfiles and stuff --- nvim/after/plugin/treesitter.lua | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 nvim/after/plugin/treesitter.lua (limited to 'nvim/after/plugin/treesitter.lua') diff --git a/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua new file mode 100644 index 0000000..817febf --- /dev/null +++ b/nvim/after/plugin/treesitter.lua @@ -0,0 +1,61 @@ +require('nvim-treesitter.configs').setup { + ensure_installed = { "typescript", "cpp", "javascript", "lua", "ocaml", "go", "dockerfile", "php", "perl", "json", "yaml", "toml", "html", "css", "bash", "tsx", "python", "rust", "haskell" }, + sync_install = false, + auto_install = true, + indent = { + enable = false, + }, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +} + +local parser_config = require "nvim-treesitter.parsers".get_parser_configs() +parser_config.crystal = { + install_info = { + url = "https://github.com/crystal-lang-tools/tree-sitter-crystal", + files = { "src/parser.c", "src/scanner.c" }, + branch = "main", + }, + filetype = "crystal", +} + +local list = require("nvim-treesitter.parsers").get_parser_configs() +list.reason = { + install_info = { + url = "https://github.com/reasonml-editor/tree-sitter-reason", + files = { "src/parser.c", "src/scanner.c" }, + branch = "master", + }, +} + +vim.filetype.add { + extension = { + re = "reason", + }, +} + +vim.treesitter.language.add("reason", { filetype = "reason" }) + +require('treesitter-context').setup { + enable = false +} + +local parser_config2 = require "nvim-treesitter.parsers".get_parser_configs() +parser_config2.haxe = { + install_info = { + url = "https://github.com/vantreeseba/tree-sitter-haxe", + files = { "src/parser.c", "src/scanner.c" }, + -- optional entries: + branch = "main", + }, + filetype = "haxe", +} + +vim.opt.foldmethod = "expr" +vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" +vim.opt.foldcolumn = "0" +vim.opt.foldtext = "" +vim.opt.foldlevel = 99 +vim.opt.foldnestmax = 4 -- cgit v1.2.3