all repos

init.lua @ 8cf1199e895fcb8a18d44ee9164d58eb3df21636

my nvim config
1 files changed, 13 insertions(+), 0 deletions(-)
feat: get commentstring option via treesitter parser
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-08-17 00:17:05 +0300
Parent: b86ff7f
M lua/plugins/core.lua

@@ -35,4 +35,17 @@ check_ts = true,

disable_filetype = { "TelescopePrompt", "markdown" }, }, }, + { + "JoosepAlviste/nvim-ts-context-commentstring", + lazy = false, + init = function() + local get_option = vim.filetype.get_option + vim.filetype.get_option = function(filetype, option) ---@diagnostic disable-line: duplicate-set-field + -- stylua: ignore + return option == "commentstring" + and require("ts_context_commentstring.internal").calculate_commentstring() + or get_option(filetype, option) + end + end, + }, }