Compare commits

..

7 Commits

24 changed files with 296 additions and 241 deletions

View File

@ -1,41 +1,26 @@
# (https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty/tokyonight_storm.toml)
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#24283b'
foreground = '#c0caf5'
#[colors.cursor]
#cursor = '#c0caf5'
#text = '#24283b'
# Normal colors
[colors.normal]
black = '#1d202f'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#a9b1d6'
# Bright colors
# https://github.com/zenbones-theme/zenbones.nvim/blob/main/extras/alacritty/zenbones_dark.toml
# This file is auto-generated by shipwright.nvim
[colors.bright]
black = '#414868'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#bb9af7'
cyan = '#7dcfff'
white = '#c0caf5'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#ff9e64'
[[colors.indexed_colors]]
index = 17
color = '#db4b4b'
black = "#403833"
red = "#E8838F"
green = "#8BAE68"
yellow = "#D68C67"
blue = "#61ABDA"
magenta = "#CF86C1"
cyan = "#65B8C1"
white = "#888F94"
[colors.cursor]
cursor = "#C4CACF"
text = "#1C1917"
[colors.normal]
black = "#1C1917"
blue = "#6099C0"
cyan = "#66A5AD"
green = "#819B69"
magenta = "#B279A7"
red = "#DE6E7C"
white = "#B4BDC3"
yellow = "#B77E64"
[colors.primary]
background = "#1C1917"
foreground = "#B4BDC3"

View File

@ -1,41 +1,26 @@
# (https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty/tokyonight_day.toml)
# TokyoNight Alacritty Colors
# Default colors
[colors.primary]
background = '#e1e2e7'
foreground = '#3760bf'
#[colors.cursor]
#cursor = '#3760bf'
#text = '#e1e2e7'
# Normal colors
[colors.normal]
black = '#e9e9ed'
red = '#f52a65'
green = '#587539'
yellow = '#8c6c3e'
blue = '#2e7de9'
magenta = '#9854f1'
cyan = '#007197'
white = '#6172b0'
# Bright colors
# https://github.com/zenbones-theme/zenbones.nvim/blob/main/extras/alacritty/zenbones_light.toml
# This file is auto-generated by shipwright.nvim
[colors.bright]
black = '#a1a6c5'
red = '#f52a65'
green = '#587539'
yellow = '#8c6c3e'
blue = '#2e7de9'
magenta = '#9854f1'
cyan = '#007197'
white = '#3760bf'
# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '#b15c00'
[[colors.indexed_colors]]
index = 17
color = '#c64343'
black = "#CFC1BA"
red = "#94253E"
green = "#3F5A22"
yellow = "#803D1C"
blue = "#1D5573"
magenta = "#7B3B70"
cyan = "#2B747C"
white = "#4F5E68"
[colors.cursor]
cursor = "#2C363C"
text = "#F0EDEC"
[colors.normal]
black = "#F0EDEC"
blue = "#286486"
cyan = "#3B8992"
green = "#4F6C31"
magenta = "#88507D"
red = "#A8334C"
white = "#2C363C"
yellow = "#944927"
[colors.primary]
background = "#F0EDEC"
foreground = "#2C363C"

View File

@ -45,8 +45,8 @@ $mainMod = SUPER
bind = $mainMod, P, exec, $menu
bind = $mainMod SHIFT, Return, exec, $terminal
bind = $mainMod ALT, Return, exec, $terminal
bind = $mainMod, Return, layoutmsg,swapwithmaster master
bind = $mainMod, Return, exec, $terminal
bind = $mainMod ALT, Return, layoutmsg,swapwithmaster master
bind = $mainMod CONTROL SHIFT, Q, exit
bind = $mainMod, Q, exec, hyprctl reload
bind = $mainMod CONTROL SHIFT, C, killactive

View File

