aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/nvim-treesitter.lua
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2025-11-04 20:34:36 +0000
committerJustine Smithies <justine@smithies.me.uk>2025-11-04 20:34:36 +0000
commit067b0e87aae4cf81b4dfd0907c6ce1d3650b7523 (patch)
tree58512324aa4b6479b328d3424f4507fa7bb9e9ef /.config/nvim/lua/plugins/nvim-treesitter.lua
parentb3a0a68af5dcb496fdd1b8a40bd0f5a9904659b8 (diff)
Initial commit
Diffstat (limited to '.config/nvim/lua/plugins/nvim-treesitter.lua')
-rw-r--r--.config/nvim/lua/plugins/nvim-treesitter.lua52
1 files changed, 52 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/nvim-treesitter.lua
new file mode 100644
index 0000000..d6b09b6
--- /dev/null
+++ b/.config/nvim/lua/plugins/nvim-treesitter.lua
@@ -0,0 +1,52 @@
+local config = function()
+ require("nvim-treesitter.configs").setup({
+ build = ":TSUpdate",
+ indent = {
+ enable = true,
+ },
+ autotag = {
+ enable = true,
+ },
+ event = {
+ "BufReadPre",
+ "BufNewFile",
+ },
+ ensure_installed = {
+ "markdown",
+ "json",
+ "javascript",
+ "typescript",
+ "yaml",
+ "html",
+ "css",
+ "markdown",
+ "bash",
+ "lua",
+ "dockerfile",
+ "solidity",
+ "gitignore",
+ "python",
+ "vue",
+ },
+ auto_install = true,
+ highlight = {
+ enable = true,
+ additional_vim_regex_highlighting = true,
+ },
+ incremental_selection = {
+ enable = true,
+ keymaps = {
+ init_selection = "<C-s>",
+ node_incremental = "<C-s>",
+ scope_incremental = false,
+ node_decremental = "<BS>",
+ },
+ },
+ })
+end
+
+return {
+ "nvim-treesitter/nvim-treesitter",
+ lazy = false,
+ config = config,
+}