Better config on plugins, add lazygit & update readme

This commit is contained in:
yaso 2026-07-02 12:48:12 +02:00
parent 87fc33a614
commit 4be5d628b8
9 changed files with 132 additions and 66 deletions

View file

@ -1,16 +1,4 @@
return {
{
-- Git Plugin
'tpope/vim-fugitive',
},
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
vim.keymap.set("n", "<C-/>", "gcc", { remap = true, desc = "Toggle comment" })
vim.keymap.set("v", "<C-/>", "gc", { remap = true, desc = "Toggle comment" })
end,
},
{
'windwp/nvim-autopairs',
event = "InsertEnter",

View file

@ -4,7 +4,7 @@ return {
event = { "BufReadPre", "BufNewFile" },
opts = {
-- Fallback size if the function doesn't intercept it
filesize = 2,
filesize = 1,
-- Use a detection function to unconditionally catch generated files
pattern = function(bufnr, _)
local buf_name = vim.api.nvim_buf_get_name(bufnr)

10
lua/plugins/comments.lua Normal file
View file

@ -0,0 +1,10 @@
return {
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
vim.keymap.set("n", "<C-/>", "gcc", { remap = true, desc = "Toggle comment" })
vim.keymap.set("v", "<C-/>", "gc", { remap = true, desc = "Toggle comment" })
end,
},
}

View file

@ -39,6 +39,7 @@ return {
end
},
{ icon = "󱗘 ", desc = " Harpoon Search ", key = "fl", action = "Telescope harpoon marks" },
{ icon = "", desc = " Lazy Git ", key = "lg", action = "LazyGit" },
{ icon = "󰒲 ", desc = " Lazy Manager ", key = "z", action = "Lazy" },
{ icon = "󰌵 ", desc = " Help Tags ", key = "fh", action = "Telescope help_tags" },
{ icon = "", desc = " Quit ", key = "q", action = "qa" },

View file

@ -92,8 +92,12 @@ return {
user_command("FEmulators", "FlutterEmulators", {})
user_command("FLogs", "FlutterLogToggle", {})
user_command("FLogsClear", "FlutterLogClear", {})
user_command("FPubGet", "FlutterPubGet", {})
user_command("FDevToolsStart", "FlutterDevTools", {})
user_command("FDevToolsOpen", "FlutterOpenDevTools", {})
user_command("FBuild", "split | term dart run build_runner build", {})
user_command("FWatch", "split | term dart run build_runner watch", {})
user_command("FClean", "split | term flutter clean", {})
-- Target-specific Run Command
user_command("FRunT", function(opts)
vim.cmd("FlutterRun --web-port 1995 --target=" .. opts.args)

20
lua/plugins/lazygit.lua Normal file
View file

@ -0,0 +1,20 @@
return {
"kdheepak/lazygit.nvim",
lazy = true,
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
}

View file

@ -129,7 +129,7 @@ return {
{ name = "luasnip", keyword_length = 2 },
{
name = "buffer",
keyword_length = 3,
keyword_length = 2,
-- Limit indexing to only the active visible buffer to stop lag on Enter
option = {
get_bufnrs = function()