@ -1,10 +1,10 @@
* {
background-color: #263c59;
color: #7b899d;
background-color: #352f2d;
color: #afa099;
}
#workspaces button.active {
border-bottom: 3px solid #7b899d;
border-bottom: 3px solid #afa099;
}
#workspaces button.urgent {

View File

@ -1,10 +1,10 @@
* {
background-color: #8fa0a3;
color: #394446;
background-color: #e1dcd9;
color: #2c363c;
}
#workspaces button.active {
border-bottom: 3px solid #5c6d70;
border-bottom: 3px solid #2c363c;
}
#workspaces button.urgent {

View File

@ -1,11 +1,11 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" },
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"arrow.nvim": { "branch": "master", "commit": "0b0191d967d9fd837a850f2ccaa95d5917239404" },
"better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" },
"blame.nvim": { "branch": "main", "commit": "dedbcdce857f708c63f261287ac7491a893912d0" },
"bookmarks.nvim": { "branch": "main", "commit": "42371a76cdd786452b537490926b1b6a041672e5" },
"ccc.nvim": { "branch": "main", "commit": "22924b7bde685e1816140f17a897950ef82b969a" },
"ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
@ -14,24 +14,26 @@
"feline.nvim": { "branch": "main", "commit": "8bc28b94a16304aad2f53b8c3653b14803748c28" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"gitsigns.nvim": { "branch": "main", "commit": "8df63f2ddc615feb71fd4aee45a4cee022876df1" },
"gitsigns.nvim": { "branch": "main", "commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7" },
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
"go.nvim": { "branch": "master", "commit": "78c6d7b970a79c34dc0f35149f4bd845e09803d6" },
"go.nvim": { "branch": "master", "commit": "cde0c7a110c0f65b9e4e6baf342654268efff371" },
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
"hierarchy-tree-go.nvim": { "branch": "main", "commit": "9fab9ddefe81edab4a144824955d2d085db3f49a" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" },
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
"lackluster.nvim": { "branch": "main", "commit": "6788541c4fc2e018fb29a85556728ab88d9af0b5" },
"lazy.nvim": { "branch": "main", "commit": "332a7ff9b3d226529d8afda4e61979e8b410f350" },
"leap.nvim": { "branch": "main", "commit": "eca8108dcd5f41fbde2a674dceb58b81ed887dc8" },
"lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" },
"lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" },
"neogit": { "branch": "master", "commit": "11dea1b67bb153cd5b4a2de348ceefa69508dfce" },
"neogit": { "branch": "master", "commit": "76380b650ce2bb752cebf34a15583b9f2f141d62" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-lspconfig": { "branch": "master", "commit": "3c8346db23033fa49ce0eef2e89dbe91cfd54f21" },
"nvim-surround": { "branch": "main", "commit": "687ea2f33955df0042bf228853a82696265e7e2d" },
"nvim-treesitter": { "branch": "master", "commit": "122b4d3db1616c1f1305b847c5ed2217c4c329f1" },
"nvim-lspconfig": { "branch": "master", "commit": "7edfd6692ba17f8d4fe08d84142781898ab0a672" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "f0e3b5c5fe38d0012c63368db90017fef87c85a2" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"oil.nvim": { "branch": "master", "commit": "65c53dbe4f2140236590a7568a5f22a77d16be39" },
@ -43,14 +45,18 @@
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" },
"tokyonight.nvim": { "branch": "main", "commit": "30d7be361a7fbf187a881f17e574e9213d5108ea" },
"tree-sitter-nu": { "branch": "main", "commit": "0bb9a602d9bc94b66fab96ce51d46a5a227ab76c" },
"tree-sitter-templ": { "branch": "master", "commit": "cf84ea53e2e2531f23009d676ac206090c1e2392" },
"tree-sitter-templ": { "branch": "master", "commit": "a4f14aa248b84df73cc1c00bf06edac8d7c96acd" },
"treesj": { "branch": "main", "commit": "f98deb33805485b56a8d44d1a27d16874af00d7f" },
"trouble.nvim": { "branch": "main", "commit": "2d8610a07033f2b367e71230ab128f8b89c2639d" },
"trouble.nvim": { "branch": "main", "commit": "e5d0e04121c662ce29190a57dd03655d43c59d44" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "8c9051c1cfc73fcf5bfe9a84db7097e4f7c0180d" },
"vim-dadbod-ui": { "branch": "master", "commit": "2527310098e7458488e61a528614da142aa2dc42" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" },
"zenbones.nvim": { "branch": "main", "commit": "e9ba8305f65524f9355515cdd8704b2c6ba2def6" }
}

View File

@ -16,3 +16,11 @@ vim.api.nvim_create_autocmd('BufWritePre', {
group = vim.api.nvim_create_augroup('BufWriteFormat', { clear = true }),
pattern = { '*.go', '*.lua', '*.rs' },
})
vim.api.nvim_create_autocmd('ColorScheme', {
desc = 'Change feline theme',
group = vim.api.nvim_create_augroup('ChangeFelineTheme', { clear = true }),
callback = function()
require('feline').use_theme(vim.o.background)
end,
})

View File

@ -0,0 +1,15 @@
local M = {}
function M.terminalbg()
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if ok then
for line in lines do
if string.find(line, 'light.toml') then
return "light"
end
end
end
return "dark"
end
return M

View File

@ -1,26 +1,15 @@
local function terminalbg()
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if ok then
for line in lines do
if string.find(line, 'light.toml') then
return "light"
end
end
end
return "dark"
end
return {
{
-- Colorscheme
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
'zenbones-theme/zenbones.nvim',
dependencies = { 'rktjmp/lush.nvim' },
config = function()
vim.o.background = terminalbg()
vim.cmd.colorscheme('tokyonight')
vim.o.background = require('lupan.utils').terminalbg()
vim.cmd.colorscheme('zenbones')
end,
},
"slugbyte/lackluster.nvim",
"folke/tokyonight.nvim",
{
-- Indentation guides (see `:help indent_blankline.txt`)
'lukas-reineke/indent-blankline.nvim',

View File

@ -68,5 +68,11 @@ return {
{ name = 'path' },
},
}
cmp.setup.filetype('sql', {
sources = {
{ name = 'vim-dadbod-completion' },
{ name = 'buffer' },
},
})
end,
}

View File

@ -1,14 +1,18 @@
vim.keymap.set({ "n", "v" }, "mm", "<cmd>BookmarksMark<cr>", { desc = "Mark current line into active BookmarkList." })
vim.keymap.set({ "n", "v" }, "mo", "<cmd>BookmarksGoto<cr>", { desc = "Go to bookmark at current active BookmarkList" })
vim.keymap.set({ "n", "v" }, "ma", "<cmd>BookmarksCommands<cr>", { desc = "Find and trigger a bookmark command." })
vim.keymap.set({ "n", "v" }, "mg", "<cmd>BookmarksGotoRecent<cr>", { desc = "Go to latest visited/created Bookmark" })
vim.keymap.set({ "n", "v" }, "ms", "<cmd>BookmarksSetActiveList<cr>", { desc = "Go to latest visited/created Bookmark" })
return {
"LintaoAmons/bookmarks.nvim",
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
dependencies = {
{ "nvim-telescope/telescope.nvim" },
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
}
{
"LintaoAmons/bookmarks.nvim",
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
dependencies = {
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
},
event = 'VimEnter',
keys = {
{ "mm", "<cmd>BookmarksMark<cr>", mode = { "n", "v" }, desc = "Mark current line into active BookmarkList." },
{ "mo", "<cmd>BookmarksGoto<cr>", mode = { "n", "v" }, desc = "Go to bookmark at current active BookmarkList" },
{ "ma", "<cmd>BookmarksCommands<cr>", mode = { "n", "v" }, desc = "Find and trigger a bookmark command." },
{ "mg", "<cmd>BookmarksGotoRecent<cr>", mode = { "n", "v" }, desc = "Go to latest visited/created Bookmark" },
{ "ms", "<cmd>BookmarksSetActiveList<cr>", mode = { "n", "v" }, desc = "Go to latest visited/created Bookmark" },
},
},
{ "nvim-telescope/telescope.nvim", lazy = true },
}

View File

@ -2,8 +2,8 @@ return {
{
'folke/which-key.nvim',
event = 'VimEnter',
config = function()
require('which-key').setup()
config = function(_, opts)
require('which-key').setup(opts)
-- Document existing key chains
require('which-key').register {
@ -18,8 +18,8 @@ return {
},
{
"max397574/better-escape.nvim",
config = function()
require("better_escape").setup()
config = function(_, opts)
require("better_escape").setup(opts)
end,
},
}

View File

@ -15,8 +15,8 @@ return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({})
config = function(_, opts)
require("nvim-surround").setup(opts)
end
},
}

View File

@ -1,19 +1,41 @@
local function feline_config(_, opts)
local theme = {
bg = '#394b70',
black = '#1d202f',
skyblue = '#7aa2f7',
cyan = '#0db9d7',
fg = '#c0caf5',
green = '#1abc9c',
oceanblue = '#3d59a1',
magenta = '#bb9af7',
orange = '#ff9e64',
red = '#f7768e',
violet = '#9d7cd8',
white = '#a9b1d6',
yellow = '#e0af68',
local feline = require('feline')
local dark_theme = {
bg = '#615853',
bg2 = '#352f2d',
black = '#403833',
skyblue = '#61abda',
cyan = '#65b8c1',
fg = '#b4bdc3',
green = '#8bae68',
oceanblue = '#6099c0',
magenta = '#cf86c1',
orange = '#d68c67',
red = '#e8838f',
violet = '#b279a7',
white = '#b4bdc3',
yellow = '#b77e64',
}
feline.add_theme('dark', dark_theme)
local light_theme = {
bg = '#e1dcd9',
bg2 = '#d6cdc9',
black = '#c4b6af',
skyblue = '#1d5573',
cyan = '#2b747c',
fg = '#2c363c',
green = '#3f5a22',
oceanblue = '#286486',
magenta = '#7b3b70',
orange = '#803d1c',
red = '#94253e',
violet = '#88507d',
white = '#4f5e68',
yellow = '#944927',
}
feline.add_theme('light', light_theme)
local statusline = require('arrow.statusline')
local vimode = require('feline.providers.vi_mode')
@ -24,7 +46,7 @@ local function feline_config(_, opts)
return {
name = vimode.get_mode_highlight_name(),
fg = vimode.get_mode_color(),
bg = theme.fg,
bg = 'bg2',
style = 'bold',
}
end,
@ -32,21 +54,21 @@ local function feline_config(_, opts)
str = ' █',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
},
right_sep = {
str = '',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
}
},
file_info = {
provider = 'file_info',
hl = {
fg = theme.fg,
fg = 'fg',
},
left_sep = {
str = ' ',
@ -58,122 +80,123 @@ local function feline_config(_, opts)
arrow = {
provider = function() return statusline.text_for_statusline_with_icons() end,
hl = {
fg = theme.red,
fg = 'red',
style = 'bold',
},
},
file_size = {
provider = 'file_size',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = ' █',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
},
},
line_percentage = {
provider = 'line_percentage',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = '',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
},
},
right_sep = {
str = '',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
},
},
},
position = {
provider = 'position',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
right_sep = {
str = '█ ',
always_visible = true,
hl = {
fg = theme.fg,
fg = 'bg2',
},
}
},
diagnostic_errors = {
provider = 'diagnostic_errors',
hl = {
fg = theme.red,
fg = 'red',
},
},
diagnostic_warnings = {
provider = 'diagnostic_warnings',
hl = {
fg = theme.yellow,
},
},
diagnostic_info = {
provider = 'diagnostic_info',
hl = {
fg = theme.green,
fg = 'yellow',
},
},
diagnostic_hints = {
provider = 'diagnostic_hints',
hl = {
fg = theme.blue,
fg = 'cyan',
},
},
diagnostic_info = {
provider = 'diagnostic_info',
hl = {
fg = 'skyblue',
},
},
git_diff_added = {
provider = 'git_diff_added',
hl = {
fg = theme.green,
fg = 'green',
},
},
git_diff_removed = {
provider = 'git_diff_removed',
hl = {
fg = theme.red,
fg = 'red',
},
},
git_diff_changed = {
provider = 'git_diff_changed',
hl = {
fg = theme.yellow,
fg = 'yellow',
},
},
git_branch = {
provider = 'git_branch',
hl = {
fg = theme.bg,
bg = theme.fg,
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = ' █',
hl = {
fg = theme.fg,
fg = 'bg2',
},
},
right_sep = {
str = '',
hl = {
fg = theme.fg,
fg = 'bg2',
},
}
},
@ -208,9 +231,8 @@ local function feline_config(_, opts)
}
opts.components = { active = active, inactive = inactive }
local feline = require('feline')
feline.setup(opts)
feline.use_theme(theme)
feline.use_theme(require('lupan.utils').terminalbg())
end
return {

View File

@ -7,24 +7,37 @@ return {
'sindrets/diffview.nvim',
'nvim-telescope/telescope.nvim',
},
config = function()
local neogit = require('neogit')
neogit.setup()
vim.keymap.set('n', '<leader>go', neogit.open, { desc = 'Neo[g]it [O]pen' })
vim.keymap.set('n', '<leader>g.', function() neogit.open({ cwd = '%:p:h' }) end,
{ desc = 'Neo[g]it open in current file repository' })
local diffview = require('diffview')
vim.keymap.set('n', '<leader>gh', diffview.file_history, { desc = '[G]it [H]istory' })
vim.keymap.set('n', '<leader>g%', function() diffview.file_history(nil, { '%' }) end,
{ desc = '[G]it history for [%] current file' })
end
opts = {
graph_style = 'unicode',
use_per_project_settings = false,
},
keys = {
{
'<leader>go',
function() require('neogit').open() end,
desc = 'Neo[g]it [O]pen'
},
{
'<leader>g.',
function() require('neogit').open({ cwd = '%:p:h' }) end,
desc = 'Neo[g]it open in current file repository'
},
{
'<leader>gh',
function() require('diffview').file_history() end,
desc = '[G]it [H]istory',
},
{
'<leader>g%',
function() require('diffview').file_history(nil, { '%' }) end,
desc = '[G]it history for [%] current file'
},
},
},
{
'FabijanZulj/blame.nvim',
config = function()
require('blame').setup()
end,
config = true,
cmd = 'BlameToggle',
keys = {
{ '<leader>gb', '<cmd>BlameToggle<cr>', desc = '[G]it [B]lame toggle' },

View File

@ -5,8 +5,8 @@ return {
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("go").setup()
config = function(_, opts)
require("go").setup(opts)
end,
event = { "CmdlineEnter" },
ft = { "go", 'gomod' },

View File

@ -10,14 +10,13 @@ return {
opts = {
safe_labels = {},
},
config = function()
vim.keymap.set({ 'n', 'x', 'o' }, 'gs', '<Plug>(leap)')
vim.keymap.set({ 'n', 'x', 'o' }, 'gS', '<Plug>(leap-from-window)')
end,
dependencies = {
"tpope/vim-repeat",
},
lazy = false,
keys = {
{ 'gs', '<Plug>(leap)', mode = { 'n', 'x', 'o' } },
{ 'gS', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' } },
}
},
{
@ -28,26 +27,25 @@ return {
{
'stevearc/oil.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function(opts)
require("oil").setup({
default_file_explorer = true,
delete_to_trash = true,
})
vim.keymap.set("n", "-", "<cmd>Oil<CR>", { desc = "Open parent directory" })
end
opts = {
default_file_explorer = true,
delete_to_trash = true,
},
keys = {
{ "-", "<cmd>Oil<CR>", desc = "Open parent directory" },
},
},
{
'Wansmer/treesj',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
config = function()
local tsj = require('treesj')
tsj.setup({
use_default_keymaps = false,
})
vim.keymap.set('n', '<leader>tg', tsj.toggle, { desc = "[T]ree to[g]gle one-line" })
vim.keymap.set('n', '<leader>tj', tsj.join, { desc = "[T]ree [J]oin one-line" })
vim.keymap.set('n', '<leader>ts', tsj.split, { desc = "[T]ree [S]plit one-line" })
end,
opts = {
use_default_keymaps = false,
},
keys = {
{ '<leader>tg', function() require('treesj').toggle() end, desc = "[T]ree to[g]gle one-line" },
{ '<leader>tj', function() require('treesj').join() end, desc = "[T]ree [J]oin one-line" },
{ '<leader>ts', function() require('treesj').split() end, desc = "[T]ree [S]plit one-line" },
},
},
}

View File

@ -126,10 +126,11 @@ return {
'nvim-treesitter/nvim-treesitter',
'nvim-tree/nvim-web-devicons',
},
config = function()
require('lspsaga').setup({
lightbulb = { enable = false }
})
opts = {
lightbulb = { enable = false }
},
config = function(_, opts)
require('lspsaga').setup(opts)
vim.keymap.set('n', '<leader>la', '<cmd>Lspsaga code_action<CR>', { desc = "[L]spsaga code [A]ction" })
vim.keymap.set('n', '<leader>lb', '<cmd>Lspsaga show_buf_diagnostics<CR>',
{ desc = "[L]spsaga [B]uffer diagnostics" })

View File

@ -1,18 +1,15 @@
return {
"olimorris/persisted.nvim",
lazy = false, -- make sure the plugin is always loaded at startup
config = function()
require("persisted").setup({
autoload = true,
ignored_dirs = {
"~/.config",
"~/tmp",
"/tmp",
{ "/", exact = true },
},
})
require("telescope").load_extension("persisted")
end,
opts = {
autoload = true,
ignored_dirs = {
"~/.config",
"~/tmp",
"/tmp",
{ "/", exact = true },
},
},
keys = {
{ "<leader>sp", "<cmd>:Telescope persisted<cr>", desc = "Search [P]ersisted" },
},

View File

@ -0,0 +1,17 @@
return {
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}

View File

@ -54,6 +54,7 @@ return {
pcall(telescope.load_extension, 'ui-select')
pcall(telescope.load_extension, 'whaler')
pcall(telescope.load_extension, 'git_grep')
pcall(telescope.load_extension, 'persisted')
-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'

View File

@ -10,3 +10,7 @@ PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ '
function before_command() { echo -ne '\e[2 q'; }
trap before_command DEBUG
if [[ -f /usr/share/bash-completion/bash_completion ]]; then
. /usr/share/bash-completion/bash_completion
fi

View File

@ -1,7 +1,7 @@
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 q\2\e[31m[+]\e[0m \2
set vi-cmd-mode-string \1\e[2 q\2\e[32m[:]\e[0m \2
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
set keymap vi-command
"k": history-substring-search-backward

View File

@ -2,6 +2,9 @@
imv = [
{ run = 'imv "$@"', orphan = true },
]
zathura = [
{ run = 'zathura "$@"', orphan = true },
]
nvim_cd = [
{ run = 'nvim -c "cd $@"', block = true }
]
@ -9,5 +12,6 @@ nvim_cd = [
[open]
prepend_rules = [
{ mime = "image/*", use = "imv" },
{ mime = "application/pdf", use = "zathura" },
{ mime = "inode/directory", use = "nvim_cd" }
]