Compare commits
1 Commits
4f87617051
...
d611081d65
| Author | SHA1 | Date | |
|---|---|---|---|
| d611081d65 |
60
init.lua
60
init.lua
@@ -12,19 +12,27 @@ vim.wo.number = true
|
|||||||
vim.api.nvim_set_hl(0, "LineNr", { fg = "#6c7086" }) -- overlay0
|
vim.api.nvim_set_hl(0, "LineNr", { fg = "#6c7086" }) -- overlay0
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#cba6f7", bold = true }) -- mauve
|
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#cba6f7", bold = true }) -- mauve
|
||||||
|
|
||||||
|
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, {
|
||||||
|
group = cursorline_group,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.cursorline = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "WinLeave" }, {
|
||||||
|
group = cursorline_group,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.cursorline = false
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Windows
|
-- Windows
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
vim.o.winborder = "rounded"
|
vim.o.winborder = "rounded"
|
||||||
|
|
||||||
-- Sane keymaps
|
|
||||||
vim.keymap.set("i", "jj", "<Esc>")
|
|
||||||
vim.keymap.set("n", "q:", ":", { noremap = true, silent = true })
|
|
||||||
vim.keymap.set("n", "<leader>bd", function() -- delete buffer
|
|
||||||
vim.cmd("bd")
|
|
||||||
vim.cmd("echo 'Buffer deleted'")
|
|
||||||
end, { noremap = true })
|
|
||||||
|
|
||||||
-- Sane tab management
|
-- Sane tab management
|
||||||
vim.opt.tabstop = 2
|
vim.opt.tabstop = 2
|
||||||
vim.opt.softtabstop = 2
|
vim.opt.softtabstop = 2
|
||||||
@@ -53,6 +61,19 @@ vim.opt.scrolloff = math.floor(vim.o.lines / 2) - 3
|
|||||||
-- Indent
|
-- Indent
|
||||||
vim.o.autoindent = true
|
vim.o.autoindent = true
|
||||||
|
|
||||||
|
-- Keymap function
|
||||||
|
function Keymap(mode, key, binding)
|
||||||
|
vim.keymap.set(mode, key, binding, { noremap = true, silent = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Better keymaps
|
||||||
|
Keymap("i", "jj", "<Esc>")
|
||||||
|
Keymap("n", "q:", ":")
|
||||||
|
Keymap("n", "<leader>bd", function() -- delete buffer
|
||||||
|
vim.cmd("bd")
|
||||||
|
vim.cmd("echo 'Buffer deleted'")
|
||||||
|
end)
|
||||||
|
|
||||||
vim.keymap.set("n", "i", function()
|
vim.keymap.set("n", "i", function()
|
||||||
if vim.fn.getline("."):match("^%s*$") then
|
if vim.fn.getline("."):match("^%s*$") then
|
||||||
return [["_cc]]
|
return [["_cc]]
|
||||||
@@ -69,12 +90,6 @@ vim.keymap.set("n", "a", function()
|
|||||||
end
|
end
|
||||||
end, { expr = true, desc = "Indent properly on empty lines" })
|
end, { expr = true, desc = "Indent properly on empty lines" })
|
||||||
|
|
||||||
-- Force proper keybindings
|
|
||||||
vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
|
|
||||||
vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
|
|
||||||
vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
|
|
||||||
vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
|
|
||||||
|
|
||||||
-- C-BS for deleting whole word in insert mode
|
-- C-BS for deleting whole word in insert mode
|
||||||
vim.keymap.set("i", "<C-BS>", "<C-W>", { noremap = true })
|
vim.keymap.set("i", "<C-BS>", "<C-W>", { noremap = true })
|
||||||
|
|
||||||
@@ -84,17 +99,12 @@ vim.keymap.set("n", "<leader>qj", function() -- quit and save session local
|
|||||||
vim.cmd("wqa")
|
vim.cmd("wqa")
|
||||||
end, { noremap = true })
|
end, { noremap = true })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>qw", function() -- quit and save session global
|
|
||||||
local sessionName = vim.fn.input("Session Name: ")
|
|
||||||
if sessionName ~= "" then
|
|
||||||
MiniSessions.write(sessionName)
|
|
||||||
vim.cmd("wqa")
|
|
||||||
else
|
|
||||||
vim.notify("Session Name Invalid", vim.log.levels.INFO)
|
|
||||||
end
|
|
||||||
end, { noremap = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>qd", function() -- quit and delete session
|
vim.keymap.set("n", "<leader>qd", function() -- quit and delete session
|
||||||
MiniSessions.delete(".session")
|
pcall(MiniSessions.delete(".session"))
|
||||||
vim.cmd("wqa")
|
vim.cmd("wqa")
|
||||||
end, { noremap = true })
|
end, { noremap = true })
|
||||||
|
|
||||||
|
-- lg keybind
|
||||||
|
Keymap("n", "<leader>l", function()
|
||||||
|
Snacks.lazygit.open()
|
||||||
|
end)
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ return {
|
|||||||
|
|
||||||
fuzzy = { implementation = "lua" },
|
fuzzy = { implementation = "lua" },
|
||||||
|
|
||||||
signature = { enabled = true },
|
signature = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
|
||||||
completion = {
|
completion = {
|
||||||
list = {
|
list = {
|
||||||
|
|||||||
@@ -3,11 +3,13 @@ return {
|
|||||||
version = "",
|
version = "",
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local animate = require("mini.animate")
|
|
||||||
require("mini.pairs").setup() -- Bracket pairs and stuff
|
require("mini.pairs").setup() -- Bracket pairs and stuff
|
||||||
|
|
||||||
require("mini.ai").setup() -- Around and In extension for visual mode
|
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.cursorword").setup() -- Underline current word below cursor (makes it easier to c and d)
|
||||||
require("mini.indentscope").setup({
|
|
||||||
|
require("mini.indentscope").setup({ -- shows indents
|
||||||
symbol = "│",
|
symbol = "│",
|
||||||
draw = {
|
draw = {
|
||||||
delay = 10,
|
delay = 10,
|
||||||
@@ -17,24 +19,20 @@ return {
|
|||||||
easing = "out",
|
easing = "out",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}) -- Indent lines
|
})
|
||||||
|
|
||||||
require("mini.trailspace").setup() -- Shows useless spaces
|
require("mini.trailspace").setup() -- Shows useless spaces
|
||||||
require("mini.sessions").setup({
|
|
||||||
|
require("mini.sessions").setup({ -- dir based session management
|
||||||
autoread = true,
|
autoread = true,
|
||||||
autowrite = true,
|
autowrite = true,
|
||||||
file = ".session",
|
file = ".session",
|
||||||
force = { read = false, write = true, delete = true },
|
force = { read = false, write = true, delete = true },
|
||||||
})
|
})
|
||||||
-- require("mini.notify").setup({
|
|
||||||
-- window = { winblend = 0 },
|
|
||||||
-- }) -- Better Notifications
|
|
||||||
-- vim.notify = MiniNotify.make_notify({
|
|
||||||
-- ERROR = { duration = 5000 },
|
|
||||||
-- WARN = { duration = 4000 },
|
|
||||||
-- INFO = { duration = 3000 },
|
|
||||||
-- })
|
|
||||||
require("mini.surround").setup() -- Suround selections with characters
|
require("mini.surround").setup() -- Suround selections with characters
|
||||||
require("mini.move").setup({
|
|
||||||
|
require("mini.move").setup({ -- move selection in visual mode
|
||||||
mappings = {
|
mappings = {
|
||||||
down = "J",
|
down = "J",
|
||||||
up = "K",
|
up = "K",
|
||||||
@@ -42,6 +40,8 @@ return {
|
|||||||
})
|
})
|
||||||
|
|
||||||
require("mini.icons").setup() -- Icon provider
|
require("mini.icons").setup() -- Icon provider
|
||||||
|
|
||||||
|
local animate = require("mini.animate") -- animations ovs
|
||||||
require("mini.animate").setup({
|
require("mini.animate").setup({
|
||||||
cursor = {
|
cursor = {
|
||||||
enable = false,
|
enable = false,
|
||||||
@@ -58,7 +58,7 @@ return {
|
|||||||
-- Animate with wiping from nearest edge instead of default static one
|
-- Animate with wiping from nearest edge instead of default static one
|
||||||
winconfig = animate.gen_winconfig.wipe({ direction = "from_edge" }),
|
winconfig = animate.gen_winconfig.wipe({ direction = "from_edge" }),
|
||||||
-- Make bigger windows more transparent
|
-- Make bigger windows more transparent
|
||||||
winblend = animate.gen_winblend.linear({ from = 80, to = 100 }),
|
winblend = animate.gen_winblend.linear({ from = 0, to = 0 }),
|
||||||
},
|
},
|
||||||
close = {
|
close = {
|
||||||
-- Animate for 400 milliseconds with linear easing
|
-- Animate for 400 milliseconds with linear easing
|
||||||
@@ -66,7 +66,7 @@ return {
|
|||||||
-- Animate with wiping to nearest edge instead of default static one
|
-- Animate with wiping to nearest edge instead of default static one
|
||||||
winconfig = animate.gen_winconfig.wipe({ direction = "to_edge" }),
|
winconfig = animate.gen_winconfig.wipe({ direction = "to_edge" }),
|
||||||
-- Make bigger windows more transparent
|
-- Make bigger windows more transparent
|
||||||
winblend = animate.gen_winblend.linear({ from = 100, to = 80 }),
|
winblend = animate.gen_winblend.linear({ from = 0, to = 0 }),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -8,8 +8,22 @@ return {
|
|||||||
load = {
|
load = {
|
||||||
["core.defaults"] = {},
|
["core.defaults"] = {},
|
||||||
["core.concealer"] = {},
|
["core.concealer"] = {},
|
||||||
|
["core.qol.toc"] = {
|
||||||
|
config = {
|
||||||
|
close_after_use = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
["core.integrations.treesitter"] = {},
|
["core.integrations.treesitter"] = {},
|
||||||
["core.looking-glass"] = {},
|
["core.looking-glass"] = {},
|
||||||
|
["core.itero"] = {
|
||||||
|
config = {
|
||||||
|
iterables = {
|
||||||
|
"unordered_list%d",
|
||||||
|
"ordered_list%d",
|
||||||
|
"quote%d",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
["core.completion"] = {
|
["core.completion"] = {
|
||||||
config = { engine = { module_name = "external.lsp-completion" } },
|
config = { engine = { module_name = "external.lsp-completion" } },
|
||||||
},
|
},
|
||||||
@@ -52,5 +66,15 @@ return {
|
|||||||
})
|
})
|
||||||
vim.wo.foldlevel = 99
|
vim.wo.foldlevel = 99
|
||||||
vim.wo.conceallevel = 2
|
vim.wo.conceallevel = 2
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("Filetype", {
|
||||||
|
pattern = "norg",
|
||||||
|
callback = function()
|
||||||
|
vim.keymap.set("n", "<CR>", "<Plug>(neorg.esupports.hop.hop-link.vsplit)", { buffer = true })
|
||||||
|
vim.keymap.set("i", "<CR>", "<Plug>(neorg.itero.next-iteration)", { buffer = true })
|
||||||
|
vim.keymap.set("n", "<localleader>m", "<cmd>Neorg inject-metadata<CR>", { buffer = true })
|
||||||
|
vim.keymap.set("n", "<localleader>f", "<cmd>Telescope neorg insert_link<CR>", { buffer = true })
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
|
||||||
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,7 @@ return {
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-telescope/telescope-symbols.nvim",
|
"nvim-telescope/telescope-symbols.nvim",
|
||||||
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons", "archibate/lualine-time" },
|
||||||
config = function()
|
config = function()
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = {
|
options = {
|
||||||
@@ -39,9 +39,9 @@ return {
|
|||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "branch", "diff", "diagnostics" },
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
lualine_c = { "filename" },
|
lualine_c = { "filename" },
|
||||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
lualine_x = { "filetype" },
|
||||||
lualine_y = { "lsp_status" },
|
lualine_y = { "lsp_status" },
|
||||||
lualine_z = { "location" },
|
lualine_z = { "ctime" },
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
|
|||||||
@@ -18,7 +18,14 @@ return {
|
|||||||
hover = {
|
hover = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
-- you can enable a preset for easier configuration
|
lsp = {
|
||||||
|
hover = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
signature = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
presets = {
|
presets = {
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
@@ -27,6 +34,8 @@ return {
|
|||||||
})
|
})
|
||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
background_colour = "#000000",
|
background_colour = "#000000",
|
||||||
|
render = "compact",
|
||||||
|
stages = "slide",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ return {
|
|||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("snacks").setup({
|
require("snacks").setup({
|
||||||
|
bigfile = {},
|
||||||
|
lazygit = {},
|
||||||
image = {
|
image = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
math = {
|
math = {
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"levouh/tint.nvim",
|
|
||||||
config = function()
|
|
||||||
require("tint").setup()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
7
lua/plugins/ui/vimade.lua
Normal file
7
lua/plugins/ui/vimade.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"tadaa/vimade",
|
||||||
|
opts = {
|
||||||
|
recipe = { "minimalist", { animate = true } },
|
||||||
|
fadelevel = 0.6,
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user