From 5c29be9a01d3ca8b69764a3bdf28377190373b0a Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sat, 30 Dec 2023 17:36:13 -0500 Subject: [PATCH] neovim: Make commenting work with jsx/tsx --- home/neovim.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/home/neovim.nix b/home/neovim.nix index 98093a3..e5e6278 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -455,7 +455,11 @@ in { plugin = comment-nvim; type = "lua"; - config = ''require('Comment').setup()''; + config = /* lua */ '' + require('Comment').setup { + pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook() + } + ''; } { plugin = zen-mode-nvim; @@ -589,6 +593,15 @@ in require('tailwindcss-colors').setup() ''; } + { + plugin = nvim-ts-context-commentstring; + type = "lua"; + config = /* lua */ '' + require('ts_context_commentstring').setup { + enable_autocmd = false, + } + ''; + } cosco-vim fzf-vim vim-caddyfile