feat!(nvim): change from packer to lazy.nvim, refactor

This commit is contained in:
winston 2022-12-22 00:13:52 +01:00
parent 9685d17967
commit 59aee37330
Signed by: winston
GPG key ID: 3786770EDBC2B481
22 changed files with 520 additions and 624 deletions

View file

@ -5,12 +5,6 @@
url: "https://raw.githubusercontent.com/zsh-users/antigen/master/bin/antigen.zsh"
refreshPeriod: 168h
# neovim packer
.local/share/nvim/site/pack/packer/start/packer.nvim:
type: git-repo
url: "https://github.com/wbthomason/packer.nvim"
refreshPeriod: 168h
# tmux plugin manager
.config/tmux/plugins/tpm:
type: git-repo

View file

@ -0,0 +1,46 @@
require("bufferline").setup({
highlights = require("catppuccin.groups.integrations.bufferline").get(),
options = {
show_close_icon = false,
separator_style = "thin",
show_buffer_close_icons = false,
offsets = { { filetype = "NvimTree" } },
left_mouse_command = "buffer %d",
middle_mouse_command = "bdelete! %d",
right_mouse_command = nil,
},
})
local nmap = function(key, cmd)
vim.api.nvim_set_keymap("n", key, cmd, { noremap = true, silent = true })
end
-- hop between buffers in order of the bar
nmap("<A-,>", "<Cmd>BufferLineCyclePrev<CR>")
nmap("<A-.>", "<Cmd>BufferLineCycleNext<CR>")
-- Re-order to previous/next
nmap("<A-<>", "<Cmd>BufferLineMovePrev<CR>")
nmap("<A->>", "<Cmd>BufferLineMoveNext<CR>")
-- Goto buffer in position...
nmap("<A-1>", "<Cmd>BufferLineGoToBuffer 1<CR>")
nmap("<A-2>", "<Cmd>BufferLineGoToBuffer 2<CR>")
nmap("<A-3>", "<Cmd>BufferLineGoToBuffer 3<CR>")
nmap("<A-4>", "<Cmd>BufferLineGoToBuffer 4<CR>")
nmap("<A-5>", "<Cmd>BufferLineGoToBuffer 5<CR>")
nmap("<A-6>", "<Cmd>BufferLineGoToBuffer 6<CR>")
nmap("<A-7>", "<Cmd>BufferLineGoToBuffer 7<CR>")
nmap("<A-8>", "<Cmd>BufferLineGoToBuffer 8<CR>")
nmap("<A-9>", "<Cmd>BufferLineGoToBuffer 9<CR>")
nmap("<A-0>", "<Cmd>BufferLineGoToBuffer -1<CR>")
-- Pin/unpin buffer
nmap("<A-p>", "<Cmd>BufferLineTogglePin<CR>")
-- Close buffer
nmap("<A-x>", "<Cmd>bdelete<CR>")
nmap("<A-X>", "<Cmd>bdelete!<CR>")
-- create new buffer
nmap("<A-c>", "<Cmd>enew<CR>")
-- pick buffer
nmap("<A-space>", "<Cmd>BufferLinePick<CR>")
-- Sort automatically by...
nmap("<Space>bd", "<Cmd>BufferLineSortByDirectory<CR>")
nmap("<Space>bl", "<Cmd>BufferLineSortByExtension<CR>")

View file

@ -32,12 +32,10 @@ require("catppuccin").setup({
lsp_saga = true,
lsp_trouble = true,
nvimtree = {
enabled = false,
enabled = true,
},
neotree = {
enabled = true,
show_root = false,
transparent_panel = false,
enabled = false,
},
which_key = true,
indent_blankline = {
@ -100,7 +98,7 @@ require("catppuccin").setup({
mantle = "#020202",
},
},
transparent_background = false,
transparent_background = true,
})
vim.api.nvim_command("colorscheme catppuccin")

View file

@ -17,7 +17,6 @@ require("colorizer").setup({
buftypes = {
"*",
"!dashboard",
"!packer",
"!popup",
"!prompt",
},

View file

@ -24,14 +24,3 @@ require("copilot").setup({
copilot_node_command = "node",
server_opts_overrides = {},
})
-- local present, cmp = pcall(require, "cmp")
-- if not present or not cmp then
-- return
-- end
-- cmp.event:on("menu_opened", function()
-- vim.b.copilot_suggestion_hidden = true
-- end)
-- cmp.event:on("menu_closed", function()
-- vim.b.copilot_suggestion_hidden = false
-- end)

View file

@ -1,4 +1,7 @@
local db = require("dashboard")
local present, db = pcall(require, "dashboard")
if not present then
return
end
db.custom_header = function()
local cringe = {
@ -8,27 +11,27 @@ db.custom_header = function()
}
local random_cringe = cringe[math.random(#cringe)]
return {
[[╭──────────────────────────────────────────────────╮]],
[[⠀⠀⠀⠀⠀⠀⡏⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣄⢧⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠘⣄⠀⠀⠀⠀⢹⣦⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠘⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡄⠀⠀⠀⠈⠙⣧⡀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⠀⠀⠀⠀⢸⡼⣇⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⢿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠖⠀⠀⡸⠀⠀⠀⡟⠈⠃⣿⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⢺⡇⠀⠀⠀⠀⠀⠀⣀⣶⣶⠀⠀⠀⠀⠀⣠⣶⣶⣶⣶⣦⣤⣀⣀⣤⡶⠶⠶⠶⡇⠀⠀⣼⣿⣶⠀⣿⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠈⣷⠀⠀⠀⣠⣾⣿⣿⣿⣿⢿⠀⠀⠀⠘⢻⠙⠛⠒⠛⠛⢉⣩⠁⠀⠀⢀⡄⠀⡇⠀⢀⣿⡿⠛⠀⣿⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠘⣆⠀⠈⠉⠁⣉⣉⣃⠞⣠⠀⠀⠀⠀⠀⠀⠀⠈⠙⠛⠉⠁⠀⠀⠀⡾⠀⡀⠁⠀⠈⣿⠁⠀⣸⠇⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⠐⠀⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⣦⢱⠀⠀⠀⢿⣀⣠⠏⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⠀⠀⣰⡾⠃⠀⠀⠀⠀⠀⣀⣠⡿⠀⠀⣤⣄⡀⠀⠀⠀⠸⣄⠀⠀⠀⢳⡝⢯⡀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡀⠀⠀⠀⣰⡟⠑⠦⠴⣤⣤⣤⣾⡛⠁⠀⠀⠀⠀⠈⢷⠀⠀⠀⠀⢿⡄⠀⠀⠀⣿⡆⠙⣆⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⣿⠀⠀⢠⣤⣤⣄⢉⣨⣥⣶⠶⢶⣾⠶⠂⠘⠦⢤⣤⣠⡾⠃⠀⠀⠀⣿⠀⠀⠘⣦⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣇⠀⣀⠀⠈⠀⠐⢿⣏⠉⠉⠉⢉⣁⣠⡶⠟⠁⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⣠⣾⡟⠀⠀⠀⠘⢧⣀⡀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⠈⠀⠂⠀⠀⠀⠈⠉⢉⣉⣩⡭⠓⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⡿⠀⠀⠀⠀⠀⠀⠉⠉⠑⠒]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠱⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣨⠟⠀⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡴⠋⠀⠀⡠⠇⢠⣀⠀⠀⠀⠀⠀⠀⠠⠐⠂⠀⠀⢀⣠⣼⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⣀⣀⡠⠤⠶⠛⠁⠀⠀⠀⠈⠀⠀⠀⠛⢷⣤⣀⣀⠀⠀⠀⠀⢀⣠⣴⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⣤⠞⠋⠉⠀⡀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⣤⣄⠘⣿⣿⣟⠛⠿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[╰──────────────────────────────────────────────────╯]],
[[╔══════════════════════════════════════════════════╗]],
[[⠀⠀⠀⠀⠀⠀⡏⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣄⢧⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠘⣄⠀⠀⠀⠀⢹⣦⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠘⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡄⠀⠀⠀⠈⠙⣧⡀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⠀⠀⠀⠀⢸⡼⣇⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⢿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠖⠀⠀⡸⠀⠀⠀⡟⠈⠃⣿⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⢺⡇⠀⠀⠀⠀⠀⠀⣀⣶⣶⠀⠀⠀⠀⠀⣠⣶⣶⣶⣶⣦⣤⣀⣀⣤⡶⠶⠶⠶⡇⠀⠀⣼⣿⣶⠀⣿⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠈⣷⠀⠀⠀⣠⣾⣿⣿⣿⣿⢿⠀⠀⠀⠘⢻⠙⠛⠒⠛⠛⢉⣩⠁⠀⠀⢀⡄⠀⡇⠀⢀⣿⡿⠛⠀⣿⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠘⣆⠀⠈⠉⠁⣉⣉⣃⠞⣠⠀⠀⠀⠀⠀⠀⠀⠈⠙⠛⠉⠁⠀⠀⠀⡾⠀⡀⠁⠀⠈⣿⠁⠀⣸⠇⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⠐⠀⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⣦⢱⠀⠀⠀⢿⣀⣠⠏⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⠀⠀⣰⡾⠃⠀⠀⠀⠀⠀⣀⣠⡿⠀⠀⣤⣄⡀⠀⠀⠀⠸⣄⠀⠀⠀⢳⡝⢯⡀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡀⠀⠀⠀⣰⡟⠑⠦⠴⣤⣤⣤⣾⡛⠁⠀⠀⠀⠀⠈⢷⠀⠀⠀⠀⢿⡄⠀⠀⠀⣿⡆⠙⣆⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⣿⠀⠀⢠⣤⣤⣄⢉⣨⣥⣶⠶⢶⣾⠶⠂⠘⠦⢤⣤⣠⡾⠃⠀⠀⠀⣿⠀⠀⠘⣦⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣇⠀⣀⠀⠈⠀⠐⢿⣏⠉⠉⠉⢉⣁⣠⡶⠟⠁⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⣠⣾⡟⠀⠀⠀⠘⢧⣀⡀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⠈⠀⠂⠀⠀⠀⠈⠉⢉⣉⣩⡭⠓⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⡿⠀⠀⠀⠀⠀⠀⠉⠉⠑⠒]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠱⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣨⠟⠀⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡴⠋⠀⠀⡠⠇⢠⣀⠀⠀⠀⠀⠀⠀⠠⠐⠂⠀⠀⢀⣠⣼⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⣀⣀⡠⠤⠶⠛⠁⠀⠀⠀⠈⠀⠀⠀⠛⢷⣤⣀⣀⠀⠀⠀⠀⢀⣠⣴⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⣤⠞⠋⠉⠀⡀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⣤⣄⠘⣿⣿⣟⠛⠿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[╚══════════════════════════════════════════════════╝]],
random_cringe,
}
end
@ -77,10 +80,8 @@ db.custom_center = {
db.custom_footer = function()
local v = vim.version()
local vStr = string.format("%d.%d.%d", v.major, v.minor, v.patch)
local plugCount = #vim.tbl_keys(packer_plugins)
return {
"masochism " .. vStr,
plugCount .. " regrets",
}
end

View file

@ -0,0 +1,50 @@
local ctp_present, clrs = pcall(require, "catppuccin.palettes")
local _, ctp_feline = pcall(require, "catppuccin.groups.integrations.feline")
local present, feline = pcall(require, "feline")
if not present then
return
end
if ctp_present then
clrs = clrs.get_palette("catppuccin")
ctp_feline.setup({
assets = {
left_separator = "",
right_separator = "",
bar = "",
mode_icon = "",
dir = "",
file = "",
git = {
branch = "",
},
},
sett = {
show_modified = true,
curr_dir = clrs.mauve,
curr_file = clrs.blue,
bkg = clrs.crust,
},
mode_colors = {
["n"] = { "NORMAL", clrs.blue },
},
})
end
feline.setup({
components = ctp_feline.get(),
force_inactive = {
filetypes = {
"^startify$",
"^fugitive$",
"^fugitiveblame$",
"^qf$",
"^help$",
},
buftypes = {
"^terminal$",
},
bufnames = {},
},
})

View file

@ -1,9 +1,12 @@
local wk = require("which-key")
local p1, wk = pcall(require, "which-key")
local p2, gs = pcall(require, "gitsigns")
require("gitsigns").setup({
if not (p1 and p2) then
return
end
gs.setup({
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
-- Gitsigns
wk.register({
["<leader>h"] = {

View file

@ -0,0 +1,11 @@
require("indent_blankline").setup({
space_char_blankline = " ",
})
vim.g.indent_blankline_filetype_exclude = {
"dashboard",
"help",
"neogitstatus",
"fugitive",
"NvimTree",
"Trouble",
}

View file

@ -25,10 +25,10 @@ local has_words_before = function()
---@diagnostic disable-next-line: deprecated
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
== nil
end

View file

@ -0,0 +1,23 @@
local saga = require("lspsaga")
saga.init_lsp_saga({
code_action_lightbulb = {
enable = false,
},
})
local nmap = function(key, cmd)
vim.api.nvim_set_keymap("n", key, cmd, { noremap = true, silent = true })
end
nmap("gr", "<cmd>Lspsaga rename<cr>")
nmap("gx", "<cmd>Lspsaga code_action<cr>")
nmap("gx", ":<c-u>Lspsaga range_code_action<cr>")
nmap("K", "<cmd>Lspsaga hover_doc<cr>")
nmap("go", "<cmd>Lspsaga show_line_diagnostics<cr>")
nmap("gj", "<cmd>Lspsaga diagnostic_jump_next<cr>")
nmap("gk", "<cmd>Lspsaga diagnostic_jump_prev<cr>")
vim.cmd([[
nnoremap <silent> <A-d> <cmd>lua require('lspsaga.floaterm').open_float_terminal()<CR>
tnoremap <silent> <A-d> <C-\><C-n>:lua require('lspsaga.floaterm').close_float_terminal()<CR>
]])

View file

@ -1,3 +1,9 @@
local present, presence = pcall(require, "presence")
if not present then
return
end
function string.starts(self, str)
return self:find("^" .. str) ~= nil
end
@ -10,11 +16,14 @@ local blacklist = {
}
local function get_chezmoi_output()
local sp = io.popen("chezmoi managed -i files")
local sp, err = io.popen("chemoi managed -i files -pa")
if err then
return nil
end
if sp then
local files = {}
for line in sp:lines() do
table.insert(files, vim.fn.expand("$HOME") .. "/" .. line)
table.insert(files, line)
end
sp:close()
return files
@ -23,7 +32,7 @@ end
local chezmoi_managed = get_chezmoi_output()
local conceal = function()
local conceal = function(activity, info)
local cur_file = vim.fn.expand("%:p")
if vim.tbl_contains(chezmoi_managed, cur_file) then
return "Managing dotfiles"
@ -33,13 +42,15 @@ local conceal = function()
return v
end
end
return false
if info ~= nil then
return activity .. " " .. info
end
end
local v = vim.version()
local vStr = string.format("v%d.%d.%d", v.major, v.minor, v.patch)
require("presence"):setup({
presence:setup({
-- General options
auto_update = true,
debounce_timeout = 10,
@ -49,39 +60,12 @@ require("presence"):setup({
show_time = false,
-- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
---@diagnostic disable-next-line: unused-local
buttons = function(buffer, repo_url)
-- ignore where no repo_url is set
if repo_url == nil then
return false
end
-- only show certain org/user repos, don't leak clients or work
local visible_urls = {
"github.com/catppuccin",
"github.com/farbenfroh",
"github.com/nekowinston",
}
-- check if repo_url is in the list of visible urls
for _, visible_url in ipairs(visible_urls) do
if repo_url:find(visible_url) then
return {
{
label = "Steal the code",
url = repo_url,
},
}
end
end
-- if not, make funni
return {
{
label = "Steal the code",
url = "https://winston.sh/rrproductions/studio.git",
},
}
end,
buttons = {
{
label = "Steal the code",
url = "https://git.winston.sh/winston/holy-grail.git",
},
},
file_assets = {
["k8s.yaml"] = {
"Kubernetes",
@ -110,25 +94,13 @@ require("presence"):setup({
},
-- Rich Presence text options
editing_text = function(s)
local concealed = conceal()
if concealed then
return concealed
end
return "Editing " .. s
return conceal("Editing", s)
end,
reading_text = function(s)
local concealed = conceal()
if concealed then
return concealed
end
return "Reading " .. s
return conceal("Reading", s)
end,
file_explorer_text = function(s)
local concealed = conceal()
if concealed then
return concealed
end
return "Browsing " .. s
return conceal("Browsing", s)
end,
workspace_text = function(s)
local concealed = conceal()

View file

@ -21,7 +21,7 @@ easypick.setup({
pickers = {
{
name = "chezmoi",
command = [[chezmoi managed -x encrypted -i files | awk '{ printf("%s/%s\n", "~", $0) }']],
command = [[chezmoi managed -ifiles -pabsolute -xencrypted]],
previewer = easypick.previewers.default()
},
}

View file

@ -1,7 +1,6 @@
require("nvim-treesitter.configs").setup({
auto_install = true,
ignore_install = {
-- woulnd't install sometimes, not needed
"phpdoc",
},
highlight = {

View file

@ -16,12 +16,13 @@ wk.setup({
wk.register({
["<leader>f"] = {
name = "+Telescope",
d = { "<cmd>Telescope find_files<cr>", "Find File" },
r = { "<cmd>Telescope asynctasks all<cr>", "Run Asynctasks" },
b = { "<cmd>Telescope file_browser<cr>", "File Browser" },
c = { "<cmd>Easypick chezmoi<cr>", "Chezmoi" },
d = { "<cmd>Telescope find_files<cr>", "Find File" },
g = { "<cmd>Telescope live_grep<cr>", "Live Grep" },
h = { "<cmd>Telescope help_tags<cr>", "Help Tags" },
p = { "<cmd>Telescope project<cr>", "Project" },
r = { "<cmd>Telescope asynctasks all<cr>", "Run Asynctasks" },
s = {
function()
local confpath = vim.fn.resolve(vim.fn.stdpath("config"))
@ -37,6 +38,10 @@ wk.register({
["<leader>"] = {
y = { '"+y', "Copy to clipboard" },
p = { '"+p', "Paste from clipboard" },
db = { "<cmd>DBUIToggle<cr>", "Toggle DBUI" },
gd = { "<cmd>Gvdiff!<CR>", "Git Diff" },
ng = { "<cmd>Neogit<cr>", "Neogit" },
sl = { "<cmd>SessionLoad<cr>", "Load Session" },
},
}, { mode = { "n", "v" } })

View file

@ -1,15 +1,15 @@
-- vim:fdm=marker
pcall(require, "impatient")
pcall(require, "plugins")
pcall(require, "lsp")
vim.g.mapleader = " "
-- netrw is handled by nvim-tree
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- true colors
vim.o.termguicolors = true
-- map leader to space
vim.g.mapleader = " "
vim.o.cmdheight = 0
-- line numbers
vim.o.mouse = ""
vim.o.mouse = "nv"
vim.o.number = true
vim.o.relativenumber = true
-- scroll offsets
@ -30,81 +30,14 @@ vim.o.splitright = true
vim.o.wrap = false
-- redefine word boundaries - '_' is a word seperator, this helps with snake_case
vim.opt.iskeyword:remove("_")
-- netrw is handled by nvim-tree
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
function Map(mode, shortcut, command, opt)
opt = opt or { noremap = true, silent = true }
vim.keymap.set(mode, shortcut, command, opt)
end
-- easier split navigation
Map("n", "<C-J>", "<C-W>j")
Map("n", "<C-K>", "<C-W>k")
Map("n", "<C-L>", "<C-W>l")
Map("n", "<C-H>", "<C-W>h")
Map("n", "<C-W>\\", ":vsplit<CR>")
Map("n", "<C-W>-", ":split<CR>")
Map("n", "<C-W>x", ":q<CR>")
-- merge conflicts
Map("n", "<leader>gd", ":Gvdiff!<CR>")
Map("n", "gd", ":diffget")
Map("n", "gdh", ":diffget //2<CR>")
Map("n", "gdl", ":diffget //3<CR>")
-- clipboard
Map({ "n", "v" }, "<leader>p", '"+p')
Map({ "n", "v" }, "<leader>y", '"+y')
-- escape :terminal easier
vim.cmd([[tnoremap <Esc> <C-\><C-n>]])
-- indentations settings
vim.o.shiftwidth = 2
vim.o.tabstop = 2
vim.o.softtabstop = 0
vim.o.expandtab = true
vim.cmd([[
autocmd FileType html,lua,css,js,jsreact,ts,tsreact,json,yaml setlocal ts=2 sw=2 sts=0 et
autocmd FileType go setlocal ts=4 sw=4 sts=4 noet
autocmd FileType python,rust setlocal ts=4 sw=4 sts=4 et
autocmd FileType markdown let g:table_mode_corner='|'
]])
local builtins = {
"2html_plugin",
"bugreport",
"compiler",
"ftplugin",
"fzf",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"matchit",
"netrw",
"netrwFileHandlers",
"netrwPlugin",
"netrwSettings",
"optwin",
"rplugin",
"rrhelper",
"spellfile_plugin",
"synmenu",
"syntax",
"tar",
"tarPlugin",
"tutor",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
}
-- disable builtin plugins
for _, plugin in pairs(builtins) do
vim.g["loaded_" .. plugin] = 1
end
pcall(require, "plugins")
pcall(require, "binds")
vim.api.nvim_create_autocmd("VimResized", {
pattern = "*",

View file

@ -0,0 +1,70 @@
{
"Comment.nvim": { "branch": "master", "commit": "5f01c1a89adafc52bf34e3bf690f80d9d726715d" },
"asyncrun.vim": { "branch": "master", "commit": "ea59f760c223100edcffc52ffe019f502a792039" },
"asynctasks.vim": { "branch": "master", "commit": "784a4b1f75a913cc6c43dd6c4dbe69d648dbbfa5" },
"bufferline.nvim": { "branch": "main", "commit": "4ecfa81e470a589e74adcde3d5bb1727dd407363" },
"catppuccin": { "branch": "main", "commit": "55f43a952856bc0029e6cef066297c6cfab3451d" },
"chezmoi.vim": { "branch": "main", "commit": "df01e4108be9f2e4092cd753ebfb46d04e6e47ce" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
"cmp-git": { "branch": "main", "commit": "fae6cdb407ad6c63a0b1928670bad1a67a55b887" },
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"copilot.lua": { "branch": "master", "commit": "81eb5d1bc2eddad5ff0b4e3c1c4be5c09bdfaa63" },
"easypick.nvim": { "branch": "main", "commit": "08390110ef1ceb15507a98c2dc984880890b5810" },
"editorconfig.nvim": { "branch": "master", "commit": "2af880947129f1ab776b732a4eecb92528472ef5" },
"feline.nvim": { "branch": "master", "commit": "573e6d1e213de976256c84e1cb2f55665549b828" },
"fidget.nvim": { "branch": "main", "commit": "44585a0c0085765195e6961c15529ba6c5a2a13b" },
"friendly-snippets": { "branch": "main", "commit": "1a6a02350568d6830bcfa167c72f9b6e75e454ae" },
"gitsigns.nvim": { "branch": "main", "commit": "2ab3bdf0a40bab53033048c6be75bda86316b55d" },
"go.nvim": { "branch": "master", "commit": "5cefc346e7f3955b90a7d53157e5db6b9258c510" },
"guihua.lua": { "branch": "master", "commit": "2f8939599ef04057dee6504724a2ff04fe12d758" },
"impatient.nvim": { "branch": "main", "commit": "9f7eed8133d62457f7ad2ca250eb9b837a4adeb7" },
"indent-blankline.nvim": { "branch": "master", "commit": "c4c203c3e8a595bc333abaf168fcb10c13ed5fb7" },
"lazy.nvim": { "branch": "main", "commit": "fd1fbefc3df2b8e92209ed932144edc49877c41e" },
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
"lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
"lspsaga.nvim": { "branch": "main", "commit": "b7b4777369b441341b2dcd45c738ea4167c11c9e" },
"ltex-extra.nvim": { "branch": "master", "commit": "c5046a6eabfee378f781029323efd941fcc53483" },
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "5bea0e851b8f48479d2cb927cd26733b4058b2b3" },
"mason.nvim": { "branch": "main", "commit": "28408c857a8f821ff504c9383c96af22b7ca66d9" },
"neogit": { "branch": "master", "commit": "0d6002c6af432343937283fb70791fc76fa7227c" },
"null-ls.nvim": { "branch": "main", "commit": "ef9010b2ac11e2068a8e1d5a4eff576289a1f9a4" },
"nvim-autopairs": { "branch": "master", "commit": "b5994e6547d64f781cfca853a1aa6174d238fe0e" },
"nvim-cmp": { "branch": "main", "commit": "8868cf9a09e5f3c2612a22ccb82dcc6d9f0d0d35" },
"nvim-colorizer.lua": { "branch": "master", "commit": "760e27df4dd966607e8fb7fd8b6b93e3c7d2e193" },
"nvim-dap": { "branch": "master", "commit": "6f2ea9e33b48a51849ec93c6c38148a5372018e4" },
"nvim-dap-ui": { "branch": "master", "commit": "54365d2eb4cb9cfab0371306c6a76c913c5a67e3" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "2971ce3e89b1711cc26e27f73d3f854b559a77d4" },
"nvim-lspconfig": { "branch": "master", "commit": "5292d60976b3084a987bf5634150f6201830ac18" },
"nvim-surround": { "branch": "main", "commit": "6cc6b54d3728a17e34bb5c9b9db05c7e5690813d" },
"nvim-tree.lua": { "branch": "master", "commit": "e14c2895b4f36a22001f7773244041c173dcf867" },
"nvim-treesitter": { "branch": "master", "commit": "e8b765bee1f760b0153fb4edf2391ff5d7a85475" },
"nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" },
"nvim-ts-rainbow": { "branch": "master", "commit": "064fd6c0a15fae7f876c2c6dd4524ca3fad96750" },
"nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" },
"playground": { "branch": "master", "commit": "3421bbbfec25a7c54ee041ffb9cb226b69b2b995" },
"plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" },
"presence.nvim": { "branch": "main", "commit": "c1c54758824cbecd4e18065d37191f7666fdd097" },
"py_lsp.nvim": { "branch": "main", "commit": "9b549141d2d66f7c73902d511c543713171610d6" },
"rust-tools.nvim": { "branch": "master", "commit": "99fd1238c6068d0637df30b6cee9a264334015e9" },
"schemastore.nvim": { "branch": "main", "commit": "d1625bb74b3a7f84aad278a7968f4496ae8936c6" },
"stabilize.nvim": { "branch": "master", "commit": "34069870a8e72632c5447188e638e1c6bfebc353" },
"telescope-asynctasks.nvim": { "branch": "main", "commit": "065300fb0a8ba6a1c81991da1873c73e136dcdc0" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "cad567e11131a01f2934930c1efc8b1b09a0dc56" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "fab3e2212e206f4f8b3bbaa656e129443c9b802e" },
"telescope-project.nvim": { "branch": "master", "commit": "ff4d3cea905383a67d1a47b9dd210c4907d858c2" },
"telescope.nvim": { "branch": "master", "commit": "e960efa60e97df58e089b00270f09d60f27202c8" },
"true-zen.nvim": { "branch": "main", "commit": "98740c76254c65576ec294551028b65081053588" },
"vim-astro": { "branch": "main", "commit": "34732be5e9a5c28c2409f4490edf92d46d8b55a9" },
"vim-dadbod": { "branch": "master", "commit": "34151ccce9f5ff16229b8e482a97e46997914cb3" },
"vim-dadbod-completion": { "branch": "master", "commit": "e71eb6140556c5ced80de6299a1fdfe22bd3c1b1" },
"vim-dadbod-ui": { "branch": "master", "commit": "6a2b841d2f0b82386c637ce4e9954ae12c7eaee8" },
"vim-fugitive": { "branch": "master", "commit": "5b0b138483de17a8fd8dfcec0b491782c8fbf102" },
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
"vim-table-mode": { "branch": "master", "commit": "9555a3e6e5bcf285ec181b7fc983eea90500feb4" },
"vim-vsnip": { "branch": "master", "commit": "8dde8c0ef10bb1afdbb301e2bd7eb1c153dd558e" },
"which-key.nvim": { "branch": "main", "commit": "61553aeb3d5ca8c11eea8be6eadf478062982ac9" }
}

View file

@ -0,0 +1,22 @@
function map(mode, shortcut, command, opt)
opt = opt or { noremap = true, silent = true }
vim.keymap.set(mode, shortcut, command, opt)
end
-- easier split navigation
map("n", "<C-J>", "<C-W>j")
map("n", "<C-K>", "<C-W>k")
map("n", "<C-L>", "<C-W>l")
map("n", "<C-H>", "<C-W>h")
map("n", "<C-W>\\", ":vsplit<CR>")
map("n", "<C-W>-", ":split<CR>")
map("n", "<C-W>x", ":q<CR>")
-- merge conflicts
map("n", "gd", ":diffget")
map("n", "gdh", ":diffget //2<CR>")
map("n", "gdl", ":diffget //3<CR>")
-- escape :terminal easier
map("t", "<Esc>", "<C-\\><C-n>")
-- NvimTree
map("n", "<C-N>", ":NvimTreeToggle<CR>")

View file

@ -1,41 +0,0 @@
require("bufferline").setup({
highlights = require("catppuccin.groups.integrations.bufferline").get(),
options = {
show_close_icon = false,
separator_style = "thin",
show_buffer_close_icons = false,
offsets = { { filetype = "NvimTree" } },
left_mouse_command = "buffer %d",
middle_mouse_command = "bdelete! %d",
right_mouse_command = nil,
},
})
-- hop between buffers in order of the bar
Map("n", "<A-,>", "<Cmd>BufferLineCyclePrev<CR>")
Map("n", "<A-.>", "<Cmd>BufferLineCycleNext<CR>")
-- Re-order to previous/next
Map("n", "<A-<>", "<Cmd>BufferLineMovePrev<CR>")
Map("n", "<A->>", "<Cmd>BufferLineMoveNext<CR>")
-- Goto buffer in position...
Map("n", "<A-1>", "<Cmd>BufferLineGoToBuffer 1<CR>")
Map("n", "<A-2>", "<Cmd>BufferLineGoToBuffer 2<CR>")
Map("n", "<A-3>", "<Cmd>BufferLineGoToBuffer 3<CR>")
Map("n", "<A-4>", "<Cmd>BufferLineGoToBuffer 4<CR>")
Map("n", "<A-5>", "<Cmd>BufferLineGoToBuffer 5<CR>")
Map("n", "<A-6>", "<Cmd>BufferLineGoToBuffer 6<CR>")
Map("n", "<A-7>", "<Cmd>BufferLineGoToBuffer 7<CR>")
Map("n", "<A-8>", "<Cmd>BufferLineGoToBuffer 8<CR>")
Map("n", "<A-9>", "<Cmd>BufferLineGoToBuffer 9<CR>")
Map("n", "<A-0>", "<Cmd>BufferLineGoToBuffer -1<CR>")
-- Pin/unpin buffer
Map("n", "<A-p>", "<Cmd>BufferLineTogglePin<CR>")
-- Close buffer
Map("n", "<A-x>", "<Cmd>bdelete<CR>")
Map("n", "<A-X>", "<Cmd>bdelete!<CR>")
-- create new buffer
Map("n", "<A-c>", "<Cmd>enew<CR>")
-- pick buffer
Map("n", "<A-space>", "<Cmd>BufferLinePick<CR>")
-- Sort automatically by...
Map("n", "<Space>bd", "<Cmd>BufferLineSortByDirectory<CR>")
Map("n", "<Space>bl", "<Cmd>BufferLineSortByExtension<CR>")

View file

@ -1,43 +0,0 @@
local clrs = require("catppuccin.palettes.init").get_palette()
local ctp_feline = require("catppuccin.groups.integrations.feline")
ctp_feline.setup({
assets = {
left_separator = "",
right_separator = "",
bar = "",
mode_icon = "",
dir = "",
file = "",
git = {
branch = "",
},
},
sett = {
show_modified = true,
curr_dir = clrs.mauve,
curr_file = clrs.blue,
bkg = clrs.crust,
},
mode_colors = {
["n"] = { "NORMAL", clrs.blue },
},
})
require("feline").setup({
components = ctp_feline.get(),
force_inactive = {
filetypes = {
"^packer$",
"^startify$",
"^fugitive$",
"^fugitiveblame$",
"^qf$",
"^help$",
},
buftypes = {
"^terminal$",
},
bufnames = {},
},
})

View file

@ -1,22 +0,0 @@
local saga = require("lspsaga")
saga.init_lsp_saga({
symbol_in_winbar = {
in_custom = true,
},
code_action_lightbulb = {
enable = false,
},
})
Map("n", "gr", "<cmd>Lspsaga rename<cr>")
Map("n", "gx", "<cmd>Lspsaga code_action<cr>")
Map("n", "gx", ":<c-u>Lspsaga range_code_action<cr>")
Map("n", "K", "<cmd>Lspsaga hover_doc<cr>")
Map("n", "go", "<cmd>Lspsaga show_line_diagnostics<cr>")
Map("n", "gj", "<cmd>Lspsaga diagnostic_jump_next<cr>")
Map("n", "gk", "<cmd>Lspsaga diagnostic_jump_prev<cr>")
vim.cmd([[
nnoremap <silent> <A-d> <cmd>lua require('lspsaga.floaterm').open_float_terminal()<CR>
tnoremap <silent> <A-d> <C-\><C-n>:lua require('lspsaga.floaterm').close_float_terminal()<CR>
]])

View file

@ -1,335 +1,222 @@
local packer = require("packer")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git", "clone", "--filter=blob:none", "--single-branch",
"https://github.com/folke/lazy.nvim.git", lazypath
})
end
vim.opt.runtimepath:prepend(lazypath)
-- auto-compile when lua files in `~/.config/nvim/*` change
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*.lua",
callback = function()
local cfg_path = vim.fn.resolve(vim.fn.stdpath("config"))
vim.defer_fn(function()
if vim.fn.expand("%:p"):match(cfg_path) then
vim.cmd("silent! PackerCompile")
end
end, 0)
end,
})
return packer.startup({
function(use)
-- Packer managing itself
use("wbthomason/packer.nvim")
-- startup time or some shit
use("lewis6991/impatient.nvim")
-- colour scheme
use({
"https://git.winston.sh/catppuccin/nvim",
as = "catppuccin",
config = function()
require("config/catppuccin")
end,
})
use({
"Pocco81/true-zen.nvim",
config = function()
require("true-zen").setup()
end,
})
-- git gutter
use({
"lewis6991/gitsigns.nvim",
config = function()
require("config/gitsigns")
end,
})
-- rainbow indents
use({
"lukas-reineke/indent-blankline.nvim",
config = function()
require("indent_blankline").setup({
space_char_blankline = " ",
-- show_current_context = true,
-- show_current_context_start = true,
})
vim.g.indent_blankline_filetype_exclude = {
"dashboard",
"help",
"neogitstatus",
"fugitive",
"packer",
"NvimTree",
"Trouble",
}
end,
})
use({
"akinsho/bufferline.nvim",
config = function()
require("config/bufferline")
end,
})
use({
"feline-nvim/feline.nvim",
config = function()
require("config/feline")
end,
})
-- DJI Osmo
use({
"luukvbaal/stabilize.nvim",
config = function()
require("stabilize").setup()
end,
})
-- syntax
use({
"nvim-treesitter/nvim-treesitter",
run = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
config = function()
require("config/treesitter")
end,
})
use("nvim-treesitter/playground")
use({
"p00f/nvim-ts-rainbow",
requires = "nvim-treesitter/nvim-treesitter",
})
-- show possible key combos
use({
"folke/which-key.nvim",
config = function()
require("config/which-key")
end,
})
-- syntax
use("alker0/chezmoi.vim")
use({
"wuelnerdotexe/vim-astro",
config = function()
vim.g.astro_typescript = "enable"
end,
})
-- tooling
use("gpanders/editorconfig.nvim")
-- read and write encrypted pgp files
use("jamessan/vim-gnupg")
-- additional functionality
use({
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end,
})
use({
"kylechui/nvim-surround",
config = function()
require("nvim-surround").setup({})
end,
})
use("ggandor/lightspeed.nvim")
use({
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup({})
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
})
use({
"windwp/nvim-ts-autotag",
config = function()
require("nvim-ts-autotag").setup()
end,
})
-- git
use({
"tpope/vim-fugitive",
})
-- why not both?
use({
"TimUntersberger/neogit",
requires = "nvim-lua/plenary.nvim",
config = function()
Map("n", "<leader>ng", "<Cmd>Neogit<CR>")
end,
})
use("dhruvasagar/vim-table-mode")
use({
"nvchad/nvim-colorizer.lua",
config = function()
require("config/colorizer")
end,
})
-- databases
use("tpope/vim-dadbod")
use("kristijanhusak/vim-dadbod-completion")
use({
"kristijanhusak/vim-dadbod-ui",
config = function()
Map("n", "<leader>db", ":DBUIToggle<CR>")
vim.g.db_ui_use_nerd_fonts = true
vim.g.db_ui_win_position = "right"
end,
})
-- telescope
use({
"nvim-telescope/telescope.nvim",
requires = "nvim-lua/plenary.nvim",
config = function()
require("config/telescope")
end,
})
use({
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
requires = "nvim-telescope/telescope.nvim",
})
use({
"nvim-telescope/telescope-file-browser.nvim",
config = function()
require("telescope").load_extension("file_browser")
end,
})
use({
"nvim-telescope/telescope-project.nvim",
config = function()
require("telescope").load_extension("project")
end,
})
use({
"axkirillov/easypick.nvim",
requires = "nvim-telescope/telescope.nvim",
})
use("nvim-tree/nvim-web-devicons")
use({
"nvim-tree/nvim-tree.lua",
keys = { "<C-n>" },
config = function()
Map("n", "<C-N>", ":NvimTreeToggle<CR>")
require("nvim-tree").setup()
end,
})
use({
"andweeb/presence.nvim",
config = function()
require("config/presence")
end,
})
use({ "iamcco/markdown-preview.nvim", run = "cd app && yarn install" })
-- LSP
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
use("neovim/nvim-lspconfig")
-- completion
use("hrsh7th/nvim-cmp")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-cmdline")
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-path")
use("hrsh7th/cmp-vsnip")
use("hrsh7th/vim-vsnip")
use("petertriho/cmp-git")
use("onsails/lspkind.nvim")
use("rafamadriz/friendly-snippets")
use("jose-elias-alvarez/null-ls.nvim")
use({
"glepnir/lspsaga.nvim",
branch = "main",
config = function()
require("config/lspsaga")
end,
})
use({
"ray-x/go.nvim",
requires = "ray-x/guihua.lua",
})
use({
"HallerPatrick/py_lsp.nvim",
})
use({
"simrat39/rust-tools.nvim",
})
use({
"rcarriga/nvim-dap-ui",
requires = {
"mfussenegger/nvim-dap",
"theHamsta/nvim-dap-virtual-text",
},
})
use({ "barreiroleo/ltex-extra.nvim" })
use("b0o/schemastore.nvim")
use({
"zbirenbaum/copilot.lua",
config = function()
require("config/copilot")
end,
})
-- organization
use({
"vimwiki/vimwiki",
branch = "dev",
config = function()
vim.g.vimwiki_global_ext = 0
vim.g.vimwiki_list = {
{
auto_export = 1,
path = "~/.local/share/vimwiki/",
syntax = "markdown",
ext = ".md",
path_html = "~/vimwiki/",
template_path = "~/.config/vimwiki/templates/",
template_default = "default",
template_ext = ".tpl",
custom_wiki2html = "vimwiki_markdown",
html_filename_parameterization = 1,
},
}
end,
})
use("tools-life/taskwiki")
use({
"skywind3000/asyncrun.vim",
config = function()
vim.g.asyncrun_open = 6
end,
})
use({ "skywind3000/asynctasks.vim" })
use({
"GustavoKatel/telescope-asynctasks.nvim",
config = function()
require("telescope").load_extension("asynctasks")
end,
})
end,
config = {
display = {
open_fn = function()
return require("packer.util").float({ border = "double" })
end,
},
local plugins = {
-- startup time or some shit
"lewis6991/impatient.nvim",
-- colour scheme
{ "catppuccin/nvim", name = "catppuccin" },
"glepnir/dashboard-nvim",
"Pocco81/true-zen.nvim",
-- git gutter
"lewis6991/gitsigns.nvim",
-- rainbow indents
"lukas-reineke/indent-blankline.nvim",
"akinsho/bufferline.nvim",
-- "feline-nvim/feline.nvim",
-- DJI Osmo
"luukvbaal/stabilize.nvim",
-- syntax
{
"nvim-treesitter/nvim-treesitter",
build = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
},
"nvim-treesitter/playground",
"p00f/nvim-ts-rainbow",
-- show possible key combos
"folke/which-key.nvim",
-- syntax
"alker0/chezmoi.vim",
{
"wuelnerdotexe/vim-astro",
config = function()
vim.g.astro_typescript = "enable"
end,
},
-- tooling
"gpanders/editorconfig.nvim",
-- read and write encrypted pgp files
"jamessan/vim-gnupg",
-- additional functionality
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end
},
{
"kylechui/nvim-surround",
config = function()
require("nvim-surround").setup()
end,
},
"ggandor/lightspeed.nvim",
{
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup()
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
"windwp/nvim-ts-autotag",
-- git
"tpope/vim-fugitive",
-- why not both?
"TimUntersberger/neogit",
{
"dhruvasagar/vim-table-mode",
config = function()
vim.cmd([[autocmd FileType markdown let g:table_mode_corner='|']])
end
},
"nvchad/nvim-colorizer.lua",
-- databases
"tpope/vim-dadbod",
"kristijanhusak/vim-dadbod-completion",
{
"kristijanhusak/vim-dadbod-ui",
config = function()
vim.g.db_ui_use_nerd_fonts = true
vim.g.db_ui_win_position = "right"
end,
},
"skywind3000/asyncrun.vim",
"skywind3000/asynctasks.vim",
-- telescope
{
"nvim-telescope/telescope.nvim",
config = function()
local telescope = require("telescope")
telescope.load_extension("fzf")
telescope.load_extension("asynctasks")
telescope.load_extension("file_browser")
telescope.load_extension("project")
end,
dependencies = {
"nvim-lua/plenary.nvim",
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
},
"GustavoKatel/telescope-asynctasks.nvim",
"nvim-telescope/telescope-file-browser.nvim",
"nvim-telescope/telescope-project.nvim",
"axkirillov/easypick.nvim",
}
},
-- nvimtree
"nvim-tree/nvim-web-devicons",
{
"nvim-tree/nvim-tree.lua",
config = function()
require("nvim-tree").setup()
end
},
-- discord
"andweeb/presence.nvim",
{ "iamcco/markdown-preview.nvim", build = "cd app && yarn install" },
-- LSP
{
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
-- completion
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"hrsh7th/cmp-vsnip",
"hrsh7th/vim-vsnip",
"petertriho/cmp-git",
"onsails/lspkind.nvim",
"rafamadriz/friendly-snippets",
"jose-elias-alvarez/null-ls.nvim",
"glepnir/lspsaga.nvim",
{
"j-hui/fidget.nvim",
config = function()
require("fidget").setup({})
end
},
"barreiroleo/ltex-extra.nvim",
"b0o/schemastore.nvim",
"HallerPatrick/py_lsp.nvim",
"simrat39/rust-tools.nvim",
{ "ray-x/go.nvim", dependencies = { "ray-x/guihua.lua" } },
{ "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap", "theHamsta/nvim-dap-virtual-text" } },
}
},
-- lua github copilot
"zbirenbaum/copilot.lua",
}
require("lazy").setup(plugins, {
defaults = { lazy = false },
install = { colorscheme = { "catppuccin" } },
performance = {
rtp = {
disabled_plugins = {
"2html_plugin",
"bugreport",
"compiler",
"ftplugin",
"fzf",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"matchit",
"netrw",
"netrwFileHandlers",
"netrwPlugin",
"netrwSettings",
"optwin",
"rplugin",
"rrhelper",
"spellfile_plugin",
"synmenu",
"syntax",
"tar",
"tarPlugin",
"tutor",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
}
}
},
ui = {
icons = {
cmd = "",
config = "",
event = "",
ft = "",
init = "",
keys = "",
plugin = "",
runtime = "",
source = "",
start = "",
task = "",
},
border = "double"
}
})