From e4f5c0ffeb5e0a1030f877f80b3f6cf91d21928e Mon Sep 17 00:00:00 2001 From: Michael Yockey Date: Thu, 13 Feb 2025 10:07:44 -0500 Subject: [PATCH] nvim: Make treesitter work nicer with Ruby `end` --- nvim/.config/nvim/lua/yock/plugins/treesitter.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvim/.config/nvim/lua/yock/plugins/treesitter.lua b/nvim/.config/nvim/lua/yock/plugins/treesitter.lua index 4067a98..b450d44 100644 --- a/nvim/.config/nvim/lua/yock/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/yock/plugins/treesitter.lua @@ -1,5 +1,6 @@ return { 'nvim-treesitter/nvim-treesitter', + dependencies = { 'RRethy/nvim-treesitter-endwise' }, build = ':TSUpdate', config = function() local configs = require("nvim-treesitter.configs") @@ -8,7 +9,10 @@ return { ensure_installed = { 'lua', 'ruby', 'javascript', 'typescript', 'c', 'css', 'scss', 'go', 'rust' }, sync_install = false, highlight = { enable = true }, + endwise = { enable = true }, indent = { enable = true }, }) + + vim.cmd('autocmd FileType ruby setlocal indentkeys-=.') end, }