Created
November 11, 2025 14:55
-
-
Save mdoliwa/b43e8e1d85da2c29e43086c6c924c9e8 to your computer and use it in GitHub Desktop.
Revisions
-
mdoliwa created this gist
Nov 11, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,241 @@ -- Set <space> as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) vim.g.mapleader = '\\' vim.g.maplocalleader = '\\' -- Set to true if you have a Nerd Font installed vim.g.have_nerd_font = false -- [[ Setting options ]] -- See `:help vim.opt` -- NOTE: You can change these options as you wish! -- For more options, you can see `:help option-list` -- Disable swap files vim.opt.swapfile = false -- Make line numbers default vim.opt.number = true -- You can also add relative line numbers, for help with jumping. -- Experiment for yourself to see if you like it! -- vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' -- Don't show the mode, since it's already in status line vim.opt.showmode = false -- Sync clipboard between OS and Neovim. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` vim.opt.clipboard = 'unnamedplus' -- Enable break indent vim.opt.breakindent = true -- Save undo history vim.opt.undofile = true -- Case-insensitive searching UNLESS \C or capital in search vim.opt.ignorecase = true vim.opt.smartcase = true -- Keep signcolumn on by default vim.opt.signcolumn = 'no' -- Decrease update time vim.opt.updatetime = 250 vim.opt.timeoutlen = 300 -- Configure how new splits should be opened vim.opt.splitright = true vim.opt.splitbelow = true -- Sets how neovim will display certain whitespace in the editor. -- See `:help 'list'` -- and `:help 'listchars'` vim.opt.list = true vim.opt.listchars = { tab = 'Β» ', trail = 'Β·', nbsp = 'β£' } vim.opt.tabstop = 2 vim.opt.shiftwidth = 2 vim.opt.softtabstop = 2 vim.opt.expandtab = true -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' -- Show which line your cursor is on vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` -- Set highlight on search, but clear on pressing <Esc> in normal mode vim.opt.hlsearch = true vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') -- Keybinds to make split navigation easier. -- Use CTRL+<hjkl> to switch between windows -- -- See `:help wincmd` for a list of all window commands vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' }) vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking (copying) text', group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), callback = function() -- It was causing error after freeze pcall(vim.highlight.on_yank) end, }) -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then local lazyrepo = 'https://github.com/folke/lazy.nvim.git' vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } end ---@diagnostic disable-next-line: undefined-field vim.opt.rtp:prepend(lazypath) -- [[ Configure and install plugins ]] -- -- To check the current status of your plugins, run -- :Lazy -- -- You can press `?` in this menu for help. Use `:q` to close the window -- -- To update plugins, you can run -- :Lazy update -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ { -- You can easily change to a different colorscheme. -- Change the name of the colorscheme plugin below, and then -- change the command in the config to whatever the name of that colorscheme is -- -- 'lifepillar/vim-solarized8', -- lazy = false, -- make sure we load this during startup if it is your main colorscheme -- priority = 1000, -- make sure to load this before all the other start plugins -- config = function() -- vim.cmd.colorscheme 'solarized8' -- -- -- You can configure highlights by doing something like -- vim.cmd.hi 'Comment gui=none' -- vim.cmd.hi 'CursorLineNR cterm=none' -- end, 'morhetz/gruvbox', lazy = false, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- make sure to load this before all the other start plugins config = function() vim.cmd.colorscheme 'gruvbox' -- You can configure highlights by doing something like vim.cmd.hi 'Comment gui=none' vim.cmd.hi 'CursorLineNR cterm=none' end, }, { "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() local fzf_lua = require("fzf-lua") -- calling `setup` is optional for customization fzf_lua.setup({ grep = { cmd = "rg --column --line-number --no-heading --color=always --smart-case --hidden --glob '!.git/'", input_prompt = 'Rgβ― ', rg_opts = "--hidden --column --line-number --no-heading --color=always --smart-case --glob '!.git/'" }, }) -- Keybindings vim.keymap.set('n', '<C-p>', fzf_lua.files) vim.keymap.set('n', '<C-f>', function() fzf_lua.grep({ search = "" }) end) end }, { "vimwiki/vimwiki", init = function() vim.g.vimwiki_list = { { path = '~/Notes/', index = 'Notes', diary_rel_path = './', syntax = 'markdown', ext = '.md', }, { path = '~/Work/', index = 'Notes', diary_rel_path = './', syntax = 'markdown', ext = '.md', } } end }, { "nvim-neo-tree/neo-tree.nvim", branch = "v3.x", dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended "MunifTanjim/nui.nvim", -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information } }, 'tpope/vim-rails', 'tpope/vim-fugitive', "tpope/vim-surround", 'junegunn/vim-easy-align', { 'unblevable/quick-scope', init = function() -- Trigger a highlight in the appropriate direction when pressing these keys vim.g.qs_highlight_on_keys = {'f', 'F', 't', 'T'} end }, }, { ui = { -- If you have a Nerd Font, set icons to an empty table which will use the -- default lazy.nvim defined Nerd Font icons otherwise define a unicode icons table icons = vim.g.have_nerd_font and {} or { cmd = 'β', config = 'π ', event = 'π ', ft = 'π', init = 'β', keys = 'π', plugin = 'π', runtime = 'π»', require = 'π', source = 'π', start = 'π', task = 'π', lazy = 'π€ ', }, }, }) -- ... -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et