mirror of
https://github.com/zoriya/flake.git
synced 2026-06-18 00:24:27 +00:00
82 lines
1.6 KiB
Lua
82 lines
1.6 KiB
Lua
return {
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
version = false,
|
|
build = ":TSUpdate",
|
|
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
|
|
dependencies = {
|
|
"nvim-treesitter/nvim-treesitter-textobjects"
|
|
},
|
|
opts = {
|
|
highlight = {
|
|
enable = true,
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
indent = { enable = true },
|
|
ensure_installed = "all",
|
|
sync_install = false,
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
lookahead = false,
|
|
|
|
keymaps = {
|
|
["af"] = "@function.outer",
|
|
["if"] = "@function.inner",
|
|
["ac"] = "@class.outer",
|
|
["ic"] = "@class.inner",
|
|
["ia"] = "@parameter.inner",
|
|
["aa"] = "@parameter.outer",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
main = "nvim-treesitter.configs",
|
|
},
|
|
|
|
{
|
|
"echasnovski/mini.comment",
|
|
version = '*',
|
|
dependencies = {
|
|
{
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
opts = {
|
|
enable_autocmd = false,
|
|
}
|
|
},
|
|
},
|
|
event = "VeryLazy",
|
|
opts = {
|
|
options = {
|
|
custom_commentstring = function()
|
|
local cstr = require("ts_context_commentstring").calculate_commentstring()
|
|
if cstr then
|
|
return cstr
|
|
end
|
|
if vim.bo.commentstring == "/*%s*/" then
|
|
return "// %s"
|
|
end
|
|
return vim.bo.commentstring
|
|
end,
|
|
}
|
|
},
|
|
},
|
|
|
|
{
|
|
"danymat/neogen",
|
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
|
opts = {
|
|
languages = {
|
|
cs = {
|
|
template = {
|
|
annotation_convention = "xmldoc",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
keys = {
|
|
{ "<leader>n", "<cmd>Neogen<cr>", desc = "Generate documentation" },
|
|
},
|
|
}
|
|
}
|