feat: big refactor.

This commit is contained in:
CronyAkatsuki 2025-10-21 20:26:16 +02:00
parent 91660e8890
commit d0738bbf71
11 changed files with 268 additions and 26 deletions

View file

@ -1,3 +1,4 @@
require('config.settings')
require('config.keybindings')
require('config.pack')
require('config.autocommands')

View file

@ -8,26 +8,20 @@ vim.keymap.set("n", "<Leader> ", ":update<CR> :source<CR>", { desc = "Source cur
-- format
vim.keymap.set("n", "<Leader>lf", vim.lsp.buf.format, { desc = "Format buffer with available lsp" })
-- setup mini.pick
vim.keymap.set("n", "<Leader>ff", ":Pick files<CR>", { desc = "Search file in directory" })
vim.keymap.set("n", "<Leader>fh", ":Pick help<CR>", { desc = "Searcch neovim help" })
-- move lines up or down
vim.keymap.set("n", "<A-j>", ":m .+1<CR>==", { desc = "Move line down" })
vim.keymap.set("n", "<A-k>", ":m .-2<CR>==", { desc = "Move line up" })
vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv", { desc = "Move selection down" })
vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv", { desc = "Move selection up" })
-- easy copy/cut/paste from system clipboard
vim.keymap.set({ "n", "v", "x" }, "<Leader>y", '"+y', { desc = "Yank to system clipboard" })
vim.keymap.set({ "n", "v", "x" }, "<Leader>d", '"+d', { desc = "Cut to system clipboard" })
vim.keymap.set({ "n", "v", "x" }, "<Leader>p", '"+p', { desc = "Paste from system clipboard" })
-- better indenting in visual mode
vim.keymap.set("v", "<", "<gv", { desc = "Indent left and reselect" })
vim.keymap.set("v", ">", ">gv", { desc = "Indent right and reselect" })
-- file exploring
vim.keymap.set("n", "<Leader>e", ":Oil<CR>", { desc = "Open oil file explorer" })
-- Copy Full File-Path
vim.keymap.set("n", "<leader>yp", function()
local path = vim.fn.expand("%:p")
vim.fn.setreg("+", path)
print("file:", path)
local path = vim.fn.expand("%:p")
vim.fn.setreg("+", path)
print("file:", path)
end)

View file

@ -1,14 +1,12 @@
vim.pack.add({
-- Colorscheme
{src = "https://github.com/ellisonleao/gruvbox.nvim"},
{ src = "https://github.com/ellisonleao/gruvbox.nvim" },
-- Treesitter parsers
{src = "https://github.com/nvim-treesitter/nvim-treesitter"},
{ src = "https://github.com/nvim-treesitter/nvim-treesitter" },
-- Preconfigured lsp's
{src = "https://github.com/neovim/nvim-lspconfig"},
-- Nice file manager
{src = "https://github.com/stevearc/oil.nvim"},
{ src = "https://github.com/neovim/nvim-lspconfig" },
-- Amazing neovim bundle of plugins that are super nice
{src = "https://github.com/nvim-mini/mini.nvim"},
{ src = "https://github.com/nvim-mini/mini.nvim" },
-- Fix the annoying neovim+lua errors
{src = "https://github.com/folke/lazydev.nvim"},
{ src = "https://github.com/folke/lazydev.nvim" },
})

View file

@ -83,3 +83,22 @@ vim.opt.encoding = "UTF8"
vim.opt.wildmenu = true
vim.opt.wildmode = "longest:full,full"
vim.opt.wildignore:append({ "*.o", "*.obj", "*.pyc", "*.class", "*.jar" })
-- disable builtin plugins that I don't use
local builtin_plugs = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
"2html_plugin",
"getscript",
"getscriptPlugin",
}
for i = 1, #builtin_plugs do
vim.g['loaded_' .. builtin_plugs[i]] = true
end