actual progress omg
This commit is contained in:
@@ -10,6 +10,26 @@ return {
|
||||
typescript = { "eslint" },
|
||||
}
|
||||
|
||||
-- Only show diagnostics close to the cursor
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
spacing = 4,
|
||||
-- You can make prefix dynamic based on severity using a function
|
||||
prefix = function(diagnostic)
|
||||
local icons = {
|
||||
[vim.diagnostic.severity.ERROR] = " ",
|
||||
[vim.diagnostic.severity.WARN] = " ",
|
||||
[vim.diagnostic.severity.INFO] = " ",
|
||||
[vim.diagnostic.severity.HINT] = " ",
|
||||
}
|
||||
return icons[diagnostic.severity] or "●"
|
||||
end,
|
||||
},
|
||||
signs = false,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
})
|
||||
|
||||
-- Auto-run the linter only for the configured filetypes
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "!*.lua",
|
||||
|
||||
27
lua/plugins/functional/auto-session.lua
Normal file
27
lua/plugins/functional/auto-session.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"rmagatti/auto-session",
|
||||
lazy = false,
|
||||
|
||||
opts = {
|
||||
session_lens = {
|
||||
picker = "telescope",
|
||||
load_on_setup = true,
|
||||
picker_opts = {
|
||||
border = false,
|
||||
},
|
||||
},
|
||||
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||
git_use_branch_name = true,
|
||||
git_auto_restore_on_branch_change = true,
|
||||
purge_after_minutes = 14400,
|
||||
show_auto_restore_notif = true,
|
||||
},
|
||||
|
||||
config = function()
|
||||
require("auto-session").setup({})
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
vim.keymap.set("n", "<leader>as", "<cmd>AutoSession search<CR>", { noremap = true })
|
||||
vim.keymap.set("n", "<leader>an", "<cmd>AutoSession save<CR>", { noremap = true })
|
||||
vim.keymap.set("n", "<leader>ad", "<cmd>AutoSession delete<CR>", { noremap = true })
|
||||
end,
|
||||
}
|
||||
@@ -3,8 +3,27 @@ return {
|
||||
version = "",
|
||||
|
||||
config = function()
|
||||
local animate = require("mini.animate")
|
||||
require("mini.pairs").setup() -- Bracket pairs and stuff
|
||||
require("mini.ai").setup() -- Around and In extension for visual mode
|
||||
require("mini.cursorword").setup() -- Underline current word below cursor (makes it easier to c and d)
|
||||
require("mini.indentscope").setup({
|
||||
symbol = "│",
|
||||
draw = {
|
||||
delay = 10,
|
||||
animation = require("mini.indentscope").gen_animation.linear({
|
||||
duration = 15,
|
||||
unit = "step",
|
||||
easing = "out",
|
||||
}),
|
||||
},
|
||||
}) -- Indent lines
|
||||
require("mini.trailspace").setup() -- Shows useless spaces
|
||||
require("mini.sessions").setup({
|
||||
autosread = true,
|
||||
autowrite = true,
|
||||
})
|
||||
require("mini.notify").setup() -- Better Notifications
|
||||
require("mini.surround").setup() -- Suround selections with characters
|
||||
require("mini.move").setup({
|
||||
mappings = {
|
||||
@@ -14,5 +33,32 @@ return {
|
||||
})
|
||||
|
||||
require("mini.icons").setup() -- Icon provider
|
||||
require("mini.animate").setup({
|
||||
cursor = {
|
||||
enable = false,
|
||||
},
|
||||
scroll = {
|
||||
-- Animate for 200 milliseconds with linear easing
|
||||
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||
-- Animate equally but with at most 120 steps instead of default 60
|
||||
subscroll = animate.gen_subscroll.equal({ max_output_steps = 60 }),
|
||||
},
|
||||
open = {
|
||||
-- Animate for 400 milliseconds with linear easing
|
||||
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||
-- Animate with wiping from nearest edge instead of default static one
|
||||
winconfig = animate.gen_winconfig.wipe({ direction = "from_edge" }),
|
||||
-- Make bigger windows more transparent
|
||||
winblend = animate.gen_winblend.linear({ from = 80, to = 100 }),
|
||||
},
|
||||
close = {
|
||||
-- Animate for 400 milliseconds with linear easing
|
||||
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||
-- Animate with wiping to nearest edge instead of default static one
|
||||
winconfig = animate.gen_winconfig.wipe({ direction = "to_edge" }),
|
||||
-- Make bigger windows more transparent
|
||||
winblend = animate.gen_winblend.linear({ from = 100, to = 80 }),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
21
lua/plugins/functional/telescope.lua
Normal file
21
lua/plugins/functional/telescope.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.8",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("telescope").setup()
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
vim.keymap.set("n", "<leader>ff", function()
|
||||
builtin.find_files({ cwd = vim.fn.expand("%:p:h"), hidden = true })
|
||||
end, { desc = "Telescope find files (current file dir)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fg", function()
|
||||
builtin.live_grep({ cwd = vim.fn.expand("%:p:h") })
|
||||
end, { desc = "Telescope live grep (current file dir)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fb", function()
|
||||
builtin.buffers({ cwd = vim.fn.expand("%:p:h") }) -- buffers don’t need cwd, but harmless
|
||||
end, { desc = "Telescope buffers" })
|
||||
end,
|
||||
}
|
||||
7
lua/plugins/functional/undotree.lua
Normal file
7
lua/plugins/functional/undotree.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"mbbill/undotree",
|
||||
lazy = false,
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>u", "<cmd>UndotreeToggle<cr><cmd>UndotreeFocus<cr>")
|
||||
end,
|
||||
}
|
||||
1
lua/plugins/init.lua
Normal file
1
lua/plugins/init.lua
Normal file
@@ -0,0 +1 @@
|
||||
return { undefined }
|
||||
Reference in New Issue
Block a user