mirror of
https://github.com/tanishq-dubey/.dotfiles.git
synced 2024-12-29 12:17:21 -05:00
Add all dotfiles
This commit is contained in:
commit
3506c21b8d
21
git/.gitconfig
Normal file
21
git/.gitconfig
Normal file
@ -0,0 +1,21 @@
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[user]
|
||||
signingkey = 0D0F75C0132BFC41
|
||||
name = Tanishq Dubey
|
||||
email = tdubey@clearstreet.io
|
||||
[core]
|
||||
editor = nvim
|
||||
[init]
|
||||
defaultBranch = develop
|
||||
[color]
|
||||
ui = auto
|
||||
[push]
|
||||
default = upstream
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[credential]
|
||||
helper = store
|
20
nvim/.config/nvim/init.lua
Normal file
20
nvim/.config/nvim/init.lua
Normal file
@ -0,0 +1,20 @@
|
||||
require 'dubey.options'
|
||||
require 'dubey.keymap'
|
||||
require 'dubey.theme'
|
||||
require 'dubey.plugins'
|
||||
require 'dubey.plugins.whichkey'
|
||||
require 'dubey.plugins.autopairs'
|
||||
require 'dubey.plugins.term'
|
||||
require 'dubey.plugins.notify'
|
||||
require 'dubey.plugins.bufferline'
|
||||
require 'dubey.plugins.nvimtree'
|
||||
require 'dubey.plugins.lualine'
|
||||
require 'dubey.plugins.complet'
|
||||
require 'dubey.plugins.treesitter'
|
||||
require 'dubey.plugins.lsp'
|
||||
require 'dubey.plugins.telescope'
|
||||
require 'dubey.plugins.folds'
|
||||
require 'dubey.plugins.indent'
|
||||
require 'dubey.plugins.scrollbar'
|
||||
require 'dubey.plugins.session'
|
||||
require 'dubey.plugins.session'
|
27
nvim/.config/nvim/lua/dubey/keymap.lua
Normal file
27
nvim/.config/nvim/lua/dubey/keymap.lua
Normal file
@ -0,0 +1,27 @@
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.g.maplocalleader = ","
|
||||
vim.g.mapleader = ","
|
||||
|
||||
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
|
||||
vim.g.mapleader = ','
|
||||
vim.g.maplocalleader = ','
|
||||
|
||||
-- Escape in terminal Mode
|
||||
keymap('t', '<M-Esc>', '<C-\\><C-n>', {noremap = true})
|
||||
|
||||
-- Vim Tmux Keymaps
|
||||
keymap('n', '<C-h>', ':TmuxNavigateLeft<CR>', { noremap = true, silent = true })
|
||||
keymap('n', '<C-j>', ':TmuxNavigateDown<CR>', { noremap = true, silent = true })
|
||||
keymap('n', '<C-l>', ':TmuxNavigateRight<CR>', { noremap = true, silent = true })
|
||||
keymap('n', '<C-k>', ':TmuxNavigateUp<CR>', { noremap = true, silent = true })
|
||||
|
||||
keymap('n', '<Leader>vp', ':VimuxPromptCommand<CR>', {})
|
||||
keymap('n', '<Leader>vl', ':VimuxRunLastCommand<CR>', {})
|
||||
|
||||
-- LSP Keymaps
|
||||
keymap('n', 'gd', ':lua vim.lsp.buf.definition()<CR>', { noremap = true, silent = true })
|
||||
keymap('n', 'gr', ':lua vim.lsp.buf.references()<CR>', { noremap = true, silent = true })
|
||||
keymap('n', 'gi', ':lua vim.lsp.buf.implementation()<CR>', { noremap = true, silent = true })
|
||||
keymap('n', 'gD', ':lua vim.lsp.buf.declaration()<CR>', { noremap = true, silent = true })
|
35
nvim/.config/nvim/lua/dubey/options.lua
Normal file
35
nvim/.config/nvim/lua/dubey/options.lua
Normal file
@ -0,0 +1,35 @@
|
||||
local options = {
|
||||
mouse = "a", -- use the mouse
|
||||
tabstop = 2, -- tabs are two spaces
|
||||
wrap = false, -- don't wrap lines
|
||||
cmdheight = 2, -- make bottom command size bigger
|
||||
number = true, -- show numbers on the side
|
||||
hlsearch = true, -- highlight search results
|
||||
shiftwidth = 2, -- Nubmer of spaces to use for each step of (auto)indent
|
||||
undofile = true, -- create and use a undo file
|
||||
numberwidth = 4, -- how wide the number column is
|
||||
swapfile = false, -- I don't like swap files
|
||||
timeoutlen = 100, -- reduce waiting time
|
||||
expandtab = true, -- tabs are spaces
|
||||
smartcase = true, -- case insensitive unless there are caps characters
|
||||
updatetime = 300, -- millis idle before vim saves state
|
||||
ignorecase = true, -- case insensitive search
|
||||
splitbelow = true, -- create splits below current window
|
||||
splitright = true, -- create splits on right side of current window
|
||||
sidescrolloff = 8, -- The minimal number of screen columns to keep to the left and to the right of the cursor
|
||||
cursorline = true, -- show a line at the cursor position (highlight the line)
|
||||
signcolumn = "yes", -- show a column next to numbers for signs (such as git)
|
||||
smartindent = true, -- uhhhh...smartly try to indent text?
|
||||
writebackup = true, -- Make a backup before overwriting a file
|
||||
termguicolors = true, -- really pretty colors
|
||||
foldmethod = "syntax", -- use syntax to fold code
|
||||
fileencoding = "utf-8", -- the best encoding
|
||||
relativenumber = false, -- who even uses relative numbers
|
||||
clipboard = "unnamedplus", -- copy into register and system clipboard
|
||||
completeopt = { "menuone", "noselect" }, -- how to show completion options
|
||||
background = "dark", -- light backgrounds for light themes
|
||||
}
|
||||
|
||||
for k, v in pairs(options) do
|
||||
vim.opt[k] = v
|
||||
end
|
31
nvim/.config/nvim/lua/dubey/plugins/autopairs.lua
Normal file
31
nvim/.config/nvim/lua/dubey/plugins/autopairs.lua
Normal file
@ -0,0 +1,31 @@
|
||||
local present, npairs = pcall(require, "nvim-autopairs")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
npairs.setup({
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = { "string", "source" },
|
||||
javascript = { "string", "template_string" },
|
||||
},
|
||||
disable_filetype = { "TelescopePrompt" },
|
||||
fast_wrap = {
|
||||
map = "<M-e>",
|
||||
chars = { "{", "[", "(", '"', "'", "<" },
|
||||
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,%>] ]], "%s+", ""),
|
||||
offset = 0,
|
||||
end_key = "$",
|
||||
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||
check_comma = true,
|
||||
highlight = "PmenuSel",
|
||||
highlight_grey = "LineNr",
|
||||
},
|
||||
})
|
||||
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp_present, cmp = pcall(require, "cmp")
|
||||
if not cmp_present then
|
||||
return
|
||||
end
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
90
nvim/.config/nvim/lua/dubey/plugins/bufferline.lua
Normal file
90
nvim/.config/nvim/lua/dubey/plugins/bufferline.lua
Normal file
@ -0,0 +1,90 @@
|
||||
local present, bufferline = pcall(require, "bufferline")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
local _, theme = pcall(require, "afreidz.theme.colors")
|
||||
local colors = theme
|
||||
local highlights = {
|
||||
indicator_selected = {
|
||||
guifg = colors.sky,
|
||||
guibg = colors.black2,
|
||||
},
|
||||
fill = {
|
||||
guifg = colors.black4,
|
||||
guibg = colors.black3,
|
||||
},
|
||||
background = {
|
||||
guifg = colors.gray0,
|
||||
guibg = colors.black3,
|
||||
},
|
||||
buffer_selected = {
|
||||
guifg = colors.white,
|
||||
guibg = colors.black2,
|
||||
gui = "italic",
|
||||
},
|
||||
buffer_visible = {
|
||||
guifg = colors.gray0,
|
||||
guibg = colors.black2,
|
||||
},
|
||||
close_button = {
|
||||
guifg = colors.black4,
|
||||
guibg = colors.black3,
|
||||
},
|
||||
close_button_visible = {
|
||||
guifg = colors.black4,
|
||||
guibg = colors.black2,
|
||||
},
|
||||
close_button_selected = {
|
||||
guifg = colors.gray0,
|
||||
guibg = colors.black2,
|
||||
},
|
||||
separator = {
|
||||
guifg = colors.black3,
|
||||
guibg = colors.black3,
|
||||
},
|
||||
separator_visible = {
|
||||
guifg = colors.black3,
|
||||
guibg = colors.black3,
|
||||
},
|
||||
separator_selected = {
|
||||
guifg = colors.black3,
|
||||
guibg = colors.black3,
|
||||
},
|
||||
}
|
||||
|
||||
local setup = {
|
||||
highlights = highlights,
|
||||
options = {
|
||||
tab_size = 21,
|
||||
numbers = "none",
|
||||
diagnostics = true,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
return "("..count..")"
|
||||
end,
|
||||
modified_icon = "●",
|
||||
indicator_icon = "▎",
|
||||
max_name_length = 30,
|
||||
max_prefix_length = 30,
|
||||
close_icon = '',
|
||||
buffer_close_icon = '',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
show_close_icon = false,
|
||||
show_buffer_icons = true,
|
||||
separator_style = "slant",
|
||||
middle_mouse_command = nil,
|
||||
show_tab_indicators = true,
|
||||
persist_buffer_sort = true,
|
||||
enforce_regular_tabs = true,
|
||||
close_command = "bdelete! %d",
|
||||
always_show_bufferline = true,
|
||||
show_buffer_close_icons = true,
|
||||
left_mouse_command = "buffer %d",
|
||||
right_mouse_command = "bdelete! %d",
|
||||
diagnostics_update_in_insert = false,
|
||||
offsets = { { filetype = "NvimTree", text = " ", padding = 1, text_align = "left" } },
|
||||
},
|
||||
}
|
||||
|
||||
bufferline.setup(setup)
|
108
nvim/.config/nvim/lua/dubey/plugins/complet.lua
Normal file
108
nvim/.config/nvim/lua/dubey/plugins/complet.lua
Normal file
@ -0,0 +1,108 @@
|
||||
local present, cmp = pcall(require, "cmp")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
local check_backspace = function()
|
||||
local col = vim.fn.col(".") - 1
|
||||
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
|
||||
end
|
||||
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "m",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
local snp_present, luasnip = pcall(require, "luasnip")
|
||||
if not snp_present then
|
||||
return
|
||||
end
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif check_backspace() then
|
||||
fallback()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
window = {
|
||||
documentation = {
|
||||
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
|
||||
},
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = false,
|
||||
native_menu = false,
|
||||
},
|
||||
})
|
24
nvim/.config/nvim/lua/dubey/plugins/folds.lua
Normal file
24
nvim/.config/nvim/lua/dubey/plugins/folds.lua
Normal file
@ -0,0 +1,24 @@
|
||||
local _fold, fold = pcall(require, "pretty-fold")
|
||||
if not _fold then
|
||||
return
|
||||
end
|
||||
|
||||
local preview = require("pretty-fold.preview")
|
||||
|
||||
fold.setup({
|
||||
keep_indentation = false,
|
||||
fill_char = "━",
|
||||
sections = {
|
||||
left = {
|
||||
"━ ",
|
||||
function()
|
||||
return string.rep("*", vim.v.foldlevel)
|
||||
end,
|
||||
" ━┫",
|
||||
"content",
|
||||
"┣",
|
||||
},
|
||||
right = { "┫ ", "number_of_folded_lines", " ┣━━" },
|
||||
},
|
||||
})
|
||||
|
11
nvim/.config/nvim/lua/dubey/plugins/indent.lua
Normal file
11
nvim/.config/nvim/lua/dubey/plugins/indent.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local _indent, indent = pcall(require, "indent_blankline")
|
||||
if not _indent then
|
||||
return
|
||||
end
|
||||
|
||||
indent.setup({
|
||||
char = " ",
|
||||
context_char = "│",
|
||||
show_current_context = true,
|
||||
buftype_exclude = { "terminal" },
|
||||
})
|
133
nvim/.config/nvim/lua/dubey/plugins/init.lua
Normal file
133
nvim/.config/nvim/lua/dubey/plugins/init.lua
Normal file
@ -0,0 +1,133 @@
|
||||
local fn = vim.fn
|
||||
|
||||
local dir = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(dir)) > 0 then
|
||||
bootstrap = fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--depth",
|
||||
"1",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
dir,
|
||||
})
|
||||
print("Installing packer close and reopen Neovim...")
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
end
|
||||
|
||||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]])
|
||||
|
||||
local present, packer = pcall(require, "packer")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "rounded" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
return packer.startup(function(use)
|
||||
use("nvim-lua/plenary.nvim")
|
||||
|
||||
use("folke/which-key.nvim") -- Useful popup dialog when doing things
|
||||
use("lambdalisue/suda.vim") -- Repoen files as sudo why not
|
||||
use("rcarriga/nvim-notify") -- Send notifications like a regular program
|
||||
use("windwp/nvim-autopairs") -- Good pairs for brackets and stuff
|
||||
|
||||
use("wbthomason/packer.nvim") -- Packer can manage itself
|
||||
|
||||
use{"akinsho/toggleterm.nvim", branch = 'main'} -- Terminal within vim
|
||||
use("lukas-reineke/indent-blankline.nvim") -- Show lines on indents for aligning
|
||||
|
||||
use{"akinsho/bufferline.nvim", branch = 'main'} -- Snazzy buffer line (aka the tab bar at the top)
|
||||
use("kyazdani42/nvim-tree.lua") -- Tree explorer
|
||||
use("nvim-lualine/lualine.nvim") -- Status line (bottom bar)
|
||||
use("kyazdani42/nvim-web-devicons") -- Better icons for status line, tab bar, and tree explorer
|
||||
|
||||
use("hrsh7th/nvim-cmp") -- Completion engine
|
||||
use("hrsh7th/cmp-buffer") -- Current buffers as a completion source
|
||||
use("hrsh7th/cmp-path") -- Machine paths as a completion source
|
||||
use("hrsh7th/cmp-cmdline") -- Vim command mode completions
|
||||
use("hrsh7th/cmp-nvim-lsp") -- The big daddy, use the LSP
|
||||
|
||||
use("L3MON4D3/LuaSnip") -- Snippet engine for completion
|
||||
use("rafamadriz/friendly-snippets") -- Lots of useful snippets
|
||||
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter", -- The best syntax highlighting and context plugin
|
||||
run = ":TSUpdate",
|
||||
})
|
||||
|
||||
use("onsails/lspkind-nvim") -- Pretty pictures when doing completions
|
||||
|
||||
use("neovim/nvim-lspconfig") -- THE configurations for LSPs
|
||||
-- note: https://github.com/neovim/nvim-lspconfig#quickstart
|
||||
-- servers here: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
|
||||
use("williamboman/nvim-lsp-installer") -- Installs LSP servers for us
|
||||
|
||||
use("jose-elias-alvarez/null-ls.nvim") -- Neovim as a LSP (I don't really know what this does, but lots of people have it)
|
||||
use("ray-x/lsp_signature.nvim") -- Signature hints as you type
|
||||
use("kosayoda/nvim-lightbulb") -- VSCode like lightbulb
|
||||
use("stevearc/aerial.nvim") -- Code structure window
|
||||
|
||||
use("nvim-telescope/telescope.nvim") -- Find files fast
|
||||
use("nvim-telescope/telescope-ui-select.nvim") -- Make the telescope ui Better
|
||||
use("nvim-telescope/telescope-media-files.nvim") -- Preview media (like images) in telescope
|
||||
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) -- Use builtin fzf to make searching even better
|
||||
use({ "AckslD/nvim-neoclip.lua", requires = { "nvim-telescope/telescope.nvim" } }) -- Search the clipboard
|
||||
|
||||
use("airblade/vim-gitgutter") -- Git symbols in the side
|
||||
|
||||
use({
|
||||
"numToStr/Comment.nvim", -- Better commenting
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
"folke/zen-mode.nvim", -- Zen mode (hide everything)
|
||||
config = function()
|
||||
require("zen-mode").setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"folke/twilight.nvim", -- dim parts of code that are out of focus
|
||||
config = function()
|
||||
require("twilight").setup({})
|
||||
end,
|
||||
})
|
||||
|
||||
use("anuvyklack/pretty-fold.nvim") -- Nicer folds
|
||||
use("goolord/alpha-nvim") -- Cool start page
|
||||
use({
|
||||
"Shatur/neovim-session-manager", -- Save a session for later
|
||||
requires = { "nvim-telescope/telescope.nvim" },
|
||||
})
|
||||
|
||||
use("petertriho/nvim-scrollbar") -- Put a scrollbar on the side
|
||||
|
||||
use({
|
||||
"catppuccin/nvim", -- The theme I like
|
||||
as = "catppuccin"
|
||||
})
|
||||
|
||||
use("christoomey/vim-tmux-navigator") -- Use TMUX and Vim as one
|
||||
use("preservim/vimux") -- Send commands from vim to TMUX
|
||||
use("lifepillar/vim-gruvbox8") -- Another theme I like
|
||||
|
||||
use("github/copilot.vim") -- Something that will obslete my job one day
|
||||
|
||||
if bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
110
nvim/.config/nvim/lua/dubey/plugins/lsp.lua
Normal file
110
nvim/.config/nvim/lua/dubey/plugins/lsp.lua
Normal file
@ -0,0 +1,110 @@
|
||||
local _kind, kind = pcall(require, "lspkind")
|
||||
if _kind then
|
||||
kind.init()
|
||||
end
|
||||
|
||||
local _lsp, lspconfig = pcall(require, "lspconfig")
|
||||
if not _lsp then
|
||||
return
|
||||
end
|
||||
|
||||
local _null, null_ls = pcall(require, "null-ls")
|
||||
if not _null then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- Auto-installed LSPs here
|
||||
local _lspinstaller, lspinstaller = pcall(require, "nvim-lsp-installer")
|
||||
if not _lspinstaller then
|
||||
return
|
||||
end
|
||||
|
||||
lspinstaller.on_server_ready(function(server)
|
||||
local opts = {}
|
||||
server:setup(opts)
|
||||
end)
|
||||
|
||||
|
||||
-- Individual LSP Configs here
|
||||
--
|
||||
-- End Individual LSP configs
|
||||
|
||||
|
||||
local _aerial, aerial = pcall(require, "aerial")
|
||||
local _bulb, bulb = pcall(require, "nvim-lightbulb")
|
||||
vim.cmd [[autocmd CursorHold,CursorHoldI * lua require('nvim-lightbulb').update_lightbulb()]]
|
||||
|
||||
if _aerial then
|
||||
aerial.setup({
|
||||
min_width = 30,
|
||||
show_guides = true,
|
||||
default_direction = "right",
|
||||
open_automatic = true,
|
||||
close_behavior = 'global',
|
||||
placement_editor_edge = true,
|
||||
backends = { "lsp", "treesitter" },
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
local config = {
|
||||
virtual_text = true,
|
||||
signs = {
|
||||
active = signs,
|
||||
},
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
focusable = false,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
vim.diagnostic.config(config)
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
augroup lsp_document_highlight
|
||||
autocmd! * <buffer>
|
||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||
augroup END
|
||||
]],
|
||||
false
|
||||
)
|
||||
vim.cmd([[
|
||||
autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, { focus = false, scope = "cursor", header = "Diagnostics:" })
|
||||
]])
|
||||
end
|
||||
|
||||
if _bulb then
|
||||
vim.cmd([[ autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb() ]])
|
||||
end
|
||||
|
||||
if _aerial then
|
||||
aerial.on_attach(client, bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
null_ls.setup({
|
||||
on_attach = on_attach,
|
||||
})
|
71
nvim/.config/nvim/lua/dubey/plugins/lualine.lua
Normal file
71
nvim/.config/nvim/lua/dubey/plugins/lualine.lua
Normal file
@ -0,0 +1,71 @@
|
||||
local present, lualine = pcall(require, "lualine")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
local mode = {
|
||||
"mode",
|
||||
fmt = function(str)
|
||||
if str == "NORMAL" then
|
||||
return " normal"
|
||||
end
|
||||
if str == "INSERT" then
|
||||
return " insert"
|
||||
end
|
||||
if str == "COMMAND" then
|
||||
return " command"
|
||||
end
|
||||
if str == "VISUAL" then
|
||||
return "濾 visual"
|
||||
end
|
||||
if str == "REPLACE" then
|
||||
return " replace"
|
||||
end
|
||||
return str
|
||||
end,
|
||||
}
|
||||
|
||||
local location = {
|
||||
"location",
|
||||
padding = 0,
|
||||
}
|
||||
|
||||
local filename = {
|
||||
"filename",
|
||||
path = 1,
|
||||
file_status = false,
|
||||
}
|
||||
|
||||
local branch = {
|
||||
"branch",
|
||||
padding = 0,
|
||||
}
|
||||
|
||||
|
||||
lualine.setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline" },
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = { location },
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = { branch },
|
||||
lualine_z = { filename },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = { branch },
|
||||
lualine_z = { filename },
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
12
nvim/.config/nvim/lua/dubey/plugins/notify.lua
Normal file
12
nvim/.config/nvim/lua/dubey/plugins/notify.lua
Normal file
@ -0,0 +1,12 @@
|
||||
local present, notify = pcall(require, "notify")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
notify.setup({
|
||||
minimum_width = 40,
|
||||
stages = "fade_in_slide_out",
|
||||
background_colour = "NormalFloat",
|
||||
})
|
||||
|
||||
vim.notify = notify
|
106
nvim/.config/nvim/lua/dubey/plugins/nvimtree.lua
Normal file
106
nvim/.config/nvim/lua/dubey/plugins/nvimtree.lua
Normal file
@ -0,0 +1,106 @@
|
||||
local icons = {
|
||||
git = {
|
||||
staged = "✓",
|
||||
renamed = "➜",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
unstaged = "",
|
||||
unmerged = "",
|
||||
untracked = "★",
|
||||
},
|
||||
folder = {
|
||||
open = "",
|
||||
empty = "",
|
||||
default = "",
|
||||
symlink = "",
|
||||
empty_open = "",
|
||||
symlink_open = "",
|
||||
},
|
||||
}
|
||||
|
||||
local g = vim.g
|
||||
|
||||
local present, tree = pcall(require, "nvim-tree")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
local cb = require("nvim-tree.config").nvim_tree_callback
|
||||
local mappings = {
|
||||
{ key = "q", cb = cb("close") },
|
||||
{ key = "d", cb = cb("remove") },
|
||||
{ key = "R", cb = cb("rename") },
|
||||
{ key = "c", cb = cb("create") },
|
||||
{ key = "r", cb = cb("refresh") },
|
||||
{ key = ".", cb = cb("dir_up") },
|
||||
{ key = "y", cb = cb("copy_path") },
|
||||
{ key = "yn", cb = cb("copy_name") },
|
||||
{ key = "<bs>", cb = cb("close_node") },
|
||||
{ key = "h", cb = cb("toggle_ignored") },
|
||||
{ key = "h", cb = cb("toggle_dotfiles") },
|
||||
{ key = { "<RightMouse>" }, cb = cb("cd") },
|
||||
{ key = "yy", cb = cb("copy_absolute_path") },
|
||||
{ key = { "<cr>", "<2-LeftMouse>" }, cb = cb("edit") },
|
||||
}
|
||||
|
||||
tree.setup({
|
||||
hijack_directories = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
renderer = {
|
||||
highlight_opened_files = "all",
|
||||
indent_markers = {
|
||||
enable = true
|
||||
},
|
||||
icons = {
|
||||
show = {
|
||||
folder_arrow = true,
|
||||
folder = true,
|
||||
file = true,
|
||||
git = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
resize_window = true,
|
||||
window_picker = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
open_on_setup = true,
|
||||
update_cwd = true,
|
||||
auto_reload_on_write = true,
|
||||
disable_netrw = true,
|
||||
hijack_cursor = true,
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
update_cwd = false,
|
||||
},
|
||||
view = {
|
||||
hide_root_folder = false,
|
||||
mappings = {
|
||||
custom_only = true,
|
||||
list = mappings,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
nested = true,
|
||||
callback = function()
|
||||
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
|
||||
vim.cmd "quit"
|
||||
end
|
||||
end
|
||||
})
|
20
nvim/.config/nvim/lua/dubey/plugins/scrollbar.lua
Normal file
20
nvim/.config/nvim/lua/dubey/plugins/scrollbar.lua
Normal file
@ -0,0 +1,20 @@
|
||||
local _scrollbar, scrollbar = pcall(require, "scrollbar")
|
||||
if not _scrollbar then
|
||||
return
|
||||
end
|
||||
|
||||
local handle = { text = " ", color = "white" }
|
||||
local marks = {
|
||||
Error = { color = "red" },
|
||||
Info = { color = "blue" },
|
||||
Hint = { color = "green" },
|
||||
Warn = { color = "yellow" },
|
||||
Misc = { color = "purple" },
|
||||
Search = { color = "orange" },
|
||||
}
|
||||
|
||||
scrollbar.setup({
|
||||
marks = marks,
|
||||
handle = handle,
|
||||
excluded_filetypes = { "nvimtree", "NvimTree" },
|
||||
})
|
11
nvim/.config/nvim/lua/dubey/plugins/session.lua
Normal file
11
nvim/.config/nvim/lua/dubey/plugins/session.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local _ssm, ssm = pcall(require, "session_manager")
|
||||
if not _ssm then
|
||||
return
|
||||
end
|
||||
|
||||
ssm.setup({
|
||||
autoload_mode = "Disabled",
|
||||
autosave_last_session = true,
|
||||
autosave_ignore_not_normal = true,
|
||||
autosave_only_in_session = false,
|
||||
})
|
80
nvim/.config/nvim/lua/dubey/plugins/startup.lua
Normal file
80
nvim/.config/nvim/lua/dubey/plugins/startup.lua
Normal file
@ -0,0 +1,80 @@
|
||||
local _alpha, alpha = pcall(require, "alpha")
|
||||
if not _alpha then
|
||||
return
|
||||
end
|
||||
|
||||
local header = {
|
||||
type = "text",
|
||||
val = {
|
||||
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⡀⡢⢂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢄⢮⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠀⡠⡂⣊⠢⡑⡐⠄⠀⠀⠀⠀⠀⠀⢀⢔⡕⣕⢗⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠢⠨⢢⠢⡃⡪⡐⡑⢄⠀⠀⠀⠀⢰⢱⡣⣫⢪⢮⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⡑⠅⢅⠣⡊⡢⡊⢌⠢⡂⡀⠀⠀⢐⢧⢳⢕⢧⢳⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠪⡨⠢⠡⡑⠰⡘⡌⡪⡂⡆⠄⠀⢐⡕⣗⢕⡗⡵⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠕⢌⠪⡨⢌⠀⠘⡰⡑⡌⡪⡊⣂⠀⡯⣪⡳⣹⡪⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠕⡅⠕⢌⠢⠀⠀⠀⢕⢅⢇⢕⢒⢬⢺⢕⢽⢜⢮⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⢕⢘⠜⢌⠪⠀⠀⠀⠀⠪⡢⡣⡣⡣⡳⣹⢕⢯⡳⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⢕⢅⢣⢑⠕⠀⠀⠀⠀⠀⠘⢜⢌⢎⢞⢎⢯⡳⡝⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⢕⢌⠆⠁⠀⠀⠀⠀⠀⠀⠀⠈⢎⢎⣗⢽⠑⠉⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠕⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠣⠓⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀neovim⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
|
||||
},
|
||||
opts = { position = "center", hl = "String" },
|
||||
}
|
||||
|
||||
local function button(sc, txt, keybind, keybind_opts)
|
||||
local sc_ = sc:gsub("%s", ""):gsub("SPC", "<leader>")
|
||||
local opts = {
|
||||
cursor = 5,
|
||||
width = 50,
|
||||
shortcut = sc,
|
||||
position = "center",
|
||||
hl_shortcut = "Keyword",
|
||||
align_shortcut = "right",
|
||||
}
|
||||
if keybind then
|
||||
keybind_opts = vim.F.if_nil(keybind_opts, { noremap = true, silent = true, nowait = true })
|
||||
opts.keymap = { "n", sc_, keybind, keybind_opts }
|
||||
end
|
||||
|
||||
local function on_press()
|
||||
local key = vim.api.nvim_replace_termcodes(sc_ .. "<Ignore>", true, false, true)
|
||||
vim.api.nvim_feedkeys(key, "normal", false)
|
||||
end
|
||||
|
||||
return {
|
||||
val = txt,
|
||||
opts = opts,
|
||||
type = "button",
|
||||
on_press = on_press,
|
||||
}
|
||||
end
|
||||
|
||||
local buttons = {
|
||||
type = "group",
|
||||
val = {
|
||||
button("s", " search sessions", "<cmd>SessionManager load_session<cr>"),
|
||||
button("f", " search files", "<cmd>Telescope find_files<cr>"),
|
||||
button("n", " new file", "<cmd>ene <cr>"),
|
||||
},
|
||||
opts = { spacing = 0 },
|
||||
}
|
||||
|
||||
local section = {
|
||||
header = header,
|
||||
buttons = buttons,
|
||||
}
|
||||
|
||||
local opts = {
|
||||
layout = {
|
||||
{ type = "padding", val = 2 },
|
||||
section.header,
|
||||
{ type = "padding", val = 2 },
|
||||
section.buttons,
|
||||
},
|
||||
opts = { margin = 5 },
|
||||
}
|
||||
|
||||
alpha.setup(opts)
|
98
nvim/.config/nvim/lua/dubey/plugins/telescope.lua
Normal file
98
nvim/.config/nvim/lua/dubey/plugins/telescope.lua
Normal file
@ -0,0 +1,98 @@
|
||||
local _telescope, telescope = pcall(require, "telescope")
|
||||
local _clip, clip = pcall(require, "neoclip")
|
||||
if not _telescope then
|
||||
return
|
||||
end
|
||||
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
entry_prefix = " ",
|
||||
selection_strategy = "reset",
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top",
|
||||
preview_width = 0.55,
|
||||
results_width = 0.8,
|
||||
},
|
||||
vertical = {
|
||||
mirror = false,
|
||||
},
|
||||
width = 0.87,
|
||||
height = 0.80,
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
file_ignore_patterns = { "node_modules" },
|
||||
path_display = { "smart" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-n>"] = actions.cycle_history_next,
|
||||
["<C-p>"] = actions.cycle_history_prev,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-c>"] = actions.close,
|
||||
["<Down>"] = actions.move_selection_next,
|
||||
["<Up>"] = actions.move_selection_previous,
|
||||
["<CR>"] = actions.select_default,
|
||||
["<C-x>"] = actions.select_horizontal,
|
||||
["<C-v>"] = actions.select_vertical,
|
||||
["<C-t>"] = actions.select_tab,
|
||||
["<C-u>"] = actions.preview_scrolling_up,
|
||||
["<C-d>"] = actions.preview_scrolling_down,
|
||||
["<PageUp>"] = actions.results_scrolling_up,
|
||||
["<PageDown>"] = actions.results_scrolling_down,
|
||||
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
|
||||
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
|
||||
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
||||
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||
["<C-l>"] = actions.complete_tag,
|
||||
["<C-_>"] = actions.which_key,
|
||||
},
|
||||
n = {
|
||||
["<esc>"] = actions.close,
|
||||
["<CR>"] = actions.select_default,
|
||||
["<C-x>"] = actions.select_horizontal,
|
||||
["<C-v>"] = actions.select_vertical,
|
||||
["<C-t>"] = actions.select_tab,
|
||||
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
|
||||
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
|
||||
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
||||
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||
["j"] = actions.move_selection_next,
|
||||
["k"] = actions.move_selection_previous,
|
||||
["H"] = actions.move_to_top,
|
||||
["M"] = actions.move_to_middle,
|
||||
["L"] = actions.move_to_bottom,
|
||||
["<Down>"] = actions.move_selection_next,
|
||||
["<Up>"] = actions.move_selection_previous,
|
||||
["gg"] = actions.move_to_top,
|
||||
["G"] = actions.move_to_bottom,
|
||||
["<C-u>"] = actions.preview_scrolling_up,
|
||||
["<C-d>"] = actions.preview_scrolling_down,
|
||||
["<PageUp>"] = actions.results_scrolling_up,
|
||||
["<PageDown>"] = actions.results_scrolling_down,
|
||||
["?"] = actions.which_key,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = { preview = true },
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({
|
||||
previewer = false,
|
||||
layout_strategy = "horizontal",
|
||||
}),
|
||||
},
|
||||
},
|
||||
})
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("media_files")
|
||||
if _clip then telescope.load_extension("neoclip") end
|
15
nvim/.config/nvim/lua/dubey/plugins/term.lua
Normal file
15
nvim/.config/nvim/lua/dubey/plugins/term.lua
Normal file
@ -0,0 +1,15 @@
|
||||
local present, term = pcall(require, "toggleterm")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
term.setup({
|
||||
shade_terminals = false,
|
||||
float_opts = {
|
||||
winblend = 0,
|
||||
highlights = {
|
||||
border = "FloatBorder",
|
||||
background = "NormalFloat",
|
||||
},
|
||||
},
|
||||
})
|
20
nvim/.config/nvim/lua/dubey/plugins/treesitter.lua
Normal file
20
nvim/.config/nvim/lua/dubey/plugins/treesitter.lua
Normal file
@ -0,0 +1,20 @@
|
||||
local present, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {"python", "go"},
|
||||
sync_install = false,
|
||||
autopairs = { enable = true },
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "" },
|
||||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
indent = { enable = true, disable = { "yaml" } },
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
enable_autocmd = false,
|
||||
},
|
||||
})
|
133
nvim/.config/nvim/lua/dubey/plugins/whichkey.lua
Normal file
133
nvim/.config/nvim/lua/dubey/plugins/whichkey.lua
Normal file
@ -0,0 +1,133 @@
|
||||
local present, which_key = pcall(require, "which-key")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
local setup = {
|
||||
plugins = {
|
||||
marks = true,
|
||||
registers = true,
|
||||
spelling = {
|
||||
enabled = true,
|
||||
suggestions = 20,
|
||||
},
|
||||
presets = {
|
||||
operators = true,
|
||||
motions = true,
|
||||
text_objects = true,
|
||||
windows = true,
|
||||
nav = true,
|
||||
z = true,
|
||||
g = true,
|
||||
},
|
||||
},
|
||||
icons = {
|
||||
breadcrumb = "»",
|
||||
separator = "➜",
|
||||
group = "+",
|
||||
},
|
||||
popup_mappings = {
|
||||
scroll_down = "<c-d>",
|
||||
scroll_up = "<c-u>",
|
||||
},
|
||||
window = {
|
||||
border = "rounded",
|
||||
position = "bottom",
|
||||
margin = { 1, 0, 1, 0 },
|
||||
padding = { 2, 2, 2, 2 },
|
||||
winblend = 0,
|
||||
},
|
||||
layout = {
|
||||
height = { min = 4, max = 25 },
|
||||
width = { min = 20, max = 50 },
|
||||
spacing = 3,
|
||||
align = "left",
|
||||
},
|
||||
ignore_missing = true,
|
||||
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " },
|
||||
show_help = true,
|
||||
triggers = "auto",
|
||||
triggers_blacklist = {
|
||||
i = { "j", "k" },
|
||||
v = { "j", "k" },
|
||||
},
|
||||
}
|
||||
|
||||
local leader_opts = {
|
||||
mode = "n",
|
||||
prefix = "<leader>",
|
||||
buffer = nil,
|
||||
silent = true,
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
}
|
||||
|
||||
local leader_mappings = {
|
||||
w = {
|
||||
"<esc>:w!<bar>:lua vim.notify(vim.fn.expand('%'), 'success', { title = 'Buffer Saved' })<cr>",
|
||||
"Save Buffer",
|
||||
},
|
||||
W = {
|
||||
"<esc>:SudaWrite<bar>:lua vim.notify(vim.fn.expand('%'), 'success', { title = 'Buffer saved with sudo' })<cr>",
|
||||
"Sudo Save Buffer",
|
||||
},
|
||||
x = { "<cmd>:q<cr>", "Quit Buffer" },
|
||||
z = { "<cmd>ZenMode<cr>", "Zen Mode" },
|
||||
q = { "<cmd>conf qa<cr>", "Quit Nvim" },
|
||||
c = { "<cmd>Bdelete!<cr>", "Close Buffer" },
|
||||
h = { "<cmd>nohlsearch<cr>", "Clear Highlight" },
|
||||
e = { "<cmd>NvimTreeToggle<cr>", "File Explorer" },
|
||||
s = { "<cmd>SessionManager save_current_session<cr>", "Save Session" },
|
||||
f = {
|
||||
name = "Find",
|
||||
y = { "<cmd>Telescope neoclip<cr>", "Yanks" },
|
||||
h = { "<cmd>Telescope help_tags<cr>", "Help" },
|
||||
k = { "<cmd>Telescope keymaps<cr>", "Keymaps" },
|
||||
t = { "<cmd>Telescope live_grep<cr>", "Text" },
|
||||
b = { "<cmd>Telescope buffers<cr>", "Buffers" },
|
||||
f = { "<cmd>Telescope find_files<cr>", "Files" },
|
||||
o = { "<cmd>Telescope oldfiles<cr>", "Recents" },
|
||||
c = { "<cmd>Telescope commands<cr>", "Commands" },
|
||||
m = { "<cmd>Telescope man_pages<cr>", "Manuals" },
|
||||
r = { "<cmd>Telescope registers<cr>", "Registers" },
|
||||
s = { "<cmd>SessionManager load_session<cr>", "Sessions" },
|
||||
},
|
||||
p = {
|
||||
name = "Packer",
|
||||
s = { "<cmd>PackerSync<cr>", "Sync" },
|
||||
S = { "<cmd>PackerStatus<cr>", "Status" },
|
||||
u = { "<cmd>PackerUpdate<cr>", "Update" },
|
||||
c = { "<cmd>PackerCompile<cr>", "Compile" },
|
||||
i = { "<cmd>PackerInstall<cr>", "Install" },
|
||||
},
|
||||
g = {
|
||||
name = "Git",
|
||||
s = { "<cmd>Telescope git_status<cr>", "File Git Status" },
|
||||
c = { "<cmd>Telescope git_commits<cr>", "Checkout commit" },
|
||||
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
|
||||
},
|
||||
l = {
|
||||
name = "LSP",
|
||||
I = { "<cmd>LspInfo<cr>", "Info" },
|
||||
i = { "<cmd>LspInstall<cr>", "Install" },
|
||||
a = { "<cmd>AerialToggle<cr>", "Aerial" },
|
||||
f = { "<cmd>lua vim.lsp.buf.formatting()<cr>", "Format" },
|
||||
w = { "<cmd>Telescope diagnostics<cr>", "Workspace Diagnostics" },
|
||||
d = { "<cmd>Telescope diagnostics bufnr=0<cr>", "Document Diagnostics" },
|
||||
},
|
||||
t = {
|
||||
name = "Terminal",
|
||||
f = { "<cmd>ToggleTerm direction=float<cr>", "Float" },
|
||||
v = { "<cmd>ToggleTerm size=80 direction=vertical<cr>", "Vertical" },
|
||||
h = { "<cmd>ToggleTerm size=10 direction=horizontal<cr>", "Horizontal" },
|
||||
},
|
||||
v = {
|
||||
name = "ViMux",
|
||||
r = { "<cmd>VimuxPromptCommand<CR>", "Run Command" },
|
||||
l = { "<cmd>VimuxRunLastCommand<cr>", "Run Last" },
|
||||
},
|
||||
}
|
||||
|
||||
which_key.setup(setup)
|
||||
which_key.register(leader_mappings, leader_opts)
|
||||
|
1
nvim/.config/nvim/lua/dubey/theme.lua
Normal file
1
nvim/.config/nvim/lua/dubey/theme.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.cmd[[colorscheme gruvbox8]]
|
322
nvim/.config/nvim/plugin/packer_compiled.lua
Normal file
322
nvim/.config/nvim/plugin/packer_compiled.lua
Normal file
@ -0,0 +1,322 @@
|
||||
-- Automatically generated packer.nvim plugin loader code
|
||||
|
||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_command('packadd packer.nvim')
|
||||
|
||||
local no_errors, error_msg = pcall(function()
|
||||
|
||||
local time
|
||||
local profile_info
|
||||
local should_profile = false
|
||||
if should_profile then
|
||||
local hrtime = vim.loop.hrtime
|
||||
profile_info = {}
|
||||
time = function(chunk, start)
|
||||
if start then
|
||||
profile_info[chunk] = hrtime()
|
||||
else
|
||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||
end
|
||||
end
|
||||
else
|
||||
time = function(chunk, start) end
|
||||
end
|
||||
|
||||
local function save_profiles(threshold)
|
||||
local sorted_times = {}
|
||||
for chunk_name, time_taken in pairs(profile_info) do
|
||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||
end
|
||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||
local results = {}
|
||||
for i, elem in ipairs(sorted_times) do
|
||||
if not threshold or threshold and elem[2] > threshold then
|
||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||
end
|
||||
end
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/tdubey/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/tdubey/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/tdubey/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/tdubey/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/tdubey/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], false)
|
||||
time([[try_loadstring definition]], true)
|
||||
local function try_loadstring(s, component, name)
|
||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||
if not success then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||
end)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["Comment.nvim"] = {
|
||||
config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/Comment.nvim",
|
||||
url = "https://github.com/numToStr/Comment.nvim"
|
||||
},
|
||||
LuaSnip = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["aerial.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/aerial.nvim",
|
||||
url = "https://github.com/stevearc/aerial.nvim"
|
||||
},
|
||||
["alpha-nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/alpha-nvim",
|
||||
url = "https://github.com/goolord/alpha-nvim"
|
||||
},
|
||||
["bufferline.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/bufferline.nvim",
|
||||
url = "https://github.com/akinsho/bufferline.nvim"
|
||||
},
|
||||
catppuccin = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/catppuccin",
|
||||
url = "https://github.com/catppuccin/nvim"
|
||||
},
|
||||
["cmp-buffer"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||
},
|
||||
["cmp-cmdline"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
|
||||
url = "https://github.com/hrsh7th/cmp-cmdline"
|
||||
},
|
||||
["cmp-nvim-lsp"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
["cmp-path"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
["copilot.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/copilot.vim",
|
||||
url = "https://github.com/github/copilot.vim"
|
||||
},
|
||||
["friendly-snippets"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/friendly-snippets",
|
||||
url = "https://github.com/rafamadriz/friendly-snippets"
|
||||
},
|
||||
["indent-blankline.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
|
||||
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
["lsp_signature.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim",
|
||||
url = "https://github.com/ray-x/lsp_signature.nvim"
|
||||
},
|
||||
["lspkind-nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
|
||||
url = "https://github.com/onsails/lspkind-nvim"
|
||||
},
|
||||
["lualine.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||
},
|
||||
["neovim-session-manager"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/neovim-session-manager",
|
||||
url = "https://github.com/Shatur/neovim-session-manager"
|
||||
},
|
||||
["null-ls.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
|
||||
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
|
||||
},
|
||||
["nvim-autopairs"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
|
||||
url = "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
["nvim-cmp"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
["nvim-lightbulb"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
|
||||
url = "https://github.com/kosayoda/nvim-lightbulb"
|
||||
},
|
||||
["nvim-lsp-installer"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
|
||||
url = "https://github.com/williamboman/nvim-lsp-installer"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-neoclip.lua"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-neoclip.lua",
|
||||
url = "https://github.com/AckslD/nvim-neoclip.lua"
|
||||
},
|
||||
["nvim-notify"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-notify",
|
||||
url = "https://github.com/rcarriga/nvim-notify"
|
||||
},
|
||||
["nvim-scrollbar"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-scrollbar",
|
||||
url = "https://github.com/petertriho/nvim-scrollbar"
|
||||
},
|
||||
["nvim-tree.lua"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||
url = "https://github.com/wbthomason/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
["pretty-fold.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/pretty-fold.nvim",
|
||||
url = "https://github.com/anuvyklack/pretty-fold.nvim"
|
||||
},
|
||||
["suda.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/suda.vim",
|
||||
url = "https://github.com/lambdalisue/suda.vim"
|
||||
},
|
||||
["telescope-fzf-native.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||
},
|
||||
["telescope-media-files.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/telescope-media-files.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-media-files.nvim"
|
||||
},
|
||||
["telescope-ui-select.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/telescope-ui-select.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope-ui-select.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
["toggleterm.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
|
||||
url = "https://github.com/akinsho/toggleterm.nvim"
|
||||
},
|
||||
["twilight.nvim"] = {
|
||||
config = { "\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rtwilight\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/twilight.nvim",
|
||||
url = "https://github.com/folke/twilight.nvim"
|
||||
},
|
||||
["vim-gitgutter"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
|
||||
url = "https://github.com/airblade/vim-gitgutter"
|
||||
},
|
||||
["vim-gruvbox8"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/vim-gruvbox8",
|
||||
url = "https://github.com/lifepillar/vim-gruvbox8"
|
||||
},
|
||||
["vim-tmux-navigator"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator",
|
||||
url = "https://github.com/christoomey/vim-tmux-navigator"
|
||||
},
|
||||
vimux = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/vimux",
|
||||
url = "https://github.com/preservim/vimux"
|
||||
},
|
||||
["which-key.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
||||
url = "https://github.com/folke/which-key.nvim"
|
||||
},
|
||||
["zen-mode.nvim"] = {
|
||||
config = { "\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rzen-mode\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/tdubey/.local/share/nvim/site/pack/packer/start/zen-mode.nvim",
|
||||
url = "https://github.com/folke/zen-mode.nvim"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
-- Config for: zen-mode.nvim
|
||||
time([[Config for zen-mode.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rzen-mode\frequire\0", "config", "zen-mode.nvim")
|
||||
time([[Config for zen-mode.nvim]], false)
|
||||
-- Config for: twilight.nvim
|
||||
time([[Config for twilight.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rtwilight\frequire\0", "config", "twilight.nvim")
|
||||
time([[Config for twilight.nvim]], false)
|
||||
-- Config for: Comment.nvim
|
||||
time([[Config for Comment.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
|
||||
time([[Config for Comment.nvim]], false)
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
error_msg = error_msg:gsub('"', '\\"')
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
193
pl10k/.p10k.zsh
Normal file
193
pl10k/.p10k.zsh
Normal file
@ -0,0 +1,193 @@
|
||||
# Generated by Powerlevel10k configuration wizard on 2022-02-23 at 19:43 UTC.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-pure.zsh, checksum 13301.
|
||||
# Wizard options: nerdfont-complete + powerline, small icons, pure, rprompt, 24h time,
|
||||
# 1 line, compact, transient_prompt, instant_prompt=verbose.
|
||||
# Type `p10k configure` to generate another config.
|
||||
#
|
||||
# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).
|
||||
#
|
||||
# Differences from Pure:
|
||||
#
|
||||
# - Git:
|
||||
# - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state.
|
||||
# - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`).
|
||||
#
|
||||
# Apart from the differences listed above, the replication of Pure prompt is exact. This includes
|
||||
# even the questionable parts. For example, just like in Pure, there is no indication of Git status
|
||||
# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt
|
||||
# doesn't fit on one line, it wraps around with no attempt to shorten it.
|
||||
#
|
||||
# If you like the general style of Pure but not particularly attached to all its quirks, type
|
||||
# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking
|
||||
# advantage of Powerlevel10k features that aren't present in Pure.
|
||||
|
||||
# Temporarily change options.
|
||||
'builtin' 'local' '-a' 'p10k_config_opts'
|
||||
[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
|
||||
[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
|
||||
[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
|
||||
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
|
||||
|
||||
() {
|
||||
emulate -L zsh -o extended_glob
|
||||
|
||||
# Unset all configuration options.
|
||||
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
||||
|
||||
# Zsh >= 5.1 is required.
|
||||
autoload -Uz is-at-least && is-at-least 5.1 || return
|
||||
|
||||
# Prompt colors.
|
||||
local grey='242'
|
||||
local red='1'
|
||||
local yellow='3'
|
||||
local blue='4'
|
||||
local magenta='5'
|
||||
local cyan='6'
|
||||
local white='7'
|
||||
|
||||
# Left prompt segments.
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
||||
# context # user@host
|
||||
dir # current directory
|
||||
vcs # git status
|
||||
# command_execution_time # previous command duration
|
||||
# virtualenv # python virtual environment
|
||||
prompt_char # prompt symbol
|
||||
)
|
||||
|
||||
# Right prompt segments.
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||
command_execution_time # previous command duration
|
||||
virtualenv # python virtual environment
|
||||
context # user@host
|
||||
time # current time
|
||||
)
|
||||
|
||||
# Basic style options that define the overall prompt look.
|
||||
typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
|
||||
typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons
|
||||
|
||||
# Add an empty line before each prompt except the first. This doesn't emulate the bug
|
||||
# in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar.
|
||||
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
|
||||
|
||||
# Magenta prompt symbol if the last command succeeded.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta
|
||||
# Red prompt symbol if the last command failed.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red
|
||||
# Default prompt symbol.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
||||
# Prompt symbol in command vi mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
|
||||
# Prompt symbol in visual vi mode is the same as in command mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮'
|
||||
# Prompt symbol in overwrite vi mode is the same as in command mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false
|
||||
|
||||
# Grey Python Virtual Environment.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey
|
||||
# Don't show Python version.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
||||
|
||||
# Blue current directory.
|
||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue
|
||||
|
||||
# Context format when root: user@host. The first part white, the rest grey.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f"
|
||||
# Context format when not root: user@host. The whole thing grey.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f"
|
||||
# Don't show context unless root or in SSH.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=
|
||||
|
||||
# Show previous command duration only if it's >= 5s.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5
|
||||
# Don't show fractional seconds. Thus, 7s rather than 7.3s.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
||||
# Duration format: 1d 2h 3m 4s.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
||||
# Yellow previous command duration.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow
|
||||
|
||||
# Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones.
|
||||
typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey
|
||||
|
||||
# Disable async loading indicator to make directories that aren't Git repositories
|
||||
# indistinguishable from large Git repositories without known state.
|
||||
typeset -g POWERLEVEL9K_VCS_LOADING_TEXT=
|
||||
|
||||
# Don't wait for Git status even for a millisecond, so that prompt always updates
|
||||
# asynchronously when Git state changes.
|
||||
typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0
|
||||
|
||||
# Cyan ahead/behind arrows.
|
||||
typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan
|
||||
# Don't show remote branch, current tag or stashes.
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind)
|
||||
# Don't show the branch icon.
|
||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
|
||||
# When in detached HEAD state, show @commit where branch normally goes.
|
||||
typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'
|
||||
# Don't show staged, unstaged, untracked indicators.
|
||||
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=
|
||||
# Show '*' when there are staged, unstaged or untracked files.
|
||||
typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'
|
||||
# Show '⇣' if local branch is behind remote.
|
||||
typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣'
|
||||
# Show '⇡' if local branch is ahead of remote.
|
||||
typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡'
|
||||
# Don't show the number of commits next to the ahead/behind arrows.
|
||||
typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1
|
||||
# Remove space between '⇣' and '⇡' and all trailing spaces.
|
||||
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }'
|
||||
|
||||
# Grey current time.
|
||||
typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey
|
||||
# Format for the current time: 09:51:02. See `man 3 strftime`.
|
||||
typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
|
||||
# If set to true, time will update when you hit enter. This way prompts for the past
|
||||
# commands will contain the start times of their commands rather than the end times of
|
||||
# their preceding commands.
|
||||
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
|
||||
|
||||
# Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
|
||||
# when accepting a command line. Supported values:
|
||||
#
|
||||
# - off: Don't change prompt when accepting a command line.
|
||||
# - always: Trim down prompt when accepting a command line.
|
||||
# - same-dir: Trim down prompt when accepting a command line unless this is the first command
|
||||
# typed after changing current working directory.
|
||||
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
|
||||
|
||||
# Instant prompt mode.
|
||||
#
|
||||
# - off: Disable instant prompt. Choose this if you've tried instant prompt and found
|
||||
# it incompatible with your zsh configuration files.
|
||||
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
||||
# during zsh initialization. Choose this if you've read and understood
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
||||
|
||||
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
||||
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
||||
# can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
|
||||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
}
|
||||
|
||||
# Tell `p10k configure` which file it should overwrite.
|
||||
typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
|
||||
|
||||
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
||||
'builtin' 'unset' 'p10k_config_opts'
|
97
tmux/.tmux.conf
Normal file
97
tmux/.tmux.conf
Normal file
@ -0,0 +1,97 @@
|
||||
# easy reload config
|
||||
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
|
||||
|
||||
# Window Splits
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# Start numbering at 1
|
||||
set -g base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
|
||||
# Allows for faster key repetition
|
||||
set -s escape-time 50
|
||||
|
||||
# Rather than constraining window size to the maximum size of any client
|
||||
# connected to the *session*, constrain window size to the maximum size of any
|
||||
# client connected to *that window*. Much more reasonable.
|
||||
setw -g aggressive-resize on
|
||||
|
||||
# Activity monitoring
|
||||
setw -g monitor-activity on
|
||||
set -g visual-activity on
|
||||
|
||||
# auto window rename
|
||||
set -g allow-rename on
|
||||
set-option -g base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# How to get nice colors
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
|
||||
# Yeah I use the mouse
|
||||
set -g mouse on
|
||||
|
||||
# set prefix to Ctrl-Space
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind Space send-prefix
|
||||
|
||||
# Equalize all windows with x
|
||||
bind x select-layout even-vertical
|
||||
|
||||
# Setup tmux key so that ctrl-VIM can move around panes
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
||||
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
|
||||
|
||||
bind -n C-h run "($is_vim && tmux send-keys C-h) || \
|
||||
tmux select-pane -L"
|
||||
|
||||
bind -n C-j run "($is_vim && tmux send-keys C-j) || \
|
||||
($is_fzf && tmux send-keys C-j) || \
|
||||
tmux select-pane -D"
|
||||
|
||||
bind -n C-k run "($is_vim && tmux send-keys C-k) || \
|
||||
($is_fzf && tmux send-keys C-k) || \
|
||||
tmux select-pane -U"
|
||||
|
||||
bind -n C-l run "($is_vim && tmux send-keys C-l) || \
|
||||
tmux select-pane -R"
|
||||
|
||||
|
||||
# Status Line
|
||||
set-option -g status-position bottom
|
||||
set -g status-bg default
|
||||
set -g status-fg default
|
||||
set -g status-left-length 100
|
||||
set -g status-right " #[fg=default]#W#[fg=red] >> #[fg=white] #{cpu_percentage} | #{ram_percentage} #[fg=red]>> #[fg=white]%d/%m %H:%M "
|
||||
set -g status-right-length 0
|
||||
set -g status-left ""
|
||||
set -g status-justify left
|
||||
setw -g window-status-format '#[fg=white]#I #[fg=black]#W '
|
||||
setw -g window-status-format '#[fg=white,bg=default]#[fg=black,bg=white]#I #[fg=black,bg=white]#W #[fg=white,bg=default]'
|
||||
setw -g window-status-current-format '#[fg=magenta,bg=default]#[fg=black,bg=magenta]#I #[fg=black,bg=magenta]#W #[fg=magenta,bg=default]'
|
||||
setw -g window-status-current-style fg=red
|
||||
setw -g window-status-activity-style fg=yellow
|
||||
setw -g window-status-bell-style fg=yellow
|
||||
set -g set-titles on
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm' # The plugin manager
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator' # Integrate vim navigation with tmux
|
||||
set -g @plugin 'tmux-plugins/tmux-cpu' # CPU Data in the status bar
|
||||
set -g @plugin 'ofirgall/tmux-window-name' # Window name in the status bar
|
||||
|
||||
# Other examples:
|
||||
# set -g @plugin 'github_username/plugin_name'
|
||||
# set -g @plugin 'github_username/plugin_name#branch'
|
||||
# set -g @plugin 'git@github.com:user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com:user/plugin'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
151
zsh/.zshrc
Normal file
151
zsh/.zshrc
Normal file
@ -0,0 +1,151 @@
|
||||
fortune | cowsay
|
||||
|
||||
cd /home/tdubey/fleet >> /dev/null && source .envrc >> /dev/null && cd -
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
# a theme from this variable instead of looking in $ZSH/themes/
|
||||
# If set to an empty array, this variable will have no effect.
|
||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion.
|
||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment one of the following lines to change the auto-update behavior
|
||||
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# zstyle ':omz:update' frequency 13
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# You can also set it to another string to have that shown instead of the default red dots.
|
||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
# ======> VOYAGER <======
|
||||
|
||||
# gvm
|
||||
export GVM_DIR="$HOME/.gvm/scripts/gvm"
|
||||
export GOPROXY="https://artifacts.co.clearstreet.io/artifactory/go/"
|
||||
[ -s $GVM_DIR ] && . $GVM_DIR # This loads gvm
|
||||
|
||||
# nvm
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
||||
# pyenv
|
||||
export PATH="$HOME/.pyenv/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
# local binaries
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.tfenv/bin:$PATH"
|
||||
export PATH="$HOME/.tgenv/bin:$PATH"
|
||||
|
||||
# ======> VOYAGER <======
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
autoload -U compinit; compinit
|
||||
|
||||
export PATH="$HOME/.fleetcli/bin:$PATH"
|
Loading…
Reference in New Issue
Block a user