Everything but LSP is finished!
This commit is contained in:
parent
78f04bda73
commit
e54f6ee975
23 changed files with 530 additions and 100 deletions
16
lua/plugins/color_picker.lua
Normal file
16
lua/plugins/color_picker.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
"uga-rosa/ccc.nvim",
|
||||
event = "BufEnter",
|
||||
opts = { auto_enable = true, lsp = true, point_char = "" },
|
||||
config = function(_, opts)
|
||||
require("ccc").setup(opts)
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
callback = function()
|
||||
vim.cmd.CccHighlighterEnable()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>,p", "<cmd>CccPick<cr>", desc = "Color Picker", mode = { "n", "v", "x" } },
|
||||
},
|
||||
}
|
|
@ -21,6 +21,6 @@ return {
|
|||
vim.cmd("filetype plugin on")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>/", "<Plug>NERDCommenterToggle<cr>k", mode = { "n", "x" } },
|
||||
{ "<leader>/", "<Plug>NERDCommenterToggle<cr>k", mode = { "n", "x" }, desc = "Toggle comments on line/selection" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
-- TODO checkout https://github.com/nvim-lua/lsp-status.nvim
|
||||
-- https://www.reddit.com/r/neovim/comments/o4bguk/comment/h2kcjxa/
|
||||
local function lsp_clients()
|
||||
local clients = {}
|
||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
||||
|
@ -32,16 +33,23 @@ local function langs()
|
|||
return table.concat(l, " • "), " "
|
||||
end
|
||||
|
||||
local function latest_message()
|
||||
return U.safeRequire("noice", function(n)
|
||||
return n.api.status.message.get_hl
|
||||
end, U.fnEmptyStr)
|
||||
end
|
||||
local last_blame = nil
|
||||
local last_blame_time = vim.loop.now()
|
||||
local function gitblame()
|
||||
local d = vim.b.gitsigns_blame_line_dict
|
||||
|
||||
local function latest_message_cond()
|
||||
return U.safeRequire("noice", function(n)
|
||||
return n.api.status.message.has
|
||||
end, U.fnFalse)
|
||||
if d then
|
||||
last_blame = d
|
||||
last_blame_time = vim.loop.now()
|
||||
elseif vim.loop.now() - last_blame_time <= 2000 then
|
||||
d = last_blame
|
||||
end
|
||||
|
||||
if d then
|
||||
local ok, res = pcall(os.date, "%d %b %y", d.committer_time)
|
||||
return d.committer .. " - " .. (ok and res or d.committer_time)
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
return {
|
||||
|
@ -61,7 +69,7 @@ return {
|
|||
lualine_c = {
|
||||
{ "filename", separator = { right = "" } },
|
||||
{ "reg_recording", icon = { "" }, color = { fg = "#D37676" } },
|
||||
{ latest_message, cond = latest_message_cond },
|
||||
{ gitblame, color = { fg = "#696969" } },
|
||||
},
|
||||
lualine_x = {
|
||||
lsp_clients,
|
||||
|
|
12
lua/plugins/floatterm.lua
Normal file
12
lua/plugins/floatterm.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
"voldikss/vim-floaterm",
|
||||
cmd = { "FloatermToggle" },
|
||||
keys = {
|
||||
{
|
||||
"<C-x>",
|
||||
"<cmd>FloatermToggle<cr>",
|
||||
desc = "Toggle float terminal",
|
||||
mode = { "n", "i", "v", "x", "c", "t" },
|
||||
},
|
||||
},
|
||||
}
|
53
lua/plugins/git_diff.lua
Normal file
53
lua/plugins/git_diff.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {
|
||||
diff_binaries = false,
|
||||
enhanced_diff_hl = true,
|
||||
git_cmd = { "git" },
|
||||
use_icons = true,
|
||||
icons = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
},
|
||||
signs = {
|
||||
fold_closed = "",
|
||||
fold_open = "",
|
||||
},
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
disable_diagnostics = true,
|
||||
},
|
||||
},
|
||||
file_panel = {
|
||||
listing_style = "tree",
|
||||
tree_options = {
|
||||
flatten_dirs = true,
|
||||
folder_statuses = "only_folded",
|
||||
},
|
||||
win_config = {
|
||||
position = "left",
|
||||
width = 35,
|
||||
},
|
||||
},
|
||||
file_history_panel = {
|
||||
log_options = {
|
||||
git = {
|
||||
single_file = {
|
||||
diff_merges = "combined",
|
||||
},
|
||||
multi_file = {
|
||||
diff_merges = "first-parent",
|
||||
},
|
||||
},
|
||||
},
|
||||
win_config = {
|
||||
position = "bottom",
|
||||
height = 16,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gd", "<cmd>DiffviewOpen<cr>", desc = "Opens git diff view." },
|
||||
},
|
||||
}
|
35
lua/plugins/git_signs.lua
Normal file
35
lua/plugins/git_signs.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "BufEnter",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = function()
|
||||
local highlight = U.highlight
|
||||
highlight("GitGutterAdd", { fg = "#688066", gui = "nocombine" })
|
||||
highlight("GitGutterUntracked", { fg = "#688066", gui = "nocombine" })
|
||||
highlight("GitGutterChange", { fg = "#666f80", gui = "nocombine" })
|
||||
highlight("GitGutterDelete", { fg = "#806666", gui = "nocombine" })
|
||||
highlight("GitGutterChangeDelete", { fg = "#806666", gui = "nocombine" })
|
||||
|
||||
return {
|
||||
watch_gitdir = {
|
||||
interval = 100,
|
||||
},
|
||||
signs = {
|
||||
add = { hl = "GitGutterAdd" },
|
||||
change = { hl = "GitGutterChange" },
|
||||
delete = { hl = "GitGutterDelete" },
|
||||
topdelete = { hl = "GitGutterDelete" },
|
||||
changedelete = { hl = "GitGutterChangeDelete" },
|
||||
untracked = { hl = "GitGutterUntracked" },
|
||||
},
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = {
|
||||
delay = 0,
|
||||
virt_text = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
}
|
9
lua/plugins/github_open.lua
Normal file
9
lua/plugins/github_open.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
"Almo7aya/openingh.nvim",
|
||||
cmd = { "OpenInGHFile", "OpenInGHFileLines" },
|
||||
keys = {
|
||||
{ "<leader>gf", "<cmd>OpenInGHFile<CR>", desc = "Open in git" },
|
||||
{ "<leader>gf", ":OpenInGHFileLines<CR>", desc = "Open in git", mode = { "v", "x" } },
|
||||
},
|
||||
}
|
||||
|
9
lua/plugins/illuminate.lua
Normal file
9
lua/plugins/illuminate.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- This plugin will smartly highlight the token under the cursor.
|
||||
return {
|
||||
"RRethy/vim-illuminate",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require("illuminate").configure(opts)
|
||||
end,
|
||||
}
|
49
lua/plugins/indent_indicators.lua
Normal file
49
lua/plugins/indent_indicators.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
scope = {
|
||||
enabled = true,
|
||||
char = "┊",
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
highlight = {
|
||||
"IndentBlanklineScope1",
|
||||
"IndentBlanklineScope2",
|
||||
"IndentBlanklineScope3",
|
||||
"IndentBlanklineScope4",
|
||||
"IndentBlanklineScope5",
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
char = "│",
|
||||
highlight = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
"IndentBlanklineIndent3",
|
||||
"IndentBlanklineIndent4",
|
||||
"IndentBlanklineIndent5",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
U.highlight("NonText", { fg = "#303030", gui = "nocombine" })
|
||||
|
||||
local hooks = require("ibl.hooks")
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent1", { fg = "#915053" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent2", { fg = "#A27F3E" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent3", { fg = "#6B7F6E" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent4", { fg = "#5a74aa" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineIndent5", { fg = "#6B6282" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope1", { fg = "#CB5D60" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope2", { fg = "#DEA93F" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope3", { fg = "#89B790" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope4", { fg = "#6289E5" })
|
||||
vim.api.nvim_set_hl(0, "IndentBlanklineScope5", { fg = "#917DC0" })
|
||||
end)
|
||||
|
||||
require("ibl").setup(opts)
|
||||
end,
|
||||
}
|
10
lua/plugins/markdown_glow.lua
Normal file
10
lua/plugins/markdown_glow.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"lnc3l0t/glow.nvim",
|
||||
opts = {
|
||||
default_type = "keep",
|
||||
},
|
||||
cmd = "Glow",
|
||||
keys = {
|
||||
{ "<leader>,m", "<cmd>Glow<cr>", desc = "Markdown preview" },
|
||||
},
|
||||
}
|
|
@ -2,7 +2,7 @@ return {
|
|||
"rmagatti/auto-session",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,tabpages,winsize,winpos,terminal,localoptions"
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,tabpages,winsize,winpos,terminal"
|
||||
end,
|
||||
opts = {
|
||||
auto_session_use_git_branch = true,
|
||||
|
|
4
lua/plugins/surround.lua
Normal file
4
lua/plugins/surround.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
"tpope/vim-surround",
|
||||
event = "VeryLazy",
|
||||
}
|
25
lua/plugins/text_case.lua
Normal file
25
lua/plugins/text_case.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
"johmsalas/text-case.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
cmd = "TextCaseOpenTelescope",
|
||||
config = function(_, opts)
|
||||
require("textcase").setup(opts)
|
||||
require("telescope").load_extension("textcase")
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>,c",
|
||||
function()
|
||||
if next(vim.lsp.buf_get_clients()) ~= nil then
|
||||
-- TODO test that this works
|
||||
vim.cmd("TextCaseOpenTelescopeLSPChange")
|
||||
else
|
||||
vim.cmd("TextCaseOpenTelescope")
|
||||
end
|
||||
end,
|
||||
desc = "Change case of selection",
|
||||
mode = { "n", "v", "x" },
|
||||
silent = true, -- TODO add this to most things....
|
||||
},
|
||||
},
|
||||
}
|
6
lua/plugins/undotree.lua
Normal file
6
lua/plugins/undotree.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"mbbill/undotree",
|
||||
keys = {
|
||||
{ "<leader>u", vim.cmd.UndotreeToggle, desc = "Undo Tree Toggle" },
|
||||
},
|
||||
}
|
|
@ -15,15 +15,15 @@ return {
|
|||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
wk.register({
|
||||
["<leader>b"] = { name = "Buffers" },
|
||||
["<leader>t"] = { name = "Tabs" },
|
||||
-- ["<leader>,"] = { name = "Miscellaneous Tools" },
|
||||
["<leader>b"] = { name = "Buffers", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>t"] = { name = "Tabs", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>,"] = { name = "Miscellaneous Tools", mode = { "n", "x", "v", "c" } },
|
||||
-- ["<leader>c"] = { name = "Copilot" },
|
||||
["<leader>f"] = { name = "Find [Telescope]" },
|
||||
["<leader>f"] = { name = "Find [Telescope]", mode = { "n", "x", "v", "c" } },
|
||||
-- ["<leader>fs"] = { name = "Find in Scratches [Telescope]" },
|
||||
-- ["<leader>g"] = { name = "Git" },
|
||||
["<leader>l"] = { name = "LSP" },
|
||||
["<leader>lf"] = { name = "LSP Find" },
|
||||
["<leader>g"] = { name = "Git", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>l"] = { name = "LSP", mode = { "n", "x", "v", "c" } },
|
||||
["<leader>lf"] = { name = "LSP Find", mode = { "n", "x", "v", "c" } },
|
||||
-- ["<leader>Q"] = { name = "+Q Quit and remove session" },
|
||||
-- ["<leader>s"] = { name = "Scratch Files" },
|
||||
-- ["<leader>x"] = { name = "Generative AI, Ollama" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue