diff options
| author | Nikolaos Boutalas <nikolaosboutalas@MACBOOKPRO-1B9E.station> | 2026-01-29 18:04:29 +0200 |
|---|---|---|
| committer | Nikolaos Boutalas <nikolaosboutalas@MACBOOKPRO-1B9E.station> | 2026-01-29 18:04:29 +0200 |
| commit | 67826bd053daf6c2064d4570727c1690dc769fd6 (patch) | |
| tree | 695f17380bbba54e54018667a75003981a5fdb6d | |
| parent | a8828b2df4e386c11d62d59f370b06f72f7d5d56 (diff) | |
| -rw-r--r-- | .config/nvim/init.lua | 50 | ||||
| -rw-r--r-- | .config/nvim/lazy-lock.json | 6 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..c1027ea --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,50 @@ +-- Bootstrap lazy.nvim +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) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- add your plugins here + { + 'nvim-telescope/telescope.nvim', version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + -- optional but recommended + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, + } + }, + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release --target install' } + }, + -- 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 }, +}) + +local builtin = require('telescope.builtin') +vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) +vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' }) +vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' }) +vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' }) + diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..7a5efde --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,6 @@ +{ + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" } +} |
