mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 12:03:52 +00:00
clean config
This commit is contained in:
parent
1db6db7f92
commit
25aded9685
19 changed files with 468 additions and 852 deletions
|
|
@ -1,78 +1,53 @@
|
|||
return {
|
||||
-- Autopairs
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Flash.nvim for navigation
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
modes = {
|
||||
search = {
|
||||
enabled = true,
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
'folke/flash.nvim',
|
||||
opts = {
|
||||
modes = { search = { enabled = true } },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('flash').setup(opts)
|
||||
map({ 'n', 'x', 'o' }, 's', function() require('flash').jump() end)
|
||||
map({ 'n', 'x', 'o' }, 'S', function() require('flash').treesitter() end)
|
||||
map('o', 'r', function() require('flash').remote() end)
|
||||
map({ 'o', 'x' }, 'R', function() require('flash').treesitter_search() end)
|
||||
map('c', '<c-s>', function() require('flash').toggle() end)
|
||||
end,
|
||||
},
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", 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" },
|
||||
{
|
||||
'kylechui/nvim-surround',
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
|
||||
-- Surround
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Folds
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
event = "BufReadPost",
|
||||
opts = {
|
||||
provider_selector = function()
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
{
|
||||
'kevinhwang91/nvim-ufo',
|
||||
dependencies = { 'kevinhwang91/promise-async' },
|
||||
opts = {
|
||||
provider_selector = function()
|
||||
return { 'treesitter', 'indent' }
|
||||
end,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('ufo').setup(opts)
|
||||
map('n', 'zR', require('ufo').openAllFolds)
|
||||
map('n', 'zM', require('ufo').closeAllFolds)
|
||||
end,
|
||||
},
|
||||
keys = {
|
||||
{ "zR", function() require("ufo").openAllFolds() end, desc = "Open all folds" },
|
||||
{ "zM", function() require("ufo").closeAllFolds() end, desc = "Close all folds" },
|
||||
{
|
||||
'supermaven-inc/supermaven-nvim',
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = '<Tab>',
|
||||
clear_suggestion = '<C-]>',
|
||||
accept_word = '<C-j>',
|
||||
},
|
||||
ignore_filetypes = { gitcommit = true },
|
||||
color = {
|
||||
suggestion_color = vim.api.nvim_get_hl(0, { name = 'Comment' }).fg,
|
||||
cterm = 244,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Supermaven inline suggestions (accepted with Tab)
|
||||
{
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
event = "InsertEnter",
|
||||
config = function(_, opts)
|
||||
require("supermaven-nvim").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = "<Tab>",
|
||||
clear_suggestion = "<C-]>",
|
||||
accept_word = "<C-j>",
|
||||
},
|
||||
disable_keymaps = false,
|
||||
ignore_filetypes = { gitcommit = true },
|
||||
color = {
|
||||
suggestion_color = vim.api.nvim_get_hl(0, { name = "Comment" }).fg,
|
||||
cterm = 244,
|
||||
},
|
||||
log_level = "info",
|
||||
disable_inline_completion = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue