all repos

init.lua @ 7bd1f7936f064203a8e32ea76bf68c411073d806

my nvim config
2 files changed, 38 insertions(+), 43 deletions(-)
refactor: use mini.comment
Author: Olexandr Smirnov olexsmir@gmail.com
Committed at: 2025-07-26 19:54:43 +0300
Parent: 2af37da
M lua/plugins/meta.lua

@@ -3,6 +3,12 @@ return {

{ "echasnovski/mini.nvim", event = "VeryLazy", + dependencies = { + { + "JoosepAlviste/nvim-ts-context-commentstring", + opts = { enable_autocmd = false }, + }, + }, keys = { { "<leader>c",

@@ -21,6 +27,12 @@ require("mini.pairs").setup {}

require("mini.ai").setup {} require("mini.icons").setup {} require("mini.test").setup {} + require("mini.comment").setup { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() + or vim.bo.commentstring + end, + } end, },
M lua/plugins/treesitter.lua

@@ -1,48 +1,31 @@

---@type LazySpec return { - { - "nvim-treesitter/nvim-treesitter", - event = "BufReadPost", - dependencies = { - "RRethy/nvim-treesitter-endwise", - { "nvim-treesitter/nvim-treesitter-context", config = true }, + "nvim-treesitter/nvim-treesitter", + event = "BufReadPost", + dependencies = { + "RRethy/nvim-treesitter-endwise", + { "nvim-treesitter/nvim-treesitter-context", config = true }, + }, + build = function() + pcall(vim.cmd.TSUpdate) + end, + ---@type TSConfig + ---@diagnostic disable-next-line: missing-fields + opts = { + auto_install = true, + ensure_installed = { + "sql", + "markdown", + "markdown_inline", + "query", }, - build = function() - pcall(vim.cmd.TSUpdate) - end, - ---@type TSConfig - ---@diagnostic disable-next-line: missing-fields - opts = { - auto_install = true, - ensure_installed = { - "sql", - "markdown", - "markdown_inline", - "query", - }, - ignore_install = { "org" }, - indent = { enable = true, disable = { "python" } }, - highlight = { enable = true, additional_vim_regex_highlighting = false }, - autopairs = { enable = true }, - endwise = { enable = true }, - }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) - end, + ignore_install = { "org" }, + indent = { enable = true, disable = { "python" } }, + highlight = { enable = true, additional_vim_regex_highlighting = false }, + autopairs = { enable = true }, + endwise = { enable = true }, }, - { - "JoosepAlviste/nvim-ts-context-commentstring", - lazy = false, - init = function() - local get_option = vim.filetype.get_option - - ---@diagnostic disable-next-line: duplicate-set-field - vim.filetype.get_option = function(filetype, option) - -- stylua: ignore - return option == "commentstring" - and require("ts_context_commentstring.internal").calculate_commentstring() - or get_option(filetype, option) - end - end, - }, + config = function(_, opts) + require("nvim-treesitter.configs").setup(opts) + end, }