feat: initialize repo
This commit is contained in:
11
fish/config.fish
Normal file
11
fish/config.fish
Normal file
@@ -0,0 +1,11 @@
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
alias dc="docker compose"
|
||||
alias dl="docker logs"
|
||||
alias de="docker exec"
|
||||
alias dps="docker ps --format 'table {{.Names}}\t{{printf \"%-20s\" .Status}}'"
|
||||
alias k kubectl
|
||||
alias kn "kubectl config set-context --current --namespace"
|
||||
|
||||
# Enable zoxide
|
||||
zoxide init fish | source
|
||||
1
kitty
Submodule
1
kitty
Submodule
Submodule kitty added at 820027e9da
2
nvim/.gitignore
vendored
Normal file
2
nvim/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
lazy-lock.json
|
||||
|
||||
6
nvim/.luarc.json
Normal file
6
nvim/.luarc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"diagnostics.globals": [
|
||||
"vim",
|
||||
"LazyVim"
|
||||
]
|
||||
}
|
||||
15
nvim/init.lua
Normal file
15
nvim/init.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
require("config.lazy")
|
||||
require("config.keymap")
|
||||
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=4")
|
||||
vim.cmd("set softtabstop=4")
|
||||
vim.cmd("set shiftwidth=4")
|
||||
vim.cmd("set nowrap")
|
||||
vim.cmd("set clipboard+=unnamedplus")
|
||||
|
||||
vim.opt.spell = true
|
||||
vim.opt.spelllang = "en_us"
|
||||
vim.opt.spelloptions:append("camel")
|
||||
vim.wo.relativenumber = true
|
||||
vim.opt.number = true
|
||||
2
nvim/lua/config/keymap.lua
Normal file
2
nvim/lua/config/keymap.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
# Custom Keymaps
|
||||
|
||||
36
nvim/lua/config/lazy.lua
Normal file
36
nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
31
nvim/lua/plugins/alpha.lua
Normal file
31
nvim/lua/plugins/alpha.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.startify")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ████ ██████ █████ ██ ]],
|
||||
[[ ███████████ █████ ]],
|
||||
[[ █████████ ███████████████████ ███ ███████████ ]],
|
||||
[[ █████████ ███ █████████████ █████ ██████████████ ]],
|
||||
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
|
||||
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
|
||||
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
||||
6
nvim/lua/plugins/autoclose.lua
Normal file
6
nvim/lua/plugins/autoclose.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"m4xshen/autoclose.nvim",
|
||||
config = function()
|
||||
require("autoclose").setup()
|
||||
end,
|
||||
}
|
||||
8
nvim/lua/plugins/catppuccin.lua
Normal file
8
nvim/lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
}
|
||||
66
nvim/lua/plugins/completions.lua
Normal file
66
nvim/lua/plugins/completions.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }), -- 'i' for insert mode, 's' for snippet mode
|
||||
["<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" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" }
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
6
nvim/lua/plugins/floaterm.lua
Normal file
6
nvim/lua/plugins/floaterm.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"voldikss/vim-floaterm",
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>ft", ":FloatermNew<CR>")
|
||||
end,
|
||||
}
|
||||
70
nvim/lua/plugins/gitsigns.lua
Normal file
70
nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,70 @@
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require('gitsigns').setup {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require('gitsigns')
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ ']c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('next')
|
||||
end
|
||||
end)
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ '[c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('prev')
|
||||
end
|
||||
end)
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>hs', gitsigns.stage_hunk)
|
||||
map('n', '<leader>hr', gitsigns.reset_hunk)
|
||||
|
||||
map('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
end)
|
||||
|
||||
map('v', '<leader>hr', function()
|
||||
gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
end)
|
||||
|
||||
map('n', '<leader>hS', gitsigns.stage_buffer)
|
||||
map('n', '<leader>hR', gitsigns.reset_buffer)
|
||||
map('n', '<leader>hp', gitsigns.preview_hunk)
|
||||
map('n', '<leader>hi', gitsigns.preview_hunk_inline)
|
||||
|
||||
map('n', '<leader>hb', function()
|
||||
gitsigns.blame_line({ full = true })
|
||||
end)
|
||||
|
||||
map('n', '<leader>hd', gitsigns.diffthis)
|
||||
|
||||
map('n', '<leader>hD', function()
|
||||
gitsigns.diffthis('~')
|
||||
end)
|
||||
|
||||
map('n', '<leader>hQ', function() gitsigns.setqflist('all') end)
|
||||
map('n', '<leader>hq', gitsigns.setqflist)
|
||||
|
||||
-- Toggles
|
||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame)
|
||||
map('n', '<leader>tw', gitsigns.toggle_word_diff)
|
||||
|
||||
-- Text object
|
||||
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
|
||||
end
|
||||
}
|
||||
end
|
||||
}
|
||||
17
nvim/lua/plugins/lsp-config.lua
Normal file
17
nvim/lua/plugins/lsp-config.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
{ "mason-org/mason.nvim", opts = {} },
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "rust_analyzer", "ts_ls", "yamlls", "pyright", "angularls" },
|
||||
})
|
||||
|
||||
vim.diagnostic.config({ virtual_text = true })
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
end,
|
||||
}
|
||||
88
nvim/lua/plugins/lualine.lua
Normal file
88
nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,88 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"yavorski/lualine-macro-recording.nvim"
|
||||
},
|
||||
config = function()
|
||||
-- Bubbles config for lualine
|
||||
-- Author: lokesh-krishna
|
||||
-- MIT license, see LICENSE for more details.
|
||||
|
||||
-- stylua: ignore
|
||||
local colors = {
|
||||
gray = '#1E1E2E',
|
||||
lightgray = '#45475a',
|
||||
orange = '#F5C2E7',
|
||||
purple = '#b4befe',
|
||||
red = '#F38BA8',
|
||||
yellow = '#F9E2AF',
|
||||
green = '#A6E3A1',
|
||||
white = '#BAC2DE',
|
||||
black = '#45475A',
|
||||
}
|
||||
|
||||
local custom_theme = {
|
||||
normal = {
|
||||
a = { bg = colors.purple, fg = colors.black, gui = "bold" },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.gray, fg = colors.white },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = colors.green, fg = colors.black, gui = "bold" },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.gray, fg = colors.white },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = colors.yellow, fg = colors.black, gui = "bold" },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.gray, fg = colors.white },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = colors.red, fg = colors.black, gui = "bold" },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.gray, fg = colors.white },
|
||||
},
|
||||
command = {
|
||||
a = { bg = colors.orange, fg = colors.black, gui = "bold" },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.gray, fg = colors.white },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = colors.gray, fg = colors.white, gui = "bold" },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.gray, fg = colors.white },
|
||||
},
|
||||
}
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = custom_theme,
|
||||
component_separators = "",
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } },
|
||||
lualine_b = { "filename", "branch", "diff" },
|
||||
lualine_c = {
|
||||
"macro_recording", "%S" --[[ add your center components here in place of this comment ]]
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = { "filetype", "progress" },
|
||||
lualine_z = {
|
||||
{ "location", separator = { right = "" }, left_padding = 2 },
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = { "filename" },
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
||||
end,
|
||||
}
|
||||
13
nvim/lua/plugins/neo-tree.lua
Normal file
13
nvim/lua/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function ()
|
||||
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>")
|
||||
vim.keymap.set({"n", "v" }, "<leader>nt", ":Neotree toggle<CR>")
|
||||
end
|
||||
}
|
||||
52
nvim/lua/plugins/noice.lua
Normal file
52
nvim/lua/plugins/noice.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
lsp = {
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show",
|
||||
any = {
|
||||
{ find = "%d+L, %d+B" },
|
||||
{ find = "; after #%d+" },
|
||||
{ find = "; before #%d+" },
|
||||
},
|
||||
},
|
||||
view = "mini",
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
command_palette = true,
|
||||
long_message_to_split = true,
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>sn", "", desc = "+noice" },
|
||||
{ "<S-Enter>", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" },
|
||||
{ "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
|
||||
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
|
||||
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
|
||||
{ "<leader>snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
|
||||
{ "<leader>snt", function() require("noice").cmd("pick") end, desc = "Noice Picker (Telescope/FzfLua)" },
|
||||
{ "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll Forward", mode = { "i", "n", "s" } },
|
||||
{ "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll Backward", mode = { "i", "n", "s" } },
|
||||
},
|
||||
config = function(_, opts)
|
||||
-- HACK: noice shows messages from before it was enabled,
|
||||
-- but this is not ideal when Lazy is installing plugins,
|
||||
-- so clear the messages in this case.
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.cmd([[messages clear]])
|
||||
end
|
||||
require("noice").setup(opts)
|
||||
end,
|
||||
}
|
||||
15
nvim/lua/plugins/none-ls.lua
Normal file
15
nvim/lua/plugins/none-ls.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
-- null_ls.builtins.diagnostics.eslint_d,
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||
end,
|
||||
}
|
||||
32
nvim/lua/plugins/telescope.lua
Normal file
32
nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.8",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"BurntSushi/ripgrep",
|
||||
},
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Telescope live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Telescope buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Telescope help tags" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("ui-select")
|
||||
end,
|
||||
},
|
||||
}
|
||||
33
nvim/lua/plugins/treesitter.lua
Normal file
33
nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "master",
|
||||
lazy = false,
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"typescript",
|
||||
"kotlin",
|
||||
"java",
|
||||
},
|
||||
|
||||
sync_install = false,
|
||||
|
||||
auto_install = true,
|
||||
|
||||
ignore_install = {},
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
37
nvim/lua/plugins/trouble.lua
Normal file
37
nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xX",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
desc = "Symbols (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cl",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP Definitions / references / ... (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xL",
|
||||
"<cmd>Trouble loclist toggle<cr>",
|
||||
desc = "Location List (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xQ",
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
},
|
||||
}
|
||||
3
nvim/lua/plugins/vim-fugitive.lua
Normal file
3
nvim/lua/plugins/vim-fugitive.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"tpope/vim-fugitive"
|
||||
}
|
||||
71
nvim/lua/plugins/which-key.lua
Normal file
71
nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts_extend = { "spec" },
|
||||
opts = {
|
||||
preset = "helix",
|
||||
defaults = {},
|
||||
spec = {
|
||||
{
|
||||
mode = { "n", "v" },
|
||||
{ "<leader><tab>", group = "tabs" },
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>d", group = "debug" },
|
||||
{ "<leader>dp", group = "profiler" },
|
||||
{ "<leader>f", group = "file/find" },
|
||||
{ "<leader>g", group = "git" },
|
||||
{ "<leader>gh", group = "hunks" },
|
||||
{ "<leader>q", group = "quit/session" },
|
||||
{ "<leader>s", group = "search" },
|
||||
{ "<leader>u", group = "ui", icon = { icon = " ", color = "cyan" } },
|
||||
{ "<leader>x", group = "diagnostics/quickfix", icon = { icon = " ", color = "green" } },
|
||||
{ "[", group = "prev" },
|
||||
{ "]", group = "next" },
|
||||
{ "g", group = "goto" },
|
||||
{ "gs", group = "surround" },
|
||||
{ "z", group = "fold" },
|
||||
{
|
||||
"<leader>b",
|
||||
group = "buffer",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.buf()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<leader>w",
|
||||
group = "windows",
|
||||
proxy = "<c-w>",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.win()
|
||||
end,
|
||||
},
|
||||
-- better descriptions
|
||||
{ "gx", desc = "Open with system app" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Keymaps (which-key)",
|
||||
},
|
||||
{
|
||||
"<c-w><space>",
|
||||
function()
|
||||
require("which-key").show({ keys = "<c-w>", loop = true })
|
||||
end,
|
||||
desc = "Window Hydra Mode (which-key)",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
if not vim.tbl_isempty(opts.defaults) then
|
||||
LazyVim.warn("which-key: opts.defaults is deprecated. Please use opts.spec instead.")
|
||||
wk.register(opts.defaults)
|
||||
end
|
||||
end,
|
||||
}
|
||||
1
tmux/.gitignore
vendored
Normal file
1
tmux/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
plugins/
|
||||
16
tmux/README.md
Normal file
16
tmux/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
|
||||
1. Make sure that `tmux` is installed on your system.
|
||||
|
||||
2. Please clone this repository to your `~/.config/tmux` directory:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/tmux
|
||||
git clone git@github.com:antistereov/tmux.git ~/.config/tmux
|
||||
```
|
||||
|
||||
3. To install this custom configuration, run:
|
||||
|
||||
```bash
|
||||
install.sh
|
||||
```
|
||||
17
tmux/install.sh
Executable file
17
tmux/install.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
echo "Installing Catppuccin..."
|
||||
mkdir -p ~/.config/tmux/plugins/catppuccin
|
||||
git clone -b v2.1.3 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
|
||||
|
||||
echo "Installing tmux-cpu..."
|
||||
mkdir -p ~/.config/tmux/plugins/tmux-cpu
|
||||
git clone https://github.com/tmux-plugins/tmux-cpu.git ~/.config/tmux/plugins/tmux-cpu
|
||||
|
||||
echo "Installing tmux-battery..."
|
||||
mkdir -p ~/.config/tmux/plugins/tmux-battery
|
||||
git clone https://github.com/tmux-plugins/tmux-battery.git ~/.config/tmux/plugins/tmux-battery
|
||||
|
||||
echo "Applying custom configuration..."
|
||||
tmux source ~/.config/tmux/tmux.conf
|
||||
40
tmux/tmux.conf
Normal file
40
tmux/tmux.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
unbind r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
set -g prefix C-b
|
||||
|
||||
# Keybindings
|
||||
bind-key h select-pane -L
|
||||
bind-key j select-pane -D
|
||||
bind-key k select-pane -U
|
||||
bind-key l select-pane -R
|
||||
|
||||
# Resize panes using Shift + vim-keys after prefix
|
||||
bind-key C-h resize-pane -L 5
|
||||
bind-key C-j resize-pane -D 5
|
||||
bind-key C-k resize-pane -U 5
|
||||
bind-key L resize-pane -R 5
|
||||
|
||||
# Options to make tmux more pleasant
|
||||
set -g mouse on
|
||||
set -g default-terminal "tmux-256color"
|
||||
set-option -g status-position top
|
||||
|
||||
# Configure the catppuccin plugin
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
set -g @catppuccin_window_status_style "rounded"
|
||||
|
||||
set -g @thm_mantle "#1e1e2f"
|
||||
|
||||
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
|
||||
|
||||
# Make the status line pretty and add some modules
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -g status-right "#{E:@catppuccin_status_session}"
|
||||
set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||
|
||||
run ~/.config/tmux/plugins/tmux-cpu/cpu.tmux
|
||||
run ~/.config/tmux/plugins/tmux-battery/battery.tmux
|
||||
Reference in New Issue
Block a user