feat(nvim): add smoothscrolling to the options if nvim nightly is present

This commit is contained in:
sankalp committed 2024-03-11 07:15:59 +05:45
1 parent 880ce25631
commit d5a3c23f80
44 files changed
+243 -126

No files matched your search

-6
View File
@@ -1,6 +0,0 @@
return {
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin",
},
}
+20
View File
@@ -0,0 +1,20 @@
-- Delete this condition if you want to execute the file
if true then
return {}
end
-- Example of disabling some plugins. Add yours
local disabled = {
{
"akinsho/bufferline.nvim",
},
{
"nvim-lualine/lualine.nvim",
},
}
for i, plugin in ipairs(disabled) do
plugin.enabled = false
end
return disabled
@@ -39,6 +39,7 @@ return {
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local icon = require("lazyvim.config").icons.kinds.Codeium
local function show_codeium_status()
@@ -27,6 +27,7 @@ return {
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local function is_active()
local ok, hydra = pcall(require, "hydra.statusline")
@@ -26,6 +26,7 @@ return {
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_x, 1, require("recorder").displaySlots)
end,
@@ -17,6 +17,7 @@ return {
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_c, require("arrow.statusline").text_for_statusline_with_icons())
end,
@@ -26,7 +27,7 @@ return {
optional = true,
opts = function(_, dashboard)
-- stylua: ignore
local button = dashboard.button("m", "󱌧 " .. " Marks", function() require("arrow.ui").openMenu() end)
local button = dashboard.button("m", "󰛢 " .. " Marks", function() require("arrow.ui").openMenu() end)
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 5, button)
@@ -40,7 +41,7 @@ return {
local arrow = {
action = function() require("arrow.ui").openMenu() end,
desc = " Marks",
icon = "󱌧 ",
icon = "󰛢 ",
key = "m",
}
@@ -0,0 +1,78 @@
local keys = {}
-- stylua: ignore start
for i = 1, 9 do
table.insert(keys, { "<leader><cr>" .. i, "<cmd>Grapple select index=" .. i .. "<CR>", desc = "File " .. i })
end
table.insert(keys, { "<leader><cr>a", "<cmd>Grapple tag<CR>", desc = "Add Mark" })
table.insert(keys, { "<leader><cr><cr>", "<cmd>Grapple toggle_tags<CR>", desc = "Marks" })
table.insert(keys, { "<leader><cr>t", "<cmd>Telescope grapple tags<CR>", desc = "Marks (Telescope)" })
table.insert(keys, { "<leader><cr>C", "<cmd>Grapple reset<CR>", desc = "Clear all Marks" })
table.insert(keys, { "<leader><cr>c", "<cmd>Grapple untag<CR>", desc = "Clear current Mark" })
table.insert(keys, { "<leader><cr>s", "<cmd>Grapple toggle_scopes<CR>", desc = "Scopes" })
table.insert(keys, { "<leader><cr>S", "<cmd>Grapple toggle_loaded<CR>", desc = "Loaded Scopes" })
table.insert(keys, { "]<cr>", "<cmd>Grapple cycle forward<CR>", desc = "Next Mark" })
table.insert(keys, { "[<cr>", "<cmd>Grapple cycle backward<CR>", desc = "Prev Mark" })
table.insert(keys, { "<C-A-l>", "<cmd>Grapple cycle forward<CR>", desc = "Next Mark" })
table.insert(keys, { "<C-A-h>", "<cmd>Grapple cycle backward<CR>", desc = "Prev Mark" })
-- stylua: ignore end
return {
{
"cbochs/grapple.nvim",
dependencies = "nvim-tree/nvim-web-devicons",
cmd = { "Grapple" },
keys = keys,
config = function()
require("grapple").setup()
require("lazyvim.util").on_load("telescope.nvim", function()
require("telescope").load_extension("grapple")
end)
end,
},
{
"goolord/alpha-nvim",
optional = true,
opts = function(_, dashboard)
local button = dashboard.button("m", "󰛢 " .. " Marks", "<cmd>Grapple toggle_tags<CR>")
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 5, button)
end,
},
{
"nvimdev/dashboard-nvim",
optional = true,
opts = function(_, opts)
local grapple = {
action = "Grapple toggle_tags",
desc = " Marks",
icon = "󰛢 ",
key = "m",
}
grapple.desc = grapple.desc .. string.rep(" ", 43 - #grapple.desc)
grapple.key_format = " %s"
table.insert(opts.config.center, 5, grapple)
end,
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_c, { require("grapple").statusline, cond = require("grapple").exists })
end,
},
{
"folke/which-key.nvim",
opts = {
defaults = {
["<leader><cr>"] = { name = "󰛢 marks" },
},
},
},
}
@@ -7,14 +7,14 @@ end
table.insert(keys, { "<leader><cr>a", function() require("harpoon"):list():append() end, desc = "Add Mark" })
table.insert(keys, { "<leader><cr><cr>", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" })
table.insert(keys, { "<leader><cr>t", "<cmd>Telescope harpoon marks<CR>", desc = "Files (Telescope)" })
table.insert(keys, { "<leader><cr>c", function() require("harpoon"):list():clear() end, desc = "Clear all Files" })
table.insert(keys, { "<leader><cr>t", "<cmd>Telescope harpoon marks<CR>", desc = "Marks (Telescope)" })
table.insert(keys, { "<leader><cr>c", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" })
table.insert(keys, { "]<cr>", function() require("harpoon"):list():next() end, desc = "Next Mark File" })
table.insert(keys, { "[<cr>", function() require("harpoon"):list():prev() end, desc = "Prev Mark File" })
table.insert(keys, { "]<cr>", function() require("harpoon"):list():next() end, desc = "Next Mark" })
table.insert(keys, { "[<cr>", function() require("harpoon"):list():prev() end, desc = "Prev Mark" })
table.insert(keys, { "<C-A-l>", function() require("harpoon"):list():next() end, desc = "Next Mark File" })
table.insert(keys, { "<C-A-h>", function() require("harpoon"):list():prev() end, desc = "Prev Mark File" })
table.insert(keys, { "<C-A-l>", function() require("harpoon"):list():next() end, desc = "Next Mark" })
table.insert(keys, { "<C-A-h>", function() require("harpoon"):list():prev() end, desc = "Prev Mark" })
-- stylua: ignore end
return {
@@ -55,7 +55,8 @@ return {
"goolord/alpha-nvim",
optional = true,
opts = function(_, dashboard)
local button = dashboard.button("m", "󱌧 " .. " Marks", "<cmd>Telescope harpoon marks<CR>")
-- stylua: ignore
local button = dashboard.button("m", "󰛢 " .. " Marks", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end)
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 5, button)
@@ -66,9 +67,10 @@ return {
optional = true,
opts = function(_, opts)
local harpoon = {
action = "Telescope harpoon marks",
-- stylua: ignore
action = function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end,
desc = " Marks",
icon = "󱌧 ",
icon = "󰛢 ",
key = "m",
}
@@ -82,7 +84,7 @@ return {
"folke/which-key.nvim",
opts = {
defaults = {
["<leader><cr>"] = { name = "󱌧 marks" },
["<leader><cr>"] = { name = "󰛢 marks" },
},
},
},
@@ -1,5 +1,6 @@
return {
"akinsho/bufferline.nvim",
optional = true,
dependencies = {
"backdround/tabscope.nvim",
opts = {},
@@ -0,0 +1,25 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
config = function()
require("lazyvim.util").on_load("telescope.nvim", function()
require("telescope").setup({
extensions = {
file_browser = {
hijack_netrw = true,
},
},
})
require("telescope").load_extension("file_browser")
end)
end,
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
},
-- stylua: ignore
keys = {
{ "<leader>'", "<cmd>Telescope file_browser<cr>", desc = "Telescope File Browser (root dir)" },
{ '<leader>"', "<cmd>Telescope file_browser path=%:p:h select_buffer=true<cr>", desc = "Telescope File Browser (cwd)" },
},
}
@@ -5,7 +5,9 @@ return {
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip").filetype_extend("typescript", { "tsdoc" })
require("luasnip").filetype_extend("typescript", { "next-ts" })
require("luasnip").filetype_extend("javascript", { "jsdoc" })
require("luasnip").filetype_extend("javascript", { "next" })
require("luasnip").filetype_extend("lua", { "luadoc" })
require("luasnip").filetype_extend("python", { "pydoc" })
require("luasnip").filetype_extend("rust", { "rustdoc" })
@@ -5,7 +5,7 @@ return {
"folke/persistence.nvim",
keys = {
{
"<leader>qs",
"<leader>qS",
function()
p.save()
vim.notify("Session saved", vim.log.levels.INFO, { title = "Persistence" })
@@ -13,7 +13,6 @@ return {
desc = "Save Session",
},
-- stylua: ignore start
{ "<leader>qr", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
{ "<leader>qt",
function()
if isActive then
@@ -34,6 +34,9 @@ return {
["typescript"] = { "biome" },
["typescriptreact"] = { "biome" },
["javascriptreact"] = { "biome" },
["astro"] = { "biome" },
["svelte"] = { "biome" },
["vue"] = { "biome" },
})
opts.formatters = {
@@ -1,30 +0,0 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "cspell" })
end,
},
{
"mfussenegger/nvim-lint",
opts = function(_, opts)
opts.linters_by_ft["*"] = opts.linters_by_ft["*"] or {}
table.insert(opts.linters_by_ft["*"], "cspell")
opts.linters.cspell = {
condition = function(ctx)
if vim.fs.find({ "cspell.json" }, { path = ctx.filename, upward = true })[1] then
-- stylua: ignore
vim.keymap.set("n", "<leader>!", function() require("util.cspell").addWordToDictionary() end, { desc = "Add Word to Dictionary", silent = true })
return true
else
return false
end
end,
}
return opts
end,
},
}
@@ -1,5 +1,6 @@
return {
"nvim-neo-tree/neo-tree.nvim",
optional = true,
dependencies = {
"antosha417/nvim-lsp-file-operations",
opts = {},
@@ -0,0 +1,18 @@
return {
{
"j-hui/fidget.nvim",
event = "LspAttach",
opts = {},
},
{
"folke/noice.nvim",
optional = true,
opts = {
lsp = {
progress = {
enabled = false,
},
},
},
},
}
@@ -1,6 +1,5 @@
return {
{
"luukvbaal/statuscol.nvim",
event = { "LazyFile" },
opts = function()
+1 -2
View File
@@ -15,7 +15,6 @@ return {
{ "tpope/vim-repeat", optional = true },
{ "echasnovski/mini.files", optional = true },
{ "SmiteshP/nvim-navic", optional = true },
{ "simrat39/symbols-outline.nvim", optional = true },
-- Lang
-- Clangd
@@ -56,7 +55,7 @@ return {
-- Rust
{ "Saecki/crates.nvim", optional = true },
{ "rouge8/neotest-rust", optional = true },
{ "mrcjkb/rustaceanvim", optional = true },
-- Tailwind
{ "roobert/tailwindcss-colorizer-cmp.nvim", optional = true },