Skip to content

Instantly share code, notes, and snippets.

@karanjitsingh
Created May 3, 2025 00:26
Show Gist options
  • Save karanjitsingh/079115c17c8b22472e54e7b05a767880 to your computer and use it in GitHub Desktop.
Save karanjitsingh/079115c17c8b22472e54e7b05a767880 to your computer and use it in GitHub Desktop.
neovim-config
if vim.g.vscode then
-- VSCode extension
else
-- ordinary Neovim
end
-- Use system clipboard
vim.opt.clipboard = "unnamedplus"
-- Enable case-insensitive search
vim.opt.ignorecase = true
-- Enable smart case (case-sensitive only when search contains uppercase)
vim.opt.smartcase = true
-- Enable relative line numbers
vim.wo.relativenumber = true
-- Add command to insert UUID
vim.api.nvim_create_user_command('UUID', function()
local uuid = vim.fn.system('uuidgen'):gsub('\n', ''):lower()
vim.api.nvim_put({uuid}, '', false, true)
end, {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment