From fc57c9d34475f4d1e8cc65038c4a5eab2419acdc Mon Sep 17 00:00:00 2001 From: maciejrusek Date: Wed, 25 Feb 2026 21:56:27 +0100 Subject: [PATCH] init --- .gitignore | 1 + init.lua | 10 ++++++++++ lua/config/lazy.lua | 27 +++++++++++++++++++++++++++ lua/plugins/fzf-lua.lua | 15 +++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 .gitignore create mode 100644 init.lua create mode 100644 lua/config/lazy.lua create mode 100644 lua/plugins/fzf-lua.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e033bc6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lazy-lock.json diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..158b349 --- /dev/null +++ b/init.lua @@ -0,0 +1,10 @@ +vim.o.number = true +vim.o.relativenumber = true +vim.o.wrap = false +vim.o.swapfile = false +vim.g.mapleader = " " + +vim.keymap.set('n', 'o', ':update :source') + + +require("config.lazy") diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..ffca595 --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,27 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/lua/plugins/fzf-lua.lua b/lua/plugins/fzf-lua.lua new file mode 100644 index 0000000..f03f493 --- /dev/null +++ b/lua/plugins/fzf-lua.lua @@ -0,0 +1,15 @@ +return { + "ibhagwan/fzf-lua", + -- optional for icon support + dependencies = { "nvim-tree/nvim-web-devicons" }, + -- or if using mini.icons/mini.nvim + -- dependencies = { "nvim-mini/mini.icons" }, + ---@module "fzf-lua" + ---@type fzf-lua.Config|{} + ---@diagnostic disable: missing-fields + opts = {}, + ---@diagnostic enable: missing-fields + keys = { + { "ff", function() require("fzf-lua").files() end, desc = "Find files" }, + } +}