first commit

This commit is contained in:
2025-03-04 15:23:46 +01:00
commit 65451f9c9d
16 changed files with 331 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
-- 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()
vim.highlight.on_yank()
end,
})
+8
View File
@@ -0,0 +1,8 @@
-- ESC to stop highlighting search
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Easier navigration between windows
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' })
+47
View File
@@ -0,0 +1,47 @@
-- 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)
-- Setup lazy.nvim
local lazy = require("lazy")
lazy.setup({
spec = {
{ import = "plugins" },
},
defaults = {
lazy = false,
version = false,
},
install = { colorscheme = { "moonfly", "wildcharm" } },
checker = { enabled = true, notify = false },
performance = {
rtp = {
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
vim.keymap.set("n", "<leader>l", lazy.home)
+51
View File
@@ -0,0 +1,51 @@
-- Leader
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.timeoutlen = 300
-- Numbers
vim.opt.number = true
vim.opt.relativenumber = true
-- Mouse
vim.opt.mouse = 'a'
-- Use system clipboard
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
end)
-- Indent
vim.opt.breakindent = true
-- History
vim.opt.undofile = true
vim.opt.updatetime = 250
-- Search
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- UI
vim.opt.signcolumn = 'yes'
vim.opt.scrolloff = 5
vim.opt.wrap = false
-- Splits
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Whitespaces
vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- Preview substitutions
vim.opt.inccommand = 'split'
-- Colors
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- Statusline
vim.opt.laststatus = 3
vim.opt.showmode = false