This commit is contained in:
sankalp committed 2024-03-19 17:56:56 +05:45
1 parent 34ad85a88c
commit b940be856f
19 files changed
+546 -101

No files matched your search

+11
View File
@@ -130,3 +130,14 @@ ac("BufWritePre", {
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
+9
View File
@@ -1,4 +1,5 @@
local map = vim.keymap.set
local api = vim.api
local o = vim.opt
local Util = require("lazyvim.util")
@@ -121,6 +122,12 @@ map("n", "<a-l>", "$", { desc = "Last character of Line" })
-- Copy whole text to clipboard
map("n", "<C-c>", ":%y+<CR>", { desc = "Copy whole text to clipboard", silent = true })
-- clipboard
map("v", "<leader>y", '"+y', { desc = "Yank to clipboard" })
-- Duplicate paragraph
map('n', '<Leader>p', 'yap<S-}>p', { desc = 'Duplicate Paragraph' })
-- Motion
map("c", "<C-a>", "<C-b>", { desc = "Start Of Line" })
map("i", "<C-a>", "<Home>", { desc = "Start Of Line" })
@@ -163,3 +170,5 @@ map("n", "<leader>fd", function()
vim.cmd("Dashboard")
end
end, { desc = "Dashboard" })
+17 -14
View File
@@ -2,40 +2,43 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
lazypath })
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
{
"LazyVim/LazyVim",
import = "lazyvim.plugins",
opts = { colorscheme = "catppuccin" },
},
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
{ import = "lazyvim.plugins.extras.lazyrc" },
},
defaults = {
lazy = true,
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
cache = {
enabled = true,
-- disable_events = {},
},
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"netrwPlugin",
"zipPlugin",
},
},
@@ -0,0 +1,27 @@
local header_collection = require('plugins.dashboard-theme.headers')
return {
theme = 'doom',
config = {
header = header_collection.dash,
center = {
{
icon = '',
icon_hl = 'Title',
desc = 'Find File ',
desc_hl = 'String',
key = 'f',
key_hl = 'Number',
key_format = ' %s', -- remove default surrounding `[]`
action = 'Telescope find_files'
},
{
icon = '',
desc = 'Quit',
key = 'q',
key_format = ' %s', -- remove default surrounding `[]`
action = 'qa'
},
},
footer = {} --your footer
}
}
@@ -0,0 +1,54 @@
local M = {}
M.default = {
" ",
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
" ",
}
M.dash = {
" ",
" ",
"▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄",
"█ ▄ ▄ █",
"█ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █",
"█ █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ █",
"█ ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ █",
"█ ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ █",
"█ █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄ █",
"█ ▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █ █",
"█ █▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █ █",
"█ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ █",
"█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█",
" ",
" "
}
M.neovim_mini1 = {
"",
"",
" _______ ____ ____.__ ",
" \\ \\ ____ ___\\ \\ / /|__| _____ ",
" / | \\_/ __ \\/ _ \\ Y / | |/ \\ ",
"/ | \\ ___( <_> ) / | | Y Y \\",
"\\____|__ /\\___ >____/ \\___/ |__|__|_| /",
" \\/ \\/ \\/ ",
"",
}
M.neovim_mini2 = {
" __ ",
" .-----.-----.-----.--.--|__|--------. ",
" | | -__| _ | | | | | ",
" |__|__|_____|_____|\\___/|__|__|__|__| ",
""
}
return M
@@ -0,0 +1,58 @@
local header_collection = require('plugins.dashboard-theme.headers')
local limit = 9
return {
theme = 'hyper',
change_to_vcs_root = true,
shortcut_type = 'number',
hide = {
statusline = true, -- hide statusline default is true
tabline = true, -- hide the tabline
winbar = true, -- hide winbar
},
config = {
header = header_collection.default,
week_header = {
enable = false,
},
packages = { enable = true }, -- show how many plugins neovim loaded
project = {
enable = false,
limit = 8,
icon = '',
group = '@function',
label = 'Projects',
action = 'Telescope find_files cwd='
},
mru = {
limit = limit,
icon = '',
label = 'Recent (Last ' .. tostring(limit) .. ' files)',
},
shortcut = {
{
icon = '',
desc = 'New file',
group = 'DiagnosticOk',
action = 'ene',
key = 'n'
},
{
icon = '',
desc = 'Files',
group = 'DiagnosticInfo',
action = 'Telescope find_files',
key = 'f',
},
{
icon = '',
desc = 'Words',
group = 'DiagnosticWarn',
action = 'Telescope live_grep',
key = 'g',
},
{ icon = '󰚰 ', desc = 'Lazy', group = '@property', action = 'Lazy', key = 'l' },
{ icon = '', desc = 'Quit', group = 'DiagnosticError', action = 'qa', key = 'q' },
},
},
}
@@ -0,0 +1,47 @@
local header_collection = require('plugins.dashboard-theme.headers')
return {
theme = 'hyper',
change_to_vcs_root = true,
shortcut_type = 'number',
hide = {
statusline = true, -- hide statusline default is true
tabline = true, -- hide the tabline
winbar = true, -- hide winbar
},
config = {
header = header_collection.default,
week_header = {
enable = false,
},
packages = { enable = true }, -- show how many plugins neovim loaded
project = { enable = false },
mru = { },
shortcut = {
{
icon = '',
desc = 'New file',
group = 'DiagnosticOk',
action = 'ene',
key = 'e'
},
{
icon = '',
desc = 'Files',
group = 'DiagnosticInfo',
action = 'Telescope find_files',
key = 'f',
},
{
icon = '',
desc = 'Words',
group = 'DiagnosticWarn',
action = 'Telescope live_grep',
key = 'g',
},
{ icon = '󰚰 ', desc = 'Update', group = '@property', action = 'Lazy update', key = 'u' },
{ icon = '', desc = 'Quit', group = 'DiagnosticError', action = 'qa', key = 'q' },
},
},
}
@@ -0,0 +1,31 @@
local header_collection = require('plugins.dashboard-theme.headers')
return {
theme = 'doom',
config = {
header = header_collection.dash,
center = {
{
icon = '',
icon_hl = 'Title',
desc = 'New file',
desc_hl = 'String',
action = 'ene',
},
{
icon = '',
icon_hl = 'Title',
desc = 'Find files',
desc_hl = 'String',
action = 'Telescope find_files',
},
{
icon = '',
icon_hl = 'Title',
desc = 'Quit',
desc_hl = 'String',
action = 'qa',
},
},
footer = { "🎉 No Code, No Bug 🎉", ""} --your footer
}
}
@@ -6,7 +6,7 @@ for i = 1, 9 do
end
table.insert(keys, { "<leader>ma", function() require("harpoon"):list():append() end, desc = "Add Mark" })
table.insert(keys, { "<leader>m<cr>", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" })
table.insert(keys, { "<leader>mm", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" })
table.insert(keys, { "<leader>mt", "<cmd>Telescope harpoon marks<CR>", desc = "Marks (Telescope)" })
table.insert(keys, { "<leader>mc", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" })
@@ -51,6 +51,17 @@ return {
end)
end,
},
{
"nvim-lualine/lualine.nvim",
dependencies = {
"abeldekat/harpoonline",
opts = { formatter = "short", icon = "󰛢" },
},
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_c, require("harpoonline").format)
end,
},
{
"goolord/alpha-nvim",
optional = true,
@@ -1,49 +0,0 @@
return {
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.lang.ansible" },
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "ansible-language-server" })
end,
},
{
"neovim/nvim-lspconfig",
init = function()
vim.filetype.add({
pattern = {
[".*/playbooks/.*%.yaml"] = "yaml.ansible",
[".*/playbooks/.*%.yml"] = "yaml.ansible",
[".*/roles/.*/tasks/.*%.yaml"] = "yaml.ansible",
[".*/roles/.*/tasks/.*%.yml"] = "yaml.ansible",
[".*/roles/.*/handlers/.*%.yaml"] = "yaml.ansible",
[".*/roles/.*/handlers/.*%.yml"] = "yaml.ansible",
},
})
end,
},
{
"mfussenegger/nvim-lint",
opts = {
linters_by_ft = {
ansible = { "ansible-lint" },
},
},
},
{
"mfussenegger/nvim-ansible",
ft = "yaml.ansible",
-- stylua: ignore
keys = {
{ "<leader>tp", function() require("ansible").run() end, desc = "Run Ansible Playbooks" },
},
},
{
"luckasRanarison/nvim-devdocs",
optional = true,
ensure_installed = {
"ansible",
},
},
}
@@ -1,19 +1,14 @@
return {
"nvimdev/dashboard-nvim",
opts = function(_, opts)
vim.api.nvim_create_autocmd("TabNewEntered", { command = "Dashboard" })
local logo = [[
███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗
████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║
██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║
██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║
██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║
╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
opts.config.header = vim.split(logo, "\n")
return opts
end,
'nvimdev/dashboard-nvim',
dependencies = {
'kyazdani42/nvim-web-devicons'
},
enabled = true,
config = function()
-- local theme = require('plugins.dashboard-theme.landing')
-- local theme = require('plugins.dashboard-theme.minimal')
-- local theme = require('plugins.dashboard-theme.doom')
local theme = require('plugins.dashboard-theme.hyper')
require('dashboard').setup (theme)
end,
}