This commit is contained in:
sankalp committed 2023-12-30 21:19:06 +05:45
commit 0cbbf662e3
473 files changed
+40489

No files matched your search

@@ -0,0 +1,31 @@
return {
"Pocco81/auto-save.nvim",
event = { "InsertLeave", "TextChanged" },
opts = {
debounce_delay = 1000,
callbacks = {
before_saving = function()
-- save global autoformat status
vim.g.OLD_AUTOFORMAT = vim.g.autoformat_enabled
vim.g.autoformat_enabled = false
vim.g.OLD_AUTOFORMAT_BUFFERS = {}
-- disable all manually enabled buffers
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.b[bufnr].autoformat_enabled then
table.insert(vim.g.OLD_BUFFER_AUTOFORMATS, bufnr)
vim.b[bufnr].autoformat_enabled = false
end
end
end,
after_saving = function()
-- restore global autoformat status
vim.g.autoformat_enabled = vim.g.OLD_AUTOFORMAT
-- reenable all manually enabled buffers
for _, bufnr in ipairs(vim.g.OLD_AUTOFORMAT_BUFFERS or {}) do
vim.b[bufnr].autoformat_enabled = true
end
end,
},
},
}
@@ -0,0 +1,5 @@
return {
"max397574/better-escape.nvim",
opts = {},
event = "InsertEnter",
}
@@ -0,0 +1,17 @@
return {
"LunarVim/bigfile.nvim",
event = "LazyFile",
opts = {
filesize = 1, -- size of the file in MiB, the plugin round file sizes to the closest MiB
pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files>
features = { -- features to disable
"indent_blankline",
"illuminate",
"lsp",
"treesitter",
"syntax",
"vimopts",
"matchparen",
},
},
}
@@ -0,0 +1,27 @@
return {
"andweeb/presence.nvim",
event = "VeryLazy",
opts = {
-- General options
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
neovim_image_text = "Chad Editor", -- Text displayed when hovered over the Neovim image
main_image = "file", -- Main image display (either "neovim" or "file")
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
enable_line_number = false, -- Displays the current line number instead of the current project
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
show_time = true, -- Show the timer
-- Rich Presence text options
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
},
}
@@ -0,0 +1,11 @@
return {
"cvigilv/esqueleto.nvim",
event = "VeryLazy",
opts = {
directories = { vim.fn.stdpath("config") .. "/templates" },
patterns = {
"LICENSE",
"README",
},
},
}
@@ -0,0 +1,38 @@
return {
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
event = "VeryLazy",
keys = {
{ "<leader>uH", "<cmd>Hardtime toggle<CR>", desc = "Toggle Hardtime" },
},
opts = {
disabled_filetypes = {
"qf",
"netrw",
"NvimTree",
"lazy",
"mason",
"oil",
"neo-tree",
"symbols-outline",
"vim-be-good",
},
restriction_mode = "hint",
restricted_keys = {
["h"] = { "n", "x" },
["l"] = { "n", "x" },
["-"] = { "n", "x" },
["+"] = { "n", "x" },
["gj"] = { "n", "x" },
["gk"] = { "n", "x" },
["<C-N>"] = { "n", "x" },
["<C-P>"] = { "n", "x" },
},
disabled_keys = {
["<Up>"] = { "" },
["<Down>"] = { "" },
["<Left>"] = { "" },
["<Right>"] = { "" },
},
},
}
@@ -0,0 +1,5 @@
return {
"tris203/hawtkeys.nvim",
cmd = { "Hawtkeys", "HawtkeysDupes", "HawtkeysAll" },
opts = {},
}
@@ -0,0 +1,26 @@
return {
{
"ziontee113/icon-picker.nvim",
dependencies = {
"stevearc/dressing.nvim",
},
opts = {
disable_legacy_commands = true,
},
-- stylua: ignore
keys = {
{ "<leader>sia", "<cmd>IconPickerNormal<cr>", desc = "All" },
{ "<leader>sis", "<cmd>IconPickerNormal symbols<cr>", desc = "Symbols" },
{ "<leader>sie", "<cmd>IconPickerNormal emoji<cr>", desc = "Emoji" },
{ "<leader>sin", "<cmd>IconPickerNormal nerd_font_v3<cr>", desc = "Nerd Fonts" },
},
},
{
"folke/which-key.nvim",
opts = {
defaults = {
["<leader>si"] = { name = "icons" },
},
},
},
}
@@ -0,0 +1,15 @@
return {
"kawre/leetcode.nvim",
build = ":TSUpdate html",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim", -- required by telescope
"MunifTanjim/nui.nvim",
-- optional
"nvim-treesitter/nvim-treesitter",
"rcarriga/nvim-notify",
"nvim-tree/nvim-web-devicons",
},
opts = {},
}
@@ -0,0 +1,8 @@
return {
"shortcuts/no-neck-pain.nvim",
opts = {},
-- stylua: ignore
keys = {
{ "<leader>uN", "<cmd>NoNeckPain<cr>", desc = "No Neck Pain" },
},
}
@@ -0,0 +1,39 @@
return {
{
"epwalsh/pomo.nvim",
cmd = { "TimerStart", "TimerStop", "TimerRepeat" },
dependencies = {
"rcarriga/nvim-notify",
},
opts = {
notifiers = {
{
name = "Default",
opts = {
sticky = false,
},
},
},
},
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local function pomoTimer()
local ok, pomo = pcall(require, "pomo")
if not ok then
return ""
end
local timer = pomo.get_first_to_finish()
if timer == nil then
return ""
end
return "󰄉 " .. tostring(timer)
end
table.insert(opts.sections.lualine_x, { pomoTimer })
end,
},
}
@@ -0,0 +1,5 @@
return {
"Aasim-A/scrollEOF.nvim",
event = "CursorMoved",
opts = {},
}
@@ -0,0 +1,5 @@
return {
"NStefan002/speedtyper.nvim",
cmd = "Speedtyper",
opts = {},
}
@@ -0,0 +1,4 @@
return {
"ThePrimeagen/vim-be-good",
cmd = "VimBeGood",
}
@@ -0,0 +1,65 @@
if not vim.g.vscode then
return {}
end
vim.o.spell = false
-- Add any additional plugins in vscode, you can set vscode=true on a plugin spec.
local enabled = {
"flash.nvim",
"lazy.nvim",
"mini.ai",
"mini.comment",
"mini.pairs",
"mini.surround",
"nvim-treesitter",
"nvim-treesitter-textobjects",
"nvim-ts-context-commentstring",
"vim-repeat",
"LazyVim",
}
local Config = require("lazy.core.config")
local Plugin = require("lazy.core.plugin")
Config.options.checker.enabled = false
Config.options.change_detection.enabled = false
Config.options.defaults.cond = function(plugin)
return vim.tbl_contains(enabled, plugin.name) or plugin.vscode
end
-- Add some vscode specific keymaps
vim.api.nvim_create_autocmd("User", {
pattern = "LazyVimKeymaps",
callback = function()
-- find file
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
-- find in files
vim.keymap.set("n", "<leader>/", [[<cmd>call VSCodeNotify('workbench.action.findInFiles')<cr>]])
-- open symbol
vim.keymap.set("n", "<leader>ss", [[<cmd>call VSCodeNotify('workbench.action.gotoSymbol')<cr>]])
-- view problem
vim.keymap.set("n", "<leader>xx", [[<cmd>call VSCodeNotify('workbench.actions.view.problems')<cr>]])
-- open file explorer in left sidebar
vim.keymap.set("n", "<leader>e", [[<cmd>call VSCodeNotify('workbench.view.explorer')<cr>]])
-- Code Action
vim.keymap.set("n", "<leader>ca", [[<cmd>call VSCodeNotify('editor.action.codeAction')<cr>]])
-- Open terminal
vim.keymap.set("n", "<leader>ft", [[<cmd>call VSCodeNotify('workbench.action.terminal.focus')<cr>]])
end,
})
return {
{
"LazyVim/LazyVim",
config = function(_, opts)
opts = opts or {}
-- disable the colorscheme
opts.colorscheme = function() end
require("lazyvim").setup(opts)
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = { highlight = { enable = false } },
},
}
@@ -0,0 +1,4 @@
return {
"wakatime/vim-wakatime",
event = "VeryLazy",
}