From 8df90a3a08d2af615f9e2c5218a3a29842be2f9e Mon Sep 17 00:00:00 2001 From: hektor Date: Tue, 2 Jun 2026 21:20:31 +0200 Subject: [PATCH] fix(nvim): properly set up 'nvim-ts-context-commentstring' --- .../nvim/after/plugin/nvim-ts-context-commentstring.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 dots/.config/nvim/after/plugin/nvim-ts-context-commentstring.lua diff --git a/dots/.config/nvim/after/plugin/nvim-ts-context-commentstring.lua b/dots/.config/nvim/after/plugin/nvim-ts-context-commentstring.lua new file mode 100644 index 00000000..f66dd027 --- /dev/null +++ b/dots/.config/nvim/after/plugin/nvim-ts-context-commentstring.lua @@ -0,0 +1,8 @@ +require("ts_context_commentstring").setup({ enable_autocmd = false }) + +-- https://github.com/JoosepAlviste/nvim-ts-context-commentstring/issues/109 +local get_option = vim.filetype.get_option +vim.filetype.get_option = function(filetype, option) + return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring() + or get_option(filetype, option) +end