Last active
November 25, 2025 11:37
-
-
Save VonHeikemen/50b3212e32e5d08387ac7803534fe577 to your computer and use it in GitHub Desktop.
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 characters
| -- NOTE: This configuration is meant for Neovim v0.11 or greater | |
| -- Learn about Neovim: | |
| -- https://vonheikemen.github.io/devlog/tools/simple-neovim-config/ | |
| -- https://neovim.io/doc/user/lua-guide.html | |
| vim.o.number = true | |
| vim.o.tabstop = 2 | |
| vim.o.shiftwidth = 2 | |
| vim.o.smartcase = true | |
| vim.o.ignorecase = true | |
| vim.o.wrap = false | |
| vim.o.hlsearch = false | |
| vim.o.signcolumn = 'yes' | |
| -- Space as the leader key | |
| vim.g.mapleader = vim.keycode('<Space>') | |
| -- Basic clipboard interaction | |
| vim.keymap.set({'n', 'x'}, 'gy', '"+y', {desc = 'Copy to clipboard'}) | |
| vim.keymap.set({'n', 'x'}, 'gp', '"+p', {desc = 'Paste clipboard text'}) | |
| -- Command shortcuts | |
| vim.keymap.set('n', '<leader>w', '<cmd>write<cr>', {desc = 'Save file'}) | |
| vim.keymap.set('n', '<leader>q', '<cmd>quitall<cr>', {desc = 'Exit vim'}) | |
| vim.cmd.colorscheme('retrobox') | |
| local ok, MiniDeps = pcall(require, 'mini.deps') | |
| if not ok then | |
| -- Install instructions are in the blog post: | |
| -- https://vonheikemen.github.io/devlog/tools/simple-neovim-config/#installing-plugins | |
| vim.notify('[WARN] mini.deps module not found', vim.log.levels.WARN) | |
| return | |
| end | |
| MiniDeps.setup({}) | |
| MiniDeps.add('neovim/nvim-lspconfig') | |
| require('mini.snippets').setup({}) | |
| require('mini.completion').setup({}) | |
| require('mini.files').setup({}) | |
| vim.keymap.set('n', '<leader>e', '<cmd>lua MiniFiles.open()<cr>', {desc = 'File explorer'}) | |
| require('mini.pick').setup({}) | |
| vim.keymap.set('n', '<leader><space>', '<cmd>Pick buffers<cr>', {desc = 'Search open files'}) | |
| vim.keymap.set('n', '<leader>ff', '<cmd>Pick files<cr>', {desc = 'Search all files'}) | |
| vim.keymap.set('n', '<leader>fh', '<cmd>Pick help<cr>', {desc = 'Search help tags'}) | |
| -- List of compatible language servers is here: | |
| -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md | |
| vim.lsp.enable({'gopls', 'rust_analyzer'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment