mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-08-17 00:01:18 +02:00
Added more plugins
This commit is contained in:
parent
d350db2449
commit
9e5256058d
8 changed files with 260 additions and 42 deletions
28
lua/custom/plugins/autopairs.lua
Normal file
28
lua/custom/plugins/autopairs.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
dependencies = {
|
||||
'hrsh7th/nvim-cmp',
|
||||
},
|
||||
config = function()
|
||||
local autopairs = require 'nvim-autopairs'
|
||||
|
||||
autopairs.setup {
|
||||
check_ts = true, -- enable treesitter
|
||||
ts_config = {
|
||||
lua = { 'string' }, -- don't add pairs in lua string treesitter nodes
|
||||
javascript = { 'template_string' }, -- don't add pairs in javscript template_string treesitter nodes
|
||||
java = false, -- don't check treesitter on java
|
||||
},
|
||||
}
|
||||
|
||||
-- import nvim-autopairs completion functionality
|
||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
|
||||
-- import nvim-cmp plugin (completions plugin)
|
||||
local cmp = require 'cmp'
|
||||
|
||||
-- make autopairs and completion work together
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
}
|
14
lua/custom/plugins/flash.lua
Normal file
14
lua/custom/plugins/flash.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
'folke/flash.nvim',
|
||||
event = 'VeryLazy',
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "gs", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "gS", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
|
@ -2,4 +2,8 @@
|
|||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
||||
return {
|
||||
require 'custom.plugins.flash',
|
||||
require 'custom.plugins.autopairs',
|
||||
require 'custom.plugins.wilder',
|
||||
}
|
||||
|
|
19
lua/custom/plugins/lazygit.lua
Normal file
19
lua/custom/plugins/lazygit.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
'kdheepak/lazygit.nvim',
|
||||
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 = 'Open [L]azy[G]it' },
|
||||
},
|
||||
}
|
56
lua/custom/plugins/wilder.lua
Normal file
56
lua/custom/plugins/wilder.lua
Normal file
|
@ -0,0 +1,56 @@
|
|||
return {
|
||||
{
|
||||
'gelguy/wilder.nvim',
|
||||
keys = {
|
||||
':',
|
||||
'/',
|
||||
'?',
|
||||
},
|
||||
dependencies = {
|
||||
|
||||
'catppuccin/nvim',
|
||||
},
|
||||
config = function()
|
||||
local wilder = require 'wilder'
|
||||
local macchiato = require('catppuccin.palettes').get_palette 'macchiato'
|
||||
|
||||
-- Create a highlight group for the popup menu
|
||||
local text_highlight = wilder.make_hl('WilderText', { { a = 1 }, { a = 1 }, { foreground = macchiato.text } })
|
||||
local mauve_highlight = wilder.make_hl('WilderMauve', { { a = 1 }, { a = 1 }, { foreground = macchiato.mauve } })
|
||||
|
||||
-- Enable wilder when pressing :, / or ?
|
||||
wilder.setup { modes = { ':', '/', '?' } }
|
||||
|
||||
-- Enable fuzzy matching for commands and buffers
|
||||
-- wilder.set_option("pipeline", {
|
||||
-- wilder.branch(
|
||||
-- wilder.cmdline_pipeline({
|
||||
-- fuzzy = 1,
|
||||
-- }),
|
||||
-- wilder.vim_search_pipeline({
|
||||
-- fuzzy = 1,
|
||||
-- })
|
||||
-- ),
|
||||
-- })
|
||||
|
||||
wilder.set_option(
|
||||
'renderer',
|
||||
wilder.popupmenu_renderer(wilder.popupmenu_border_theme {
|
||||
highlighter = wilder.basic_highlighter(),
|
||||
highlights = {
|
||||
default = text_highlight,
|
||||
border = mauve_highlight,
|
||||
accent = mauve_highlight,
|
||||
},
|
||||
pumblend = 5,
|
||||
min_height = '25%',
|
||||
max_height = '25%',
|
||||
border = 'rounded',
|
||||
left = { ' ', wilder.popupmenu_devicons() },
|
||||
right = { ' ', wilder.popupmenu_scrollbar() },
|
||||
})
|
||||
)
|
||||
end,
|
||||
build = ':UpdateRemotePlugins',
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue