From 0e660f9eeb5e30cfa3d4dd077ec7fc749a4c8faf Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 30 Dec 2023 20:55:39 +0100 Subject: [PATCH] nvim: update ts_context_commentstring stuff --- .config/nvim/lua/my/coding.lua | 3 ++- .config/nvim/lua/my/filetypes.lua | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.config/nvim/lua/my/coding.lua b/.config/nvim/lua/my/coding.lua index 22c1f8c..b18e994 100644 --- a/.config/nvim/lua/my/coding.lua +++ b/.config/nvim/lua/my/coding.lua @@ -14,7 +14,8 @@ require('Comment').setup({ below = 'co', eol = 'cA', }, - pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(), + pre_hook = require('ts_context_commentstring.integrations.comment_nvim') + .create_pre_hook(), }) require("nvim-autopairs").setup({}) diff --git a/.config/nvim/lua/my/filetypes.lua b/.config/nvim/lua/my/filetypes.lua index 4ff1f40..46243a1 100644 --- a/.config/nvim/lua/my/filetypes.lua +++ b/.config/nvim/lua/my/filetypes.lua @@ -5,13 +5,15 @@ require 'nvim-treesitter.configs'.setup { highlight = { enable = true, additional_vim_regex_highlighting = { 'cpp', 'org' } - }, - context_commentstring = { - enable = true, - enable_autocmd = false -- handled by Comment } } +require('ts_context_commentstring').setup({ + enable = true, + enable_autocmd = false -- handled by Comment (?) +}) +vim.g.skip_ts_context_commentstring_module = true; -- disable backwards compat + require('orgmode').setup {} require('orgmode').setup_ts_grammar() require('which-key').register({ ['o'] = { name = 'Orgmode' } })