summaryrefslogtreecommitdiffstats
path: root/nvim/init.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2024-03-15 11:35:07 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2024-03-15 11:35:07 -0400
commit0054f204262d972633f719669b48d987e6cd270c (patch)
tree801017a3ec6c0d2c3e7b2315ccc42293c41ab395 /nvim/init.lua
parentd9fb26d3600e313bcf9afa66cb5828c7bb4bb0cb (diff)
downloaddots-0054f204262d972633f719669b48d987e6cd270c.tar.gz
fix: disable ts indenting for Ruby
Tree-sitter indenting for ruby is pretty terrible. But the fix requires a few steps, so showed those and documented how you could do that for other languages as well (with the tricky part being the additional_vim_regex_highlighting trick)
Diffstat (limited to 'nvim/init.lua')
-rw-r--r--nvim/init.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index c504ccb..87133dd 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -790,8 +790,14 @@ require('lazy').setup({
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
-- Autoinstall languages that are not installed
auto_install = true,
- highlight = { enable = true },
- indent = { enable = true },
+ highlight = {
+ enable = true,
+ -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
+ -- If you are experiencing weird indenting issues, add the language to
+ -- the list of additional_vim_regex_highlighting and disabled languages for indent.
+ additional_vim_regex_highlighting = { 'ruby' },
+ },
+ indent = { enable = true, disable = { 'ruby' } },
},
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`