initial commit

This commit is contained in:
Keyoonz
2025-08-11 23:59:08 +02:00
commit cb21bbc1a7
14 changed files with 383 additions and 0 deletions

23
lua/config/keymaps.lua Normal file
View File

@@ -0,0 +1,23 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.keymap.set("n", "<leader>c", "", { desc = "lsp" })
vim.keymap.set("n", "<leader>cd", function()
vim.diagnostic.open_float()
end, { desc = "Show diagnostics" })
vim.keymap.set("n", "<leader>cf", function()
vim.lsp.buf.format()
end, { desc = "Format buffer" })
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { desc = "code actions" })
vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = "go to left window" })
vim.keymap.set('n', '<C-l>', '<C-w>l', { desc = "go to left window" })
vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = "go to left window" })
vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = "go to left window" })
vim.keymap.set('n', '<A-k>', ':m .-2<CR>==', { desc = "Swap with above line" })
vim.keymap.set('n', '<A-j>', ':m .1<CR>==', { desc = "Swap with above line" })
vim.keymap.set('n', '<esc>', function()
vim.cmd("nohlsearch")
end, { desc = "Clear search result" })

35
lua/config/lazy.lua Normal file
View File

@@ -0,0 +1,35 @@
-- 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 = {
-- import your plugins
{ import = "plugins" },
},
-- 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 },
})

15
lua/config/options.lua Normal file
View File

@@ -0,0 +1,15 @@
vim.opt.list = true
vim.opt.listchars = {
tab = "> ",
trail = "-",
nbsp = "+",
}
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.expandtab = false
vim.opt.cmdheight = 